From 7f6abaea6a28d891d5526da71f20d0758c60056e Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 27 Apr 2021 18:16:33 +0800 Subject: [PATCH] Revert "relocate top of kernel memory to save two pages for suspend/resume" This reverts commit 36429de62fccde5acc3876f121eed29318e33fb6. Turns out there is a better way to do this. --- loader/src/asm.S | 4 ---- tools/src/bin/create-image.rs | 3 --- 2 files changed, 7 deletions(-) diff --git a/loader/src/asm.S b/loader/src/asm.S index 9223308f1..e164ceaaf 100644 --- a/loader/src/asm.S +++ b/loader/src/asm.S @@ -10,10 +10,6 @@ _start: lw t0, 16(a0) // SRAM start lw t1, 20(a0) // SRAM length add sp, t0, t1 - // kernel RAM is two pages lower than the absolute end. - // add two pages to the sp so we are at the loader's private stack area - li t0, 0x2000 - add sp, sp, t0 // Install a machine mode trap handler la t0, abort diff --git a/tools/src/bin/create-image.rs b/tools/src/bin/create-image.rs index ffedb4a29..c4079b44c 100644 --- a/tools/src/bin/create-image.rs +++ b/tools/src/bin/create-image.rs @@ -207,9 +207,6 @@ fn main() { csr_to_config(tools::utils::CsrConfig { regions: map }, &mut ram_config); } - // reserve top two pages for bootloader stack, and for the "clean suspend" page - ram_config.size -= 4096 * 2; - let mut args = XousArguments::new(ram_config.offset, ram_config.size, ram_config.name); if !ram_config.regions.is_empty() {