diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2011-04-04 13:10:49 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-04-04 13:10:49 -0700 |
commit | e17717c8f0c286efcbc785b64b16baf1d8e13df5 (patch) | |
tree | e1f12ad33ea977c46a7a24dbc8339dcce94b34fb /core/fs | |
parent | 47158504d44a151c61461ba1acdef5b4240bdc30 (diff) | |
download | syslinux-e17717c8f0c286efcbc785b64b16baf1d8e13df5.tar.gz |
pxe: disable the "force INT 18h" hack
It seems to break as many machines as it fixes, so disable it for now.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'core/fs')
-rw-r--r-- | core/fs/pxe/pxe.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c index 12bbdad0..21d27e5c 100644 --- a/core/fs/pxe/pxe.c +++ b/core/fs/pxe/pxe.c @@ -1576,6 +1576,11 @@ static int pxe_fs_init(struct fs_info *fs) * This manipulates the real-mode InitStack directly. It relies on this * *not* being a currently active stack, i.e. the former * USE_PXE_PROVIDED_STACK no longer works. + * + * XXX: Disable this until we can find a better way to discriminate + * between BIOSes that are broken on BEV return and BIOSes which are + * broken on INT 18h. Keying on the EFI CSM turns out to cause more + * problems than it solves. */ extern far_ptr_t InitStack; @@ -1595,9 +1600,10 @@ static inline bool is_efi(const struct efi_struct *efi) return (efi->magic == EFI_MAGIC) && (efi->len >= 83); } -static void install_efi_csm_hack(void) +static void install_int18_hack(void) { - static const uint8_t efi_csm_hack[] = +#if 0 + static const uint8_t int18_hack[] = { 0xcd, 0x18, /* int $0x18 */ 0xea, 0xf0, 0xff, 0x00, 0xf0, /* ljmpw $0xf000,$0xfff0 */ @@ -1621,17 +1627,18 @@ static void install_efi_csm_hack(void) if (efi) { uint8_t *src = GET_PTR(InitStack); - uint8_t *dst = src - sizeof efi_csm_hack; + uint8_t *dst = src - sizeof int18_hack; memmove(dst, src, 52); - memcpy(dst+52, efi_csm_hack, sizeof efi_csm_hack); - InitStack.offs -= sizeof efi_csm_hack; + memcpy(dst+52, int18_hack, sizeof int18_hack); + InitStack.offs -= sizeof int18_hack; /* Clobber the return address */ *(uint16_t *)(dst+44) = OFFS_WRT(dst+52, InitStack.seg); *(uint16_t *)(dst+46) = InitStack.seg; } } +#endif } int reset_pxe(void) @@ -1652,7 +1659,7 @@ int reset_pxe(void) err = pxe_init(true); } - install_efi_csm_hack(); + install_int18_hack(); return err; } |