| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009 The Native Client Authors. All rights reserved. | 2 * Copyright 2011 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
| 5 * Copyright 2009, Google Inc. | 5 * Copyright 2011, Google Inc. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_NCVALIDATE_H | 8 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_NCVALIDATE_H |
| 9 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_NCVALIDATE_H | 9 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_NCVALIDATE_H |
| 10 | 10 |
| 11 /* | 11 /* |
| 12 * The C interface to the validator, for use by the sel_ldr (which isn't | 12 * The C interface to the validator, for use by the sel_ldr (which isn't |
| 13 * C++). This provides a restricted version of the validation process, | 13 * C++). This provides a restricted version of the validation process, |
| 14 * without detailed user feedback, etc. | 14 * without detailed user feedback, etc. |
| 15 * | 15 * |
| 16 * This header file must be valid C and C++! | 16 * This header file must be valid C and C++! |
| 17 */ | 17 */ |
| 18 | 18 |
| 19 #include <stdint.h> | 19 #include <stdint.h> |
| 20 #include "native_client/src/include/portability.h" | 20 #include "native_client/src/include/portability.h" |
| 21 | 21 |
| 22 EXTERN_C_BEGIN | 22 EXTERN_C_BEGIN |
| 23 | 23 |
| 24 /* | 24 /* |
| 25 * Validates a complete code segment. | 25 * Validates a complete code segment. |
| 26 * Arguments: | 26 * Arguments: |
| 27 * mbase location of the code in memory right now. | 27 * mbase location of the code in memory right now. |
| 28 * vbase virtual address where the code will appear at runtime. | 28 * vbase virtual address where the code will appear at runtime. |
| 29 * size number of bytes of code provided. | 29 * size number of bytes of code provided. |
| 30 * thumb whether the code should be evaluated as thumb mode |
| 30 * Result: 0 if validation succeeded, non-zero if we found problems. | 31 * Result: 0 if validation succeeded, non-zero if we found problems. |
| 31 */ | 32 */ |
| 32 int NCValidateSegment(uint8_t *mbase, uint32_t vbase, size_t size); | 33 int NCValidateSegment(uint8_t *mbase, uint32_t vbase, size_t size, |
| 34 uint8_t thumb); |
| 33 | 35 |
| 34 EXTERN_C_END | 36 EXTERN_C_END |
| 35 | 37 |
| 36 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_NCVALIDATE_H | 38 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_NCVALIDATE_H |
| OLD | NEW |