Move kernel base to 0x80020000

master
WangRunji 6 years ago
parent 7b4cc6d772
commit f055ba7b23

@ -1,7 +1,7 @@
#include "encoding.h" #include "encoding.h"
.section ".payload","a",@progbits .section ".payload","a",@progbits
.align RISCV_PGSHIFT + RISCV_PGLEVEL_BITS .align 17
.globl _payload_start, _payload_end .globl _payload_start, _payload_end
_payload_start: _payload_start:

@ -6,7 +6,7 @@
OUTPUT_ARCH(riscv) OUTPUT_ARCH(riscv)
ENTRY(kern_entry) ENTRY(kern_entry)
BASE_ADDRESS = 0x80400000; /* equal to payload address in bbl */ BASE_ADDRESS = 0x80020000; /* equal to payload address in bbl */
SECTIONS SECTIONS
{ {

@ -16,9 +16,9 @@ mod riscv {
const P2_MASK: usize = 0x3ff << 22; const P2_MASK: usize = 0x3ff << 22;
pub const RECURSIVE_PAGE_PML4: usize = 0x3fe; pub const RECURSIVE_PAGE_PML4: usize = 0x3fe;
pub const KERNEL_OFFSET: usize = 0; pub const KERNEL_OFFSET: usize = 0;
pub const KERNEL_PML4: usize = 0x8040_0000 >> 22; pub const KERNEL_PML4: usize = 0x8000_0000 >> 22;
pub const KERNEL_HEAP_OFFSET: usize = 0x8050_0000; pub const KERNEL_HEAP_OFFSET: usize = 0x8010_0000;
pub const KERNEL_HEAP_SIZE: usize = 1 * 1024 * 1024; pub const KERNEL_HEAP_SIZE: usize = 0x0010_0000;
pub const MEMORY_OFFSET: usize = 0x8000_0000; pub const MEMORY_OFFSET: usize = 0x8000_0000;
pub const MEMORY_END: usize = 0x8080_0000; pub const MEMORY_END: usize = 0x8080_0000;
pub const USER_STACK_OFFSET: usize = 0x70000000; pub const USER_STACK_OFFSET: usize = 0x70000000;

Loading…
Cancel
Save