|
|
|
@ -28,6 +28,8 @@ pub fn dealloc_frame(target: usize) {
|
|
|
|
|
pub fn alloc_stack() -> Stack {
|
|
|
|
|
use alloc::boxed::Box;
|
|
|
|
|
const STACK_SIZE: usize = 0x8000;
|
|
|
|
|
// FIXME: This alignment will cause rsp align with 0x8000 in x86_64 release mode.
|
|
|
|
|
// Because kernel stack is not large enough, it will trigger double fault.
|
|
|
|
|
#[repr(align(0x8000))]
|
|
|
|
|
struct StackData([u8; STACK_SIZE]);
|
|
|
|
|
let data = Box::new(StackData([0; STACK_SIZE]));
|
|
|
|
|