Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: src/include/arm_sandbox.h

Issue 11194045: Change BKPT and UDF encodings on ARM. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fix one test that was using bkpt #0x6666. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/include/nacl_macros.h » ('j') | tests/dynamic_code_loading/dyncode_demand_alloc_test.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0519f7af284504eb8f75cece60a4e1e6d3f2d81d
--- /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.
+ */
+
+/* Minimal ARM sandbox constants.
Mark Seaborn 2012/10/19 18:08:43 Nit: NaCl comment style is /* * blah... */ i.e.
+ *
+ * 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
+ * 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).
Mark Seaborn 2012/10/19 18:08:43 Why do you want to distinguish between abort-now a
+ * - UDF #0xEDE1 is used to always fail validation.
Mark Seaborn 2012/10/19 18:08:43 Please comment that this is one of many, but it's
+ * 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_ */
« no previous file with comments | « no previous file | src/include/nacl_macros.h » ('j') | tests/dynamic_code_loading/dyncode_demand_alloc_test.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698