From 5b30cacacf0f0ca6fb06bb34389f04b05ceb2b15 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 25 May 2025 09:56:46 +0200 Subject: kernel!: lots of changes, see commit details. refactor(hal): unify file naming and drop redundant architecture suffixes feat(build): rename kernel and bootloader to 'ne_kernel' and 'ne_bootz' refactor(memory): replace mm_get_phys_address with mm_get_page_addr feat(bitmap): track bitmap allocator usage and add out-of-memory error fix(heap): correct heap magic naming and alignment logic chore(fs): downgrade HeFS disk size check to warning chore(tools): clean up formatting in 'ping' and 'manual' docs(design): update OS_DESIGN.drawio to reflect Hypr86 and new layout Signed-off-by: Amlal El Mahrouss --- dev/kernel/HALKit/AMD64/HalControlRegisterAPI.s | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 dev/kernel/HALKit/AMD64/HalControlRegisterAPI.s (limited to 'dev/kernel/HALKit/AMD64/HalControlRegisterAPI.s') diff --git a/dev/kernel/HALKit/AMD64/HalControlRegisterAPI.s b/dev/kernel/HALKit/AMD64/HalControlRegisterAPI.s new file mode 100644 index 00000000..631d1d55 --- /dev/null +++ b/dev/kernel/HALKit/AMD64/HalControlRegisterAPI.s @@ -0,0 +1,45 @@ +/* ------------------------------------------- + + Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +.globl hal_write_cr3 +.globl hal_write_cr0 +.globl hal_read_cr2 +.globl hal_read_cr3 +.globl hal_read_cr0 +.globl hal_flush_tlb +.globl hal_invl_tlb + +.text + +hal_invl_tlb: + invlpg (%rcx) + retq + +hal_flush_tlb: + call hal_read_cr3 + mov %rax, %rcx + call hal_write_cr3 + retq + +hal_read_cr3: + movq %cr3, %rax + retq + +hal_read_cr0: + movq %cr0, %rax + retq + +hal_read_cr2: + movq %cr2, %rax + retq + +hal_write_cr3: + movq %rcx, %cr3 + retq + +hal_write_cr0: + movq %rcx, %cr0 + retq -- cgit v1.2.3