OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 /* | 7 /* |
8 * platform_qual_test.c | 8 * platform_qual_test.c |
9 * | 9 * |
10 * Native Client Platform Qualification Test | 10 * Native Client Platform Qualification Test |
11 * | 11 * |
12 * This uses shell status code to indicate its result; non-zero return | 12 * This uses shell status code to indicate its result; non-zero return |
13 * code indicates the CPUID instruction is not implemented or not | 13 * code indicates the CPUID instruction is not implemented or not |
14 * implemented correctly. | 14 * implemented correctly. |
15 */ | 15 */ |
16 | 16 |
17 #include <stdio.h> | 17 #include <stdio.h> |
18 | 18 |
19 #include "native_client/src/include/nacl_platform.h" | 19 #include "native_client/src/include/nacl_platform.h" |
20 #include "native_client/src/include/portability.h" | 20 #include "native_client/src/include/portability.h" |
21 #include "native_client/src/shared/platform/nacl_check.h" | 21 #include "native_client/src/shared/platform/nacl_check.h" |
22 #include "native_client/src/trusted/validator/x86/nacl_cpuid.h" | 22 #include "native_client/src/trusted/cpu_features/arch/x86/cpu_x86.h" |
23 #include "native_client/src/trusted/platform_qualify/nacl_cpuwhitelist.h" | 23 #include "native_client/src/trusted/platform_qualify/nacl_cpuwhitelist.h" |
24 #include "native_client/src/trusted/platform_qualify/nacl_os_qualify.h" | 24 #include "native_client/src/trusted/platform_qualify/nacl_os_qualify.h" |
25 #include "native_client/src/trusted/platform_qualify/nacl_dep_qualify.h" | 25 #include "native_client/src/trusted/platform_qualify/nacl_dep_qualify.h" |
26 #include "native_client/src/trusted/platform_qualify/arch/x86/vcpuid.h" | 26 #include "native_client/src/trusted/platform_qualify/arch/x86/vcpuid.h" |
27 #include "native_client/src/trusted/service_runtime/nacl_config.h" | 27 #include "native_client/src/trusted/service_runtime/nacl_config.h" |
28 #include "native_client/src/trusted/service_runtime/sel_memory.h" | 28 #include "native_client/src/trusted/service_runtime/sel_memory.h" |
29 | 29 |
30 void TestDEPCheckFailurePath(void) { | 30 void TestDEPCheckFailurePath(void) { |
31 size_t size = NACL_PAGESIZE; | 31 size_t size = NACL_PAGESIZE; |
32 void *page; | 32 void *page; |
(...skipping 30 matching lines...) Expand all Loading... |
63 | 63 |
64 /* | 64 /* |
65 * don't use the white list for now | 65 * don't use the white list for now |
66 * if (NaCl_CPUIsWhitelisted() == 0) return -1; | 66 * if (NaCl_CPUIsWhitelisted() == 0) return -1; |
67 * printf("CPU is whitelisted\n"); | 67 * printf("CPU is whitelisted\n"); |
68 */ | 68 */ |
69 | 69 |
70 printf("platform_qual_test: PASS\n"); | 70 printf("platform_qual_test: PASS\n"); |
71 return 0; | 71 return 0; |
72 } | 72 } |
OLD | NEW |