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

Unified Diff: src/trusted/service_runtime/arch/mips/sel_addrspace_mips.c

Issue 10919162: [MIPS] Implementation of sel_ldr for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Rebase (Saturday morning). Created 8 years, 3 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
Index: src/trusted/service_runtime/arch/mips/sel_addrspace_mips.c
diff --git a/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c b/src/trusted/service_runtime/arch/mips/sel_addrspace_mips.c
similarity index 81%
copy from src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c
copy to src/trusted/service_runtime/arch/mips/sel_addrspace_mips.c
index 4c81d2919d6812d83c3b4f0314bfa02903601e8f..a41fcfe7ca020c8aedc2ece7695791e9c9e99d72 100644
--- a/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c
+++ b/src/trusted/service_runtime/arch/mips/sel_addrspace_mips.c
@@ -1,7 +1,7 @@
/*
- * 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.
+ * Copyright 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.
*/
#include "native_client/src/include/nacl_platform.h"
@@ -22,8 +22,8 @@ NaClErrorCode NaClAllocateSpace(void **mem, size_t addrsp_size) {
CHECK(NULL != mem);
/*
- * On ARM, we cheat slightly: we add two pages to the requested
- * allocation! This accomodates the guard region we require at the
+ * On Mips, we also cheat slightly: we add two pages to the requested
+ * allocation! This accomodates the guard region we require at the
* top end of untrusted memory.
*/
addrsp_size += NACL_ADDRSPACE_UPPER_GUARD_SIZE;
@@ -33,18 +33,19 @@ NaClErrorCode NaClAllocateSpace(void **mem, size_t addrsp_size) {
/*
* On 32 bit Linux, a 1 gigabyte block of address space may be reserved at
* the zero-end of the address space during process creation, to address
- * sandbox layout requirements on ARM and performance issues on Intel ATOM.
- * Look for this prereserved block and if found, pass its address to the
+ * sandbox layout requirements on Mips and performance issues on Intel ATOM.
+ * Look for this pre-reserved block and if found, pass its address to the
* page allocation function.
*/
if (!NaClFindPrereservedSandboxMemory(mem, addrsp_size)) {
- /* On ARM, we should always have prereserved sandbox memory. */
+ /* On Mips, we should always have prereserved sandbox memory. */
NaClLog(LOG_ERROR, "NaClAllocateSpace:"
" Could not find correct amount of prereserved memory"
" (looked for 0x%016"NACL_PRIxS" bytes).\n",
addrsp_size);
return LOAD_NO_MEMORY;
}
+
/*
* When creating a zero-based sandbox, we do not allocate the first 64K of
* pages beneath the trampolines, because -- on Linux at least -- we cannot.
« no previous file with comments | « src/trusted/service_runtime/arch/mips/nacl_tls.c ('k') | src/trusted/service_runtime/arch/mips/sel_ldr_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698