diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-02 08:37:13 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-02 08:37:13 +0100 |
| commit | 95a887d120b7955bb02f582339d0536696a4cc79 (patch) | |
| tree | 1a240736a98566fce758b57108a1e623a378c89f /Private/NewBoot/BootKit/BootKit.hxx | |
| parent | 7ceadad6f8d24e98098a00531b24fa2c89fb76ad (diff) | |
Kernel & Bootloader: Improvements and Fix ATA Read and Write problem.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/BootKit/BootKit.hxx')
| -rw-r--r-- | Private/NewBoot/BootKit/BootKit.hxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx index edd8015b..2b57ec56 100644 --- a/Private/NewBoot/BootKit/BootKit.hxx +++ b/Private/NewBoot/BootKit/BootKit.hxx @@ -93,35 +93,39 @@ class BFileReader final { #include <BootKit/Platform.hxx> #include <BootKit/Protocol.hxx> +/***********************************************************************************/ +/// Provide some useful processor features. +/***********************************************************************************/ + #ifdef __EFI_x86_64__ -inline void out8(UInt16 port, UInt8 value) { +inline void Out8(UInt16 port, UInt8 value) { asm volatile("outb %%al, %1" : : "a"(value), "Nd"(port) : "memory"); } -inline void out16(UInt16 port, UInt16 value) { +inline void Out16(UInt16 port, UInt16 value) { asm volatile("outw %%ax, %1" : : "a"(value), "Nd"(port) : "memory"); } -inline void out32(UInt16 port, UInt32 value) { +inline void Out32(UInt16 port, UInt32 value) { asm volatile("outl %%eax, %1" : : "a"(value), "Nd"(port) : "memory"); } -inline UInt8 in8(UInt16 port) { +inline UInt8 In8(UInt16 port) { UInt8 value = 0UL; asm volatile("inb %1, %%al" : "=a"(value) : "Nd"(port) : "memory"); return value; } -inline UInt16 in16(UInt16 port) { +inline UInt16 In16(UInt16 port) { UInt16 value = 0UL; asm volatile("inw %1, %%ax" : "=a"(value) : "Nd"(port) : "memory"); return value; } -inline UInt32 in32(UInt16 port) { +inline UInt32 In32(UInt16 port) { UInt32 value = 0UL; asm volatile("inl %1, %%eax" : "=a"(value) : "Nd"(port) : "memory"); |
