mem: change buddy allocator api
the buddy allocator now returns HHDM addresses as void* rather than zero-based adddresses as paddr_t. it also automatically searches regions now, rather than requiring a (struct mem_region_header *) for each alloc/free
This commit is contained in:
parent
a506cc481e
commit
b8fa30c8ed
4 changed files with 74 additions and 6 deletions
20
mem/cr3.S
20
mem/cr3.S
|
|
@ -8,3 +8,23 @@ cr3_read:
|
|||
cr3_write:
|
||||
movq %rdi, %cr3
|
||||
ret
|
||||
|
||||
.global rsp_read
|
||||
rsp_read:
|
||||
movq %rsp, %rax
|
||||
ret
|
||||
|
||||
.global rbp_read
|
||||
rbp_read:
|
||||
movq %rbp, %rax
|
||||
ret
|
||||
|
||||
.global rsp_write
|
||||
rsp_write:
|
||||
movq %rdi, %rsp
|
||||
ret
|
||||
|
||||
.global rbp_write
|
||||
rbp_write:
|
||||
movq %rdi, %rbp
|
||||
ret
|
||||
|
|
|
|||
Loading…
Reference in a new issue