summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-05-09 20:44:10 -0700
committerH. Peter Anvin <hpa@zytor.com>2011-05-09 20:44:10 -0700
commit23ffd64debdf013145da237fe34b8a12d70c228d (patch)
tree77f1cf53547b3439080d64ba32dd321c279b1890
parentcd89ddbde2e1680f537a32010d64fd5465330122 (diff)
downloadsyslinux-23ffd64debdf013145da237fe34b8a12d70c228d.tar.gz
pxe: fix the cleanup routinesyslinux-4.10-pre14
Observe that the routine called pxe_cleanup_isr really had become the previous routine called reset_pxe(). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/fs/pxe/isr.c4
-rw-r--r--core/fs/pxe/pxe.c30
-rw-r--r--core/fs/pxe/pxe.h2
3 files changed, 7 insertions, 29 deletions
diff --git a/core/fs/pxe/isr.c b/core/fs/pxe/isr.c
index be8d38f8..a476b7d0 100644
--- a/core/fs/pxe/isr.c
+++ b/core/fs/pxe/isr.c
@@ -196,7 +196,7 @@ void pxe_start_isr(void)
pxe_poll_thread, NULL);
}
-void pxe_cleanup_isr(void)
+int reset_pxe(void)
{
static __lowmem struct s_PXENV_UNDI_CLOSE undi_close;
@@ -210,4 +210,6 @@ void pxe_cleanup_isr(void)
uninstall_irq_vector(pxe_undi_info.IntNumber, pxe_isr, &pxe_irq_chain);
if (poll_thread)
kill_thread(poll_thread);
+
+ return undi_close.Status;
}
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c
index 867404ee..e553d8c7 100644
--- a/core/fs/pxe/pxe.c
+++ b/core/fs/pxe/pxe.c
@@ -963,9 +963,9 @@ static inline bool is_efi(const struct efi_struct *efi)
return (efi->magic == EFI_MAGIC) && (efi->len >= 83);
}
+#if 0
static void install_int18_hack(void)
{
-#if 0
static const uint8_t int18_hack[] =
{
0xcd, 0x18, /* int $0x18 */
@@ -1001,30 +1001,8 @@ static void install_int18_hack(void)
*(uint16_t *)(dst+46) = InitStack.seg;
}
}
-#endif
-}
-
-int reset_pxe(void)
-{
- static __lowmem struct s_PXENV_UDP_CLOSE udp_close;
- extern void gpxe_unload(void);
- int err = 0;
-
- pxe_idle_cleanup();
-
- pxe_call(PXENV_UDP_CLOSE, &udp_close);
-
- if (gpxe_funcs & 0x80) {
- /* gPXE special unload implemented */
- call16(gpxe_unload, &zero_regs, NULL);
-
- /* Locate the actual vendor stack... */
- err = pxe_init(true);
- }
-
- install_int18_hack();
- return err;
}
+#endif
/*
* This function unloads the PXE and UNDI stacks and
@@ -1052,14 +1030,12 @@ void unload_pxe(void)
uint16_t Status; /* All calls have this as the first member */
} unload_call;
- pxe_cleanup_isr();
+ printf("Called unload_pxe()...\n");
dprintf("FBM before unload = %d\n", BIOS_fbm);
err = reset_pxe();
- dprintf("FBM after reset_pxe = %d, err = %d\n", BIOS_fbm, err);
-
/* If we want to keep PXE around, we still need to reset it */
if (KeepPXE || err)
return;
diff --git a/core/fs/pxe/pxe.h b/core/fs/pxe/pxe.h
index e07fc353..d347f9e0 100644
--- a/core/fs/pxe/pxe.h
+++ b/core/fs/pxe/pxe.h
@@ -190,7 +190,7 @@ extern far_ptr_t pxe_irq_chain;
/* isr.c */
void pxe_init_isr(void);
void pxe_start_isr(void);
-void pxe_cleanup_isr(void);
+int reset_pxe(void);
/* pxe.c */
struct url_info;