diff options
author | Regia König | 2021-06-15 13:00:28 +0200 |
---|---|---|
committer | Regia König | 2021-06-15 13:00:28 +0200 |
commit | f04eab473388587ff6ec1be96969f79a182ac54a (patch) | |
tree | 6356f3c9d384258aae1100ed602c4545ba1e3a55 | |
parent | Get current return address in UefiMain (diff) | |
download | memtest86-f04eab473388587ff6ec1be96969f79a182ac54a.tar.gz memtest86-f04eab473388587ff6ec1be96969f79a182ac54a.tar.xz memtest86-f04eab473388587ff6ec1be96969f79a182ac54a.zip |
Get approximation of stack location
-rw-r--r-- | efi_memtest/MemtestEfi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/efi_memtest/MemtestEfi.c b/efi_memtest/MemtestEfi.c index 876d825..b2c13c1 100644 --- a/efi_memtest/MemtestEfi.c +++ b/efi_memtest/MemtestEfi.c @@ -12,6 +12,14 @@ extern EFI_SYSTEM_TABLE *gST; +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 @@ -89,6 +97,8 @@ UefiMain ( int_to_charr((unsigned long) ((unsigned long *) __builtin_return_address(0)), log, &length); print_log(log, length); } + + stack_check(); test_start(); |