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 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ | 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ |
8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ | 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ |
9 | 9 |
10 /* Defines the API exposed by the Native Client validators. */ | 10 /* Defines the API exposed by the Native Client validators. */ |
11 | 11 |
12 #include "native_client/src/include/nacl_base.h" | 12 #include "native_client/src/include/nacl_base.h" |
13 #include "native_client/src/include/portability.h" | 13 #include "native_client/src/include/portability.h" |
| 14 #include "native_client/src/trusted/cpu_features/cpu_features.h" |
14 | 15 |
15 | 16 |
16 EXTERN_C_BEGIN | 17 EXTERN_C_BEGIN |
17 | 18 |
18 struct NaClValidationCache; | 19 struct NaClValidationCache; |
19 | 20 |
20 /* | |
21 * Forward-declared (but never defined) generic CPU features. | |
22 * Each architecture needs to cast from this generic type. | |
23 */ | |
24 struct NaClCPUFeaturesAbstract; | |
25 typedef struct NaClCPUFeaturesAbstract NaClCPUFeatures; | |
26 | |
27 /* Defines possible validation status values. */ | 21 /* Defines possible validation status values. */ |
28 typedef enum NaClValidationStatus { | 22 typedef enum NaClValidationStatus { |
29 /* The call to the validator succeeded. */ | 23 /* The call to the validator succeeded. */ |
30 NaClValidationSucceeded, | 24 NaClValidationSucceeded, |
31 /* The call to the validator failed (Reason unspecified) */ | 25 /* The call to the validator failed (Reason unspecified) */ |
32 NaClValidationFailed, | 26 NaClValidationFailed, |
33 /* The call to the validator failed, due to not enough memory. */ | 27 /* The call to the validator failed, due to not enough memory. */ |
34 NaClValidationFailedOutOfMemory, | 28 NaClValidationFailedOutOfMemory, |
35 /* The call to the validator failed, due to it not being implemented yet. */ | 29 /* The call to the validator failed, due to it not being implemented yet. */ |
36 NaClValidationFailedNotImplemented, | 30 NaClValidationFailedNotImplemented, |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 NACL_TARGET_ARCH, | 169 NACL_TARGET_ARCH, |
176 NACL_TARGET_SUBARCH)( | 170 NACL_TARGET_SUBARCH)( |
177 uintptr_t guest_addr, | 171 uintptr_t guest_addr, |
178 uint8_t *data, | 172 uint8_t *data, |
179 size_t size, | 173 size_t size, |
180 const NaClCPUFeatures *cpu_features); | 174 const NaClCPUFeatures *cpu_features); |
181 | 175 |
182 EXTERN_C_END | 176 EXTERN_C_END |
183 | 177 |
184 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ */ | 178 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ */ |
OLD | NEW |