diff options
Diffstat (limited to 'dev/boot/src/HEL')
| -rw-r--r-- | dev/boot/src/HEL/AMD64/BootAPI.S | 45 | ||||
| -rw-r--r-- | dev/boot/src/HEL/AMD64/BootEFI.cc | 2 | ||||
| -rw-r--r-- | dev/boot/src/HEL/AMD64/BootPlatform.cc | 56 | ||||
| -rw-r--r-- | dev/boot/src/HEL/ARM64/BootEFI.cc | 2 |
4 files changed, 47 insertions, 58 deletions
diff --git a/dev/boot/src/HEL/AMD64/BootAPI.S b/dev/boot/src/HEL/AMD64/BootAPI.S index 963ef46a..9cc15918 100644 --- a/dev/boot/src/HEL/AMD64/BootAPI.S +++ b/dev/boot/src/HEL/AMD64/BootAPI.S @@ -58,3 +58,48 @@ boot_read_cr3: boot_write_cr3: mov cr3, rcx ret + +.section .text + +.extern rt_wait_400ns + +.global rt_out8 +.global rt_out16 +.global rt_out32 + +.global rt_in8 +.global rt_in16 +.global rt_in32 + +rt_out8: + mov al, dl + mov dx, cx + out dx, al + ret + +rt_out16: + mov ax, dx + mov dx, cx + out dx, ax + ret + +rt_out32: + mov eax, edx + mov edx, ecx + out dx, eax + ret + +rt_in8: + mov dx, cx + in al, dx + ret + +rt_in16: + mov edx, ecx + in ax, dx + ret + +rt_in32: + mov rdx, rcx + in eax, dx + ret
\ No newline at end of file diff --git a/dev/boot/src/HEL/AMD64/BootEFI.cc b/dev/boot/src/HEL/AMD64/BootEFI.cc index 8a920e1a..85b7f729 100644 --- a/dev/boot/src/HEL/AMD64/BootEFI.cc +++ b/dev/boot/src/HEL/AMD64/BootEFI.cc @@ -229,7 +229,7 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle, handover_hdr->f_FirmwareVendorLen = Boot::BStrLen(sys_table->FirmwareVendor); // Assign to global 'kHandoverHeader'. - WideChar kernel_path[256U] = L"vmkrnl.efi"; + WideChar kernel_path[256U] = L"krnl.efi"; UInt32 kernel_path_sz = 256U; if (ST->RuntimeServices->GetVariable(L"/props/boot_path", kEfiGlobalNamespaceVarGUID, nullptr, &kernel_path_sz, kernel_path) != kEfiOk) diff --git a/dev/boot/src/HEL/AMD64/BootPlatform.cc b/dev/boot/src/HEL/AMD64/BootPlatform.cc index a06b8aa0..1a1f9b89 100644 --- a/dev/boot/src/HEL/AMD64/BootPlatform.cc +++ b/dev/boot/src/HEL/AMD64/BootPlatform.cc @@ -38,62 +38,6 @@ EXTERN_C void rt_std() asm volatile("std"); } -EXTERN_C void rt_out8(UInt16 port, UInt8 value) -{ - asm volatile("outb %%al, %1" - : - : "a"(value), "Nd"(port) - : "memory"); -} - -EXTERN_C void rt_out16(UInt16 port, UInt16 value) -{ - asm volatile("outw %%ax, %1" - : - : "a"(value), "Nd"(port) - : "memory"); -} - -EXTERN_C void rt_out32(UInt16 port, UInt32 value) -{ - asm volatile("outl %%eax, %1" - : - : "a"(value), "Nd"(port) - : "memory"); -} - -EXTERN_C UInt8 rt_in8(UInt16 port) -{ - UInt8 value; - asm volatile("inb %1, %%al" - : "=a"(value) - : "Nd"(port) - : "memory"); - - return value; -} - -EXTERN_C UInt16 rt_in16(UInt16 port) -{ - UInt16 value; - asm volatile("inw %%dx, %%ax" - : "=a"(value) - : "d"(port)); - - return value; -} - -EXTERN_C UInt32 rt_in32(UInt16 port) -{ - UInt32 value; - asm volatile("inl %1, %%eax" - : "=a"(value) - : "Nd"(port) - : "memory"); - - return value; -} - #else #include <HALKit/AMD64/Processor.h> diff --git a/dev/boot/src/HEL/ARM64/BootEFI.cc b/dev/boot/src/HEL/ARM64/BootEFI.cc index e071def1..9132cec1 100644 --- a/dev/boot/src/HEL/ARM64/BootEFI.cc +++ b/dev/boot/src/HEL/ARM64/BootEFI.cc @@ -226,7 +226,7 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle, handover_hdr->f_FirmwareVendorLen = Boot::BStrLen(sys_table->FirmwareVendor); - Boot::BootFileReader reader_kernel(L"vmkrnl.efi", image_handle); + Boot::BootFileReader reader_kernel(L"krnl.efi", image_handle); reader_kernel.ReadAll(0); |
