[FREELDR] Minor code cleanup in arch/uefi files

This commit is contained in:
Hermès Bélusca-Maïto 2024-03-09 11:27:00 +01:00
parent 1e409e6902
commit f4ff0aba2f
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
5 changed files with 5 additions and 18 deletions

View file

@ -7,8 +7,6 @@
#include <uefildr.h>
#include <debug.h>
#ifndef _M_ARM
/* TODO: Handle this with custom Disk / partition setup */
UCHAR

View file

@ -98,7 +98,7 @@ UefiGetBootPartitionEntry(
{
TRACE("Boot PartitionNumber is 0\n");
/* The OffsetToBoot is equal to the RootIdentifier */
PartitionNum = 1;
PartitionNum = FIRST_PARTITION;
}
*BootPartition = PartitionNum;
@ -395,7 +395,7 @@ UefiSetupBlockDevices(VOID)
PcBiosDiskCount = 0;
UefiBootRootIdentifier = 0;
/* 1) Setup a list of boothandles by using the LocateHandle protocol */
/* 1) Setup a list of boot handles by using the LocateHandle protocol */
Status = GlobalSystemTable->BootServices->LocateHandle(ByProtocol, &bioGuid, NULL, &handle_size, handles);
handles = MmAllocateMemoryWithType(handle_size, LoaderFirmwareTemporary);
Status = GlobalSystemTable->BootServices->LocateHandle(ByProtocol, &bioGuid, NULL, &handle_size, handles);

View file

@ -52,7 +52,7 @@ MachInit(const char *CmdLine)
MachVtbl.HwIdle = UefiHwIdle;
/* Setup GOP */
if (UefiInitalizeVideo() != EFI_SUCCESS)
if (UefiInitializeVideo() != EFI_SUCCESS)
{
ERR("Failed to setup GOP\n");
}

View file

@ -28,7 +28,7 @@ EFI_GUID EfiGraphicsOutputProtocol = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
/* FUNCTIONS ******************************************************************/
EFI_STATUS
UefiInitalizeVideo(VOID)
UefiInitializeVideo(VOID)
{
EFI_STATUS Status;
EFI_GRAPHICS_OUTPUT_PROTOCOL* gop = NULL;

View file

@ -7,24 +7,17 @@
#include <machine.h>
EFI_STATUS
UefiMachInit(_In_ EFI_HANDLE ImageHandle,
_In_ EFI_SYSTEM_TABLE *SystemTable);
VOID
UefiConsPutChar(int Ch);
BOOLEAN
UefiConsKbHit(VOID);
VOID
UefiConsSetCursor(UINT32 Col, UINT32 Row);
int
UefiConsGetCh(void);
EFI_STATUS
UefiInitalizeVideo(VOID);
UefiInitializeVideo(VOID);
VOID
UefiVideoClearScreen(UCHAR Attr);
@ -47,10 +40,6 @@ UefiVideoSetTextCursorPosition(UCHAR X, UCHAR Y);
VOID
UefiVideoHideShowTextCursor(BOOLEAN Show);
VOID
UefiVideoOutputChar(UCHAR Char, unsigned X,
unsigned Y, ULONG FgColor, ULONG BgColor);
VOID
UefiVideoPutChar(int Ch, UCHAR Attr,
unsigned X, unsigned Y);