Skip to content

Commit

Permalink
migtd: enlarge the runtime layout based on the metadata
Browse files Browse the repository at this point in the history
Enlarge the stack, heap and DMA size to fully use the usable memory.

Signed-off-by: Jiaqi Gao <jiaqi.gao@intel.com>
  • Loading branch information
gaojiaqi7 committed Nov 13, 2023
1 parent d977b69 commit 48a68ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/migtd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ pub extern "C" fn _start(hob: u64, payload: u64) -> ! {
use td_payload::mm::end_of_ram;
use td_payload::mm::layout::*;

const STACK_SIZE: usize = 0x1_0000;
const HEAP_SIZE: usize = 0x10_0000;
const STACK_SIZE: usize = 0x18_0000;
const HEAP_SIZE: usize = 0x68_0000;
const PT_SIZE: usize = 0x8_0000;
const DMA_SIZE: usize = 0x50_0000;

extern "C" {
fn main();
Expand All @@ -41,7 +42,7 @@ pub extern "C" fn _start(hob: u64, payload: u64) -> ! {
heap_size: HEAP_SIZE,
stack_size: STACK_SIZE,
page_table_size: PT_SIZE,
dma_size: DEFAULT_DMA_SIZE,
dma_size: DMA_SIZE,
#[cfg(feature = "cet-shstk")]
shadow_stack_size: DEFAULT_SHADOW_STACK_SIZE,
};
Expand Down

0 comments on commit 48a68ae

Please sign in to comment.