From aa41490e7a44fb05566e34f17d06bcf8ab8889f9 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 27 Nov 2023 15:44:26 +0000 Subject: [PATCH] [build] Provide real-mode call wrappers only for i386 We currently attempt to provide real-mode call wrappers for any architecture that is not x86_64. Invert this logic to provide real-mode call wrappers only for the i386 architecture. Signed-off-by: Michael Brown --- src/wimboot.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/wimboot.h b/src/wimboot.h index 7253a62..5474b06 100644 --- a/src/wimboot.h +++ b/src/wimboot.h @@ -130,22 +130,19 @@ static inline void bochsbp ( void ) { /* Mark parameter as unused */ #define __unused __attribute__ (( unused )) -#if __x86_64__ +#ifdef __i386__ +extern void call_real ( struct bootapp_callback_params *params ); +extern void call_interrupt ( struct bootapp_callback_params *params ); +extern void __attribute__ (( noreturn )) reboot ( void ); +#else static inline void call_real ( struct bootapp_callback_params *params ) { - /* Not available in 64-bit mode */ ( void ) params; } static inline void call_interrupt ( struct bootapp_callback_params *params ) { - /* Not available in 64-bit mode */ ( void ) params; } static inline void reboot ( void ) { - /* Not available in 64-bit mode */ } -#else -extern void call_real ( struct bootapp_callback_params *params ); -extern void call_interrupt ( struct bootapp_callback_params *params ); -extern void __attribute__ (( noreturn )) reboot ( void ); #endif extern void __attribute__ (( noreturn, format ( printf, 1, 2 ) ))