[metal] Fix some issues that were breaking UEFI boot

This commit is contained in:
tkchia 2023-05-25 21:39:57 +00:00
parent 1422e96b4e
commit 9840e19c8d
2 changed files with 4 additions and 1 deletions

View file

@ -73,6 +73,9 @@ _start:
// align stack to GetStackSize() so GetStackAddr() is fast
.weak ape_stack_memsz
mov $ape_stack_memsz,%r8d
mov $ape_stack_align,%r9d
cmp $_HOSTMETAL,%cl
cmove %r9d,%r8d
neg %r8
and %r8,%rsp
xor %ebp,%ebp

View file

@ -61,7 +61,7 @@ noasan texthead uint64_t __new_page(struct mman *mm) {
struct ReclaimedPage *rp = (struct ReclaimedPage *)(BANE + p);
_unassert(p == (p & PAGE_TA));
q = rp->next;
_unassert(q == (q & PAGE_TA));
_unassert(q == (q & PAGE_TA) || q == NOPAGE);
mm->frp = q;
return p;
}