blob: 3f142890ca0bbe5e373dfdebfbe8b4f823e4bc41 (
plain) (
tree)
|
|
#include "Uefi.h"
#include "Library/UefiLib.h"
#include "Library/UefiApplicationEntryPoint.h"
#include "Guid/FileSystemInfo.h"
#include "main.h" // TODO move into main dir
#include "memtest86+/logger.h"
#include "memtest86+/display.h"
#include "logger_config.h"
extern EFI_SYSTEM_TABLE *gST;
EFI_STATUS
EFIAPI
UefiMain (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
SystemTable->ConOut->ClearScreen(SystemTable->ConOut);
SystemTable->ConOut->SetCursorPosition(SystemTable->ConOut, 0, 0);
trace_init("Starting MemtestEfi");
init_logger();
//while(1);
if (logflag) {
char msg[] = "MemtestEfi started";
print_log(msg, sizeof(msg) - 1);
}
{
char log[43] = "Address of UefiMain: ";
int length = 23;
int_to_charr((unsigned long)UefiMain, log, &length);
print_log(log, length);
}
{
char log[43] = "Address of test_start: ";
int length = 23;
int_to_charr((unsigned long)test_start, log, &length);
print_log(log, length);
}
test_start();
if (logflag) {
char msg[] = "MemtestEfi finished!\n";
print_log(msg, sizeof(msg) - 1);
}
//while(1) {}
SystemTable->ConOut->SetCursorPosition(SystemTable->ConOut, 0, 25);
return EFI_SUCCESS;
}
|