[SeaBIOS] [PATCH 2/2] Eliminate FUNCFSEG - only force portions of inline asm to f-segment

Kevin O'Connor kevin at koconnor.net
Wed Dec 3 19:07:35 CET 2014


On Wed, Dec 03, 2014 at 01:01:48PM -0500, Kevin O'Connor wrote:
> The FUNCFSEG macro was introduced to force a C function into the
> f-segment.  This was needed for some C functions that used inline
> assembler that contained some 16bit code.  Instead of forcing the
> entire C function into the f-segment, just force the small subset of
> inline assembler into the f-segment.
> 
> Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
> ---
>  src/stacks.c | 12 ++++++------
>  src/types.h  |  4 ----
>  2 files changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/src/stacks.c b/src/stacks.c
> index c6b7e8b..b2e2447 100644
> --- a/src/stacks.c
> +++ b/src/stacks.c
> @@ -63,8 +63,8 @@ call32_smm_post(void)
>      inb(PORT_CMOS_DATA);
>  }
>  
> -#define ASM32_SWITCH16 "  .code16\n"
> -#define ASM32_BACK32   "  .code32\n"
> +#define ASM32_SWITCH16 "  .pushsection .text.fseg." UNIQSEC "\n  .code16\n"

That should have read ".text.32fseg".  I've fixed it locally.

-Kevin



More information about the SeaBIOS mailing list