From 4dbab5d1e4da5985924f9da57e8c42e2955716df Mon Sep 17 00:00:00 2001 From: Regina König Date: Fri, 30 Jul 2021 17:45:24 +0200 Subject: Outcomment code for debugging --- efi_memtest/MemtestEfi.c | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/efi_memtest/MemtestEfi.c b/efi_memtest/MemtestEfi.c index 0d2d472..48f705e 100644 --- a/efi_memtest/MemtestEfi.c +++ b/efi_memtest/MemtestEfi.c @@ -12,17 +12,18 @@ extern EFI_SYSTEM_TABLE *gST; -// TODO remove -int global = 1; +// TODO remove. Just for debugging +/*int global = 1;*/ -void stack_check() { +// TODO remove. Just for debugging +/*void stack_check() { int i; int *p = &i; char log[32] = "stack ptr = "; int length = 12; int_to_charr((unsigned long) p, log, &length); print_log(log, length); -} +}*/ EFI_STATUS EFIAPI @@ -44,22 +45,24 @@ UefiMain ( print_log(msg, sizeof(msg) - 1); } - - if (logflag) { + // TODO remove. Just for debugging +/* if (logflag) { char log[41] = "Address of UefiMain: "; int length = 21; int_to_charr((unsigned long)UefiMain, log, &length); print_log(log, length); - } + }*/ - if (logflag) { + // TODO remove. Just for debugging +/* if (logflag) { char log[43] = "Address of test_start: "; int length = 23; int_to_charr((unsigned long)test_start, log, &length); print_log(log, length); - } + }*/ - VOID *LoadedImage; + // TODO remove. Just for debugging +/* VOID *LoadedImage; EFI_STATUS status = SystemTable->BootServices->OpenProtocol( ImageHandle, &gEfiLoadedImageProtocolGuid, @@ -85,30 +88,34 @@ UefiMain ( int_to_charr(size, log, &length); print_log(log, length); } - } + }*/ - if (logflag) { + // TODO remove. Just for debugging +/* if (logflag) { char log[45] = "Address of SystemTable = "; int length = 25; int_to_charr((unsigned long) SystemTable, log, &length); print_log(log, length); - } + }*/ - if (logflag) { + // TODO remove. Just for debugging +/* if (logflag) { char log[45] = "Current return address = "; int length = 25; int_to_charr((unsigned long) ((unsigned long *) __builtin_return_address(0)), log, &length); print_log(log, length); - } + }*/ - stack_check(); + // TODO remove. Just for debugging +/* stack_check();*/ - if (logflag) { + // TODO remove. Just for debugging +/* if (logflag) { char log[49] = "Address of global variable = "; int length = 29; int_to_charr((unsigned long) &global, log, &length); print_log(log, length); - } + }*/ test_start(); @@ -117,8 +124,6 @@ UefiMain ( print_log(msg, sizeof(msg) - 1); } - //while(1) {} - SystemTable->ConOut->SetCursorPosition(SystemTable->ConOut, 0, 25); return EFI_SUCCESS; -- cgit v1.2.3-55-g7522