mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28:30 +00:00
Get deathstar demo working again on metal
This commit is contained in:
parent
15ea0524b3
commit
bd6d9ff99a
6 changed files with 21 additions and 17 deletions
|
@ -45,7 +45,7 @@
|
|||
#ifdef __x86_64__
|
||||
|
||||
#define INVERT(x) (BANE + PHYSICAL((uintptr_t)(x)))
|
||||
#define NOPAGE ((uint64_t) - 1)
|
||||
#define NOPAGE ((uint64_t)-1)
|
||||
|
||||
#define APE_STACK_VADDR \
|
||||
({ \
|
||||
|
@ -69,9 +69,9 @@ texthead uint64_t __new_page(struct mman *mm) {
|
|||
if (p != NOPAGE) {
|
||||
uint64_t q;
|
||||
struct ReclaimedPage *rp = (struct ReclaimedPage *)(BANE + p);
|
||||
unassert(p == (p & PAGE_TA));
|
||||
/* unassert(p == (p & PAGE_TA)); */
|
||||
q = rp->next;
|
||||
unassert(q == (q & PAGE_TA) || q == NOPAGE);
|
||||
/* unassert(q == (q & PAGE_TA) || q == NOPAGE); */
|
||||
mm->frp = q;
|
||||
return p;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ void __ref_pages(struct mman *mm, uint64_t *pml4t, uint64_t ps, uint64_t size) {
|
|||
*/
|
||||
static void __reclaim_page(struct mman *mm, uint64_t p) {
|
||||
struct ReclaimedPage *rp = (struct ReclaimedPage *)(BANE + p);
|
||||
unassert(p == (p & PAGE_TA));
|
||||
/* unassert(p == (p & PAGE_TA)); */
|
||||
rp->next = mm->frp;
|
||||
mm->frp = p;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue