Index: src/include/arm_sandbox.h |
diff --git a/src/include/arm_sandbox.h b/src/include/arm_sandbox.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1c1a25d44aed1758e7393b3b59c72a7b4956b5e7 |
--- /dev/null |
+++ b/src/include/arm_sandbox.h |
@@ -0,0 +1,32 @@ |
+/* |
+ * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+/* @file |
Mark Seaborn
2012/10/18 22:05:30
We don't support Doxygen any more -- you can omit
|
+ * |
+ * Minimal ARM sandbox constants. |
+ * |
+ * These constants are used in C code as well as assembly, hence the use of |
+ * the preprocessor. |
+ */ |
+ |
+#ifndef NATIVE_CLIENT_SRC_INCLUDE_ARM_SANDBOX_H_ |
+#define NATIVE_CLIENT_SRC_INCLUDE_ARM_SANDBOX_H_ 1 |
+ |
+// Specially chosen BKPT and UDF instructions that also correspond to |
Mark Seaborn
2012/10/18 22:05:30
Please use C-style comments
|
+// BKPT and UDF when decoded as Thumb instructions. |
+// - BKPT #0x5BE0 is used as literal pool head. |
+// - BKPT #0x5BEF is used as generic breakpoint. |
+// - UDF #0xEDEF is used as halt-fill. |
+// - UDF #0xEDE0 is used as abort-now (such as __builtin_trap). |
+// - UDF #0xEDE1 is used to always fail validation. |
+// All other BKPT/UDF values are disallowed by the validator out of paranoia. |
+#define NACL_INSTR_LITERAL_POOL_HEAD 0xE125BE70 |
+#define NACL_INSTR_BREAKPOINT 0xE125BE7F |
+#define NACL_INSTR_HALT_FILL 0xE7FEDEFF |
+#define NACL_INSTR_ABORT_NOW 0xE7FEDEF0 |
+#define NACL_INSTR_FAIL_VALIDATION 0xE7FEDEF1 |
+ |
+#endif /* NATIVE_CLIENT_SRC_INCLUDE_ARM_SANDBOX_H_ */ |