efi_loader: EFI entry point should be EFIAPI
PATCH 1/1 efi_loader: EFI entry point should be EFIAPI
This is needed to run 'bootefi' from sandbox. I suspect StartImage() must have been broken too on x86.
--- cmd/bootefi.c | 2 +- include/efi.h | 2 +- lib/efi_loader/efi_boottime.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
cmd/bootefi.c +1 -1
@@ -96,7 +96,7 @@ static void *copy_fdt(void *fdt)static ulong efi_do_enter (void *image_handle,struct efi_system_table *st, - asmlinkage ulong (*entry)(void *image_handle, + EFIAPI ulong (*entry)(void *image_handle,struct efi_system_table *st)) {efi_status_t ret =EFI_LOAD_ERROR ;
include/efi.h +1 -1
@@ -19,7 +19,7 @@#include <linux/string.h> #include <linux/types.h> -#ifdef CONFIG_EFI_STUB_64BIT +#if defined(CONFIG_EFI_STUB_64BIT ) || defined(CONFIG_SANDBOX )/* EFI uses the Microsoft ABI which is not the default for GCC */ #define EFIAPI __attribute__((ms_abi))#else
lib/efi_loader/efi_boottime.c +1 -1
@@ -950,7 +950,7 @@ static efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,unsigned long *exit_data_size, s16 **exit_data) { - ulong (*entry)(void *image_handle, struct efi_system_table *st); + EFIAPI ulong (*entry)(void *image_handle, struct efi_system_table *st);struct efi_loaded_image *info = image_handle;EFI_ENTRY ("%p, %p, %p" , image_handle, exit_data_size, exit_data);
Signature · 1 line
2.13.5
PATCH 1/1 efi_loader: EFI entry point should be EFIAPI
Quoted 28 lines · Rob Clark
This is needed to run 'bootefi' from sandbox. I suspect
StartImage()must have been broken too on x86.Signed-off-by Rob Clark <[email protected]>--- cmd/bootefi.c | 2 +- include/efi.h | 2 +- lib/efi_loader/efi_boottime.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)cmd/bootefi.c +1
-1@@ -96,7 +96,7 @@ static void *copy_fdt(void *fdt)static ulong efi_do_enter (void *image_handle,struct efi_system_table *st, - asmlinkage ulong (*entry)(void *image_handle, + EFIAPI ulong (*entry)(void *image_handle,struct efi_system_table *st)) {efi_status_t ret =EFI_LOAD_ERROR ;include/efi.h +0
-0
include/efi.h line 22
Quoted 5 lines
include/efi.h +1
-1@@ -19,7 +19,7 @@#include <linux/string.h> #include <linux/types.h> -#ifdef CONFIG_EFI_STUB_64BIT +#if defined(CONFIG_EFI_STUB_64BIT ) || defined(CONFIG_SANDBOX )
btw, maybe we should have CONFIG_SANDBOX_$arch somehow so we don't have to assume SANDBOX==X86 (but I guess at least just having efi_loader work in sandbox on x86 is a nice first step)
BR,
-R
Quoted 19 lines
include/efi.h +0
-0/* EFI uses the Microsoft ABI which is not the default for GCC */ #define EFIAPI __attribute__((ms_abi))#else lib/efi_loader/efi_boottime.c +1
-2@@ -950,7 +950,7 @@ static efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,unsigned long *exit_data_size, s16 **exit_data) { - ulong (*entry)(void *image_handle, struct efi_system_table *st); + EFIAPI ulong (*entry)(void *image_handle, struct efi_system_table *st);struct efi_loaded_image *info = image_handle;EFI_ENTRY ("%p, %p, %p" , image_handle, exit_data_size, exit_data); --2.13.5
PATCH 1/1 efi_loader: EFI entry point should be EFIAPI
Quoted 32 lines · Rob Clark
Quoted 31 lines · Rob Clark
This is needed to run 'bootefi' from sandbox. I suspect
StartImage()must have been broken too on x86.Signed-off-by Rob Clark <[email protected]>--- cmd/bootefi.c | 2 +- include/efi.h | 2 +- lib/efi_loader/efi_boottime.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)cmd/bootefi.c +1
-1@@ -96,7 +96,7 @@ static void *copy_fdt(void *fdt)static ulong efi_do_enter (void *image_handle,struct efi_system_table *st, - asmlinkage ulong (*entry)(void *image_handle, + EFIAPI ulong (*entry)(void *image_handle,struct efi_system_table *st)) {efi_status_t ret =EFI_LOAD_ERROR ;include/efi.h +0
-0@@ -19,7 +19,7 @@#include <linux/string.h> #include <linux/types.h>
Quoted 6 lines
include/efi.h line 22
Quoted 2 lines
include/efi.h +1
-1-#ifdef CONFIG_EFI_STUB_64BIT +#if defined(CONFIG_EFI_STUB_64BIT ) || defined(CONFIG_SANDBOX )btw, maybe we should have CONFIG_SANDBOX_$arch somehow so we don't have to assume SANDBOX==X86 (but I guess at least just having
efi_loaderwork in sandbox on x86 is a nice first step)
Ah, sorry, read that too late. I use aarch64 systems productively these days, so I would certainly prefer if we could not block ourselves in on any x86_64 host dependency - even if it's just for make test :)
Alex
PATCH 1/1 efi_loader: EFI entry point should be EFIAPI
In reply to Rob ClarkQuoted 28 lines · Rob Clark
This is needed to run 'bootefi' from sandbox. I suspect
StartImage()must have been broken too on x86.Signed-off-by Rob Clark <[email protected]>--- cmd/bootefi.c | 2 +- include/efi.h | 2 +- lib/efi_loader/efi_boottime.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)cmd/bootefi.c +1
-1@@ -96,7 +96,7 @@ static void *copy_fdt(void *fdt)static ulong efi_do_enter (void *image_handle,struct efi_system_table *st, - asmlinkage ulong (*entry)(void *image_handle, + EFIAPI ulong (*entry)(void *image_handle,struct efi_system_table *st)) {efi_status_t ret =EFI_LOAD_ERROR ;include/efi.h +0
-0
include/efi.h line 22
Quoted 5 lines
include/efi.h +1
-1@@ -19,7 +19,7 @@#include <linux/string.h> #include <linux/types.h> -#ifdef CONFIG_EFI_STUB_64BIT +#if defined(CONFIG_EFI_STUB_64BIT ) || defined(CONFIG_SANDBOX )
This is incorrect for sandbox on non-x86_64 hosts. We should rather fix it in Kconfig I guess.
Alex
Quoted 17 lines
include/efi.h +0
-0/* EFI uses the Microsoft ABI which is not the default for GCC */ #define EFIAPI __attribute__((ms_abi))#else lib/efi_loader/efi_boottime.c +1
-1@@ -950,7 +950,7 @@ static efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,unsigned long *exit_data_size, s16 **exit_data) { - ulong (*entry)(void *image_handle, struct efi_system_table *st); + EFIAPI ulong (*entry)(void *image_handle, struct efi_system_table *st);struct efi_loaded_image *info = image_handle;EFI_ENTRY ("%p, %p, %p" , image_handle, exit_data_size, exit_data);
PATCH 1/1 efi_loader: EFI entry point should be EFIAPI
In reply to Rob ClarkQuoted 9 lines · Rob Clark
This is needed to run 'bootefi' from sandbox. I suspect
StartImage()must have been broken too on x86.Signed-off-by Rob Clark <[email protected]>--- cmd/bootefi.c | 2 +- include/efi.h | 2 +- lib/efi_loader/efi_boottime.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)