From 9fdca5bbe11e384198372b86a6b81d5d9e79fa16 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 28 Sep 2017 14:11:51 -0400 Subject: Don't use uefi_call_wrapper(), ever. I'm pretty done with typing uefi_call_wrapper() and counting arguments every time. Instead, just make the compiler error if we don't have ms_abi. Also, make it so nothing can use uefi_call_wrapper() directly. Signed-off-by: Peter Jones --- include/hexdump.h | 4 ++-- include/replacements.h | 2 ++ include/simple_file.h | 2 -- include/tpm.h | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/hexdump.h b/include/hexdump.h index c4ffcaec..df3a17a4 100644 --- a/include/hexdump.h +++ b/include/hexdump.h @@ -90,11 +90,11 @@ hexdump(UINT8 *data, UINTN size) sz = format_hex(data+offset, size-offset, hexbuf); if (sz == 0) return; - uefi_call_wrapper(BS->Stall, 1, 200000); + msleep(200000); format_text(data+offset, size-offset, txtbuf); Print(L"%08x %s %s\n", display_offset, hexbuf, txtbuf); - uefi_call_wrapper(BS->Stall, 1, 200000); + msleep(200000); display_offset += sz; offset += sz; diff --git a/include/replacements.h b/include/replacements.h index 5873a720..ab2a5a58 100644 --- a/include/replacements.h +++ b/include/replacements.h @@ -29,6 +29,8 @@ #ifndef SHIM_REPLACEMENTS_H #define SHIM_REPLACEMENTS_H +extern EFI_SYSTEM_TABLE *get_active_systab(void); + typedef enum { VERIFIED_BY_NOTHING, VERIFIED_BY_CERT, diff --git a/include/simple_file.h b/include/simple_file.h index 8d25a761..7b019654 100644 --- a/include/simple_file.h +++ b/include/simple_file.h @@ -9,8 +9,6 @@ EFI_STATUS simple_file_read_all(EFI_FILE *file, UINTN *size, void **buffer); EFI_STATUS simple_file_write_all(EFI_FILE *file, UINTN size, void *buffer); -void -simple_file_close(EFI_FILE *file); EFI_STATUS simple_dir_read_all(EFI_HANDLE image, CHAR16 *name, EFI_FILE_INFO **Entries, int *count); diff --git a/include/tpm.h b/include/tpm.h index 38642390..746e871f 100644 --- a/include/tpm.h +++ b/include/tpm.h @@ -188,3 +188,4 @@ typedef UINT32 TCG_EVENTTYPE; #define PE_COFF_IMAGE 0x0000000000000010 #endif /* SHIM_TPM_H */ +// vim:fenc=utf-8:tw=75 -- cgit v1.2.3