diff options
author | Michael Brown <mcb30@etherboot.org> | 2006-08-24 18:43:28 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2006-08-24 18:43:28 +0000 |
commit | 19883779ba61d1ba2fd29f80ad245b397aaa64a9 (patch) | |
tree | 641a875d46740e4d390d5128e8938115e4a1c12c /src/arch/i386/interface | |
parent | 028bc034e44d45350578f06a5b98d446e33183cd (diff) | |
download | ipxe-19883779ba61d1ba2fd29f80ad245b397aaa64a9.tar.gz |
Use TEXT16_CODE() rather than manually specifying ".code16" etc, since
our manual ".code32" will break a KEEP_IT_REAL build.
Diffstat (limited to 'src/arch/i386/interface')
-rw-r--r-- | src/arch/i386/interface/pcbios/int13.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/arch/i386/interface/pcbios/int13.c b/src/arch/i386/interface/pcbios/int13.c index 1c1009c14..abba2bde8 100644 --- a/src/arch/i386/interface/pcbios/int13.c +++ b/src/arch/i386/interface/pcbios/int13.c @@ -391,24 +391,20 @@ static void hook_int13 ( void ) { * should not chain to the previous handler. (The wrapper * clears CF and OF before calling int13()). */ - __asm__ __volatile__ ( ".section \".text16\", \"ax\", @progbits\n\t" - ".code16\n\t" - "\nint13_wrapper:\n\t" - "orb $0, %%al\n\t" /* clear CF and OF */ - "pushl %0\n\t" /* call int13() */ - "pushw %%cs\n\t" - "call prot_call\n\t" - "jo 1f\n\t" /* chain if OF not set */ - "pushfw\n\t" - "lcall *%%cs:int13_vector\n\t" - "\n1:\n\t" - "call 2f\n\t" /* return with flags intact */ - "lret $2\n\t" - "\n2:\n\t" - "ret $4\n\t" - ".previous\n\t" - ".code32\n\t" : : - "i" ( int13 ) ); + __asm__ __volatile__ ( + TEXT16_CODE ( "\nint13_wrapper:\n\t" + "orb $0, %%al\n\t" /* clear CF and OF */ + "pushl %0\n\t" /* call int13() */ + "pushw %%cs\n\t" + "call prot_call\n\t" + "jo 1f\n\t" /* chain if OF not set */ + "pushfw\n\t" + "lcall *%%cs:int13_vector\n\t" + "\n1:\n\t" + "call 2f\n\t" /* return with flags intact */ + "lret $2\n\t" + "\n2:\n\t" + "ret $4\n\t" ) : : "i" ( int13 ) ); hook_bios_interrupt ( 0x13, ( unsigned int ) int13_wrapper, &int13_vector ); |