Skip to content

Last page of stack memory is not used #294

Closed
@phil-opp

Description

@phil-opp

We set the stack_top to the start address of the stack_end page here:

stack_top: mappings.stack_end.start_address(),

However, it looks like stack_end is an inclusive bound:

let stack_end = {
let end_addr = stack_start_addr + config.kernel_stack_size;
Page::containing_address(end_addr - 1u64)
};

So I think the stack pointer should be initialized with (stack_end + 1).start_address() instead.

Reported by klim on the Discord of Theseus OS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions