[metal] Fix some issues that were breaking UEFI boot (#822)

Co-authored-by: tkchia <tkchia-cosmo@gmx.com>
This commit is contained in:
tkchia 2023-05-27 09:29:25 +08:00 committed by GitHub
parent 5c40800d69
commit 90645f4dac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;
}