Terminate UNDI and PXE before launching the payload to avoid problems
with DMA. * grub-core/commands/boot.c (grub_loader_noreturn): Rename to ... (grub_loader_flags): ... this. All users updated. (grub_loader_boot): Check for GRUB_LOADER_FLAG_NORETURN. * grub-core/loader/i386/pc/pxechainloader.c (grub_cmd_pxechain): Mark loader as GRUB_LOADER_FLAG_PXE_NOT_UNLOAD. * grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_shutdown): New function. (grub_pxe_restore): Likewise. (fini_hnd): New var. (GRUB_MOD_INIT): Register shutdown hook. (GRUB_MOD_FINI): Shutdown and unregister shutdown hook. * include/grub/loader.h (GRUB_LOADER_FLAG_NORETURN): New const. (GRUB_LOADER_FLAG_PXE_NOT_UNLOAD): Likewise. (grub_loader_set): Rename second argument to flags.
This commit is contained in:
parent
851ffadac2
commit
3c491b479c
5 changed files with 75 additions and 12 deletions
|
@ -28,11 +28,16 @@
|
|||
/* Check if a loader is loaded. */
|
||||
int EXPORT_FUNC (grub_loader_is_loaded) (void);
|
||||
|
||||
/* Set loader functions. NORETURN must be set to true, if BOOT won't return
|
||||
to the original state. */
|
||||
/* Set loader functions. */
|
||||
enum
|
||||
{
|
||||
GRUB_LOADER_FLAG_NORETURN = 1,
|
||||
GRUB_LOADER_FLAG_PXE_NOT_UNLOAD = 2,
|
||||
};
|
||||
|
||||
void EXPORT_FUNC (grub_loader_set) (grub_err_t (*boot) (void),
|
||||
grub_err_t (*unload) (void),
|
||||
int noreturn);
|
||||
grub_err_t (*unload) (void),
|
||||
int flags);
|
||||
|
||||
/* Unset current loader, if any. */
|
||||
void EXPORT_FUNC (grub_loader_unset) (void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue