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
4 * found in the LICENSE file.
7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_64_NCVALIDATE_H_
8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_64_NCVALIDATE_H_
10 /* Defines helper functions for implementing the ApplyValidator API
11 * for the x86-64 architecture.
14 #include "native_client/src/trusted/validator/ncvalidate.h"
17 /* Creates a validator state and initializes it. Returns
18 * NaClValidationSucceeded if successful. Otherwise, it returns
19 * status describing reason for failure.
21 * guest_addr: The pc address to use.
22 * data - The contents of the code segment to be validated.
23 * size - The size of the code segment to be validated.
24 * bundle_size - The number of bytes in a code bundle.
25 * local_cpu: True if local cpu rules should be applied.
26 * Otherwise, assume no cpu specific rules.
27 * vstate_ptr - Pointer to be set to allocated validator
28 * state if succeeded (NULL otherwise).o
30 NaClValidationStatus NaClValidatorSetup_x86_64(
34 const NaClCPUFeaturesX86 *cpu_features,
35 struct NaClValidatorState** vstate_ptr);
37 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_64_NCVALIDATE_H_ */