mem: add basic slab allocator
This commit is contained in:
parent
4239ca1b7e
commit
74a58d6641
5 changed files with 117 additions and 0 deletions
30
mem/reg.S
Normal file
30
mem/reg.S
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
.global cr3_read
|
||||
cr3_read:
|
||||
movq %cr3, %rax
|
||||
ret
|
||||
|
||||
.global cr3_write
|
||||
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