mirror of
https://github.com/Fennix-Project/Lynx.git
synced 2025-09-12 20:44:19 +00:00
Code stub
This commit is contained in:
8
UEFI/src/FileLoader.c
Normal file
8
UEFI/src/FileLoader.c
Normal 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
5
UEFI/src/FileLoader.h
Normal 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
23
UEFI/src/Lynx.c
Normal 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
0
UEFI/src/Paging.c
Normal file
0
UEFI/src/VirtualMemory.c
Normal file
0
UEFI/src/VirtualMemory.c
Normal file
Reference in New Issue
Block a user