Code stub

This commit is contained in:
Alex
2022-10-13 09:20:08 +03:00
parent da269b5c6d
commit 6cf44540fb
12 changed files with 203 additions and 14 deletions

8
UEFI/src/FileLoader.c Normal file
View File

@@ -0,0 +1,8 @@
#include "FileLoader.h"
// https://wiki.osdev.org/Loading_files_under_UEFI
EFI_FILE *LoadFile(EFI_FILE *Directory, CHAR16 *Path, EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
return NULL;
}

5
UEFI/src/FileLoader.h Normal file
View File

@@ -0,0 +1,5 @@
#pragma once
#include <efi.h>
#include <efilib.h>
EFI_FILE *LoadFile(EFI_FILE *Directory, CHAR16 *Path, EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable);

23
UEFI/src/Lynx.c Normal file
View File

@@ -0,0 +1,23 @@
#include <efi.h>
#include <efilib.h>
#include "FileLoader.h"
EFI_STATUS EFIAPI efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
InitializeLib(ImageHandle, SystemTable);
SystemTable->BootServices->SetWatchdogTimer(0, 0, 0, NULL);
Print(L"Lynx Bootloader © EnderIce2 2022\n");
EFI_FILE *Kernel = LoadFile(NULL, L"kernel.fsys", ImageHandle, SystemTable);
if (Kernel == NULL)
{
Print(L"Kernel not found\n");
while (1)
asm("hlt");
}
while (1)
asm("hlt");
return EFI_SUCCESS;
}

0
UEFI/src/Paging.c Normal file
View File

0
UEFI/src/VirtualMemory.c Normal file
View File