diff options
| author | Amlal <amlal@nekernel.org> | 2025-04-27 17:30:36 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-04-27 17:30:36 +0200 |
| commit | cb2f383f45dda8d1cdcef0b87fe4c70243659701 (patch) | |
| tree | f109c3c44fa3f142d34f8ca61cfa69672e556614 /dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc | |
| parent | 14d5ee9e0cfededddfceec73d5dfa8a2fcda6c5d (diff) | |
dev, kernel: AHCI, HeFS filesystem, SysChk, and BootSATA improvements.
what?
- AHCI now writes to disk, forgot to do it.
- Codebase's architecutre has been used to reuse the Generic+AHCI driver in SysChk for AHCI. (tradeoff is 256K in size instead of 36K)
- DriveMgr now detects EPM.
- And HeFS is still being worked on.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc')
| -rw-r--r-- | dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc b/dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc index e6d57be2..2fb6ad4c 100644 --- a/dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc +++ b/dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc @@ -15,26 +15,20 @@ namespace Detail { STATIC ::Kernel::Detail::AMD64::InterruptDescriptorAMD64 kInterruptVectorTable[kKernelIdtSize] = {}; -#if 0 - STATIC void hal_set_irq_mask(UInt8 irql) [[maybe_unused]] - { - UInt16 port; - UInt8 value; - - if (irql < 8) - { - port = kPICData; - } - else - { - port = kPIC2Data; - irql -= 8; - } - - value = rt_in8(port) | (1 << irql); - rt_out8(port, value); - } -#endif // make gcc shut up + STATIC ATTRIBUTE(unused) void hal_set_irq_mask(UInt8 irql) [[maybe_unused]] { + UInt16 port; + UInt8 value; + + if (irql < 8) { + port = kPICData; + } else { + port = kPIC2Data; + irql -= 8; + } + + value = rt_in8(port) | (1 << irql); + rt_out8(port, value); + } STATIC void hal_clear_irq_mask(UInt8 irql) [[maybe_unused]] { UInt16 port; @@ -70,7 +64,9 @@ namespace Detail { /// @param gdt /// @return Void GDTLoader::Load(Register64& gdt) { +#ifndef __NE_MODULAR_KERNEL_COMPONENTS__ hal_load_gdt(gdt); +#endif // __NE_MODULAR_KERNEL_COMPONENTS__ } Void IDTLoader::Load(Register64& idt) { @@ -98,7 +94,9 @@ Void IDTLoader::Load(Register64& idt) { Detail::hal_enable_pit(kPITTickForScheduler); +#ifndef __NE_MODULAR_KERNEL_COMPONENTS__ hal_load_idt(idt); +#endif // __NE_MODULAR_KERNEL_COMPONENTS__ rt_sti(); } |
