Delay calling the device cleanup routines until the absolute last
moment. We were cleaning up after PXE too early and the module dependancy code would not be able to load any files if it needed too.
This commit is contained in:
parent
8a0b95d610
commit
cc3d937224
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61659
@ -152,6 +152,7 @@ elf_exec(struct preloaded_file *fp)
|
||||
|
||||
printf("Entering %s at 0x%lx...\n", fp->f_name, hdr->e_entry);
|
||||
closeall();
|
||||
dev_cleanup();
|
||||
alpha_pal_imb();
|
||||
(*(void (*)())hdr->e_entry)(ffp_save, ptbr_save,
|
||||
BOOTINFO_MAGIC, &bootinfo_v1, 1, 0);
|
||||
|
@ -110,11 +110,6 @@ command_boot(int argc, char *argv[])
|
||||
if (archsw.arch_autoload() != 0)
|
||||
return(CMD_ERROR);
|
||||
|
||||
/* Call cleanup routines */
|
||||
for (i = 0; devsw[i] != NULL; ++i)
|
||||
if (devsw[i]->dv_cleanup != NULL)
|
||||
(devsw[i]->dv_cleanup)();
|
||||
|
||||
/* Call the exec handler from the loader matching the kernel */
|
||||
file_formats[fp->f_loader]->l_exec(fp);
|
||||
return(CMD_ERROR);
|
||||
|
@ -314,3 +314,5 @@ extern struct arch_switch archsw;
|
||||
|
||||
/* This must be provided by the MD code, but should it be in the archsw? */
|
||||
extern void delay(int delay);
|
||||
|
||||
extern void dev_cleanup(void);
|
||||
|
@ -131,3 +131,14 @@ hexdump(caddr_t region, size_t len)
|
||||
}
|
||||
pager_close();
|
||||
}
|
||||
|
||||
void
|
||||
dev_cleanup(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Call cleanup routines */
|
||||
for (i = 0; devsw[i] != NULL; ++i)
|
||||
if (devsw[i]->dv_cleanup != NULL)
|
||||
(devsw[i]->dv_cleanup)();
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ aout_exec(struct preloaded_file *fp)
|
||||
bi->bi_symtab = ssym; /* XXX this is only the primary kernel symtab */
|
||||
bi->bi_esymtab = esym;
|
||||
|
||||
dev_cleanup();
|
||||
__exec((void *)entry, boothowto, bootdev, 0, 0, 0, bootinfop);
|
||||
|
||||
panic("exec returned");
|
||||
|
@ -84,6 +84,7 @@ elf_exec(struct preloaded_file *fp)
|
||||
printf("Start @ 0x%lx ...\n", entry);
|
||||
#endif
|
||||
|
||||
dev_cleanup();
|
||||
__exec((void *)entry, boothowto, bootdev, 0, 0, 0, bootinfop);
|
||||
|
||||
panic("exec returned");
|
||||
|
@ -84,6 +84,7 @@ elf_exec(struct preloaded_file *fp)
|
||||
printf("Start @ 0x%lx ...\n", entry);
|
||||
#endif
|
||||
|
||||
dev_cleanup();
|
||||
__exec((void *)entry, boothowto, bootdev, 0, 0, 0, bootinfop);
|
||||
|
||||
panic("exec returned");
|
||||
|
@ -84,6 +84,7 @@ elf_exec(struct preloaded_file *fp)
|
||||
printf("Start @ 0x%lx ...\n", entry);
|
||||
#endif
|
||||
|
||||
dev_cleanup();
|
||||
__exec((void *)entry, boothowto, bootdev, 0, 0, 0, bootinfop);
|
||||
|
||||
panic("exec returned");
|
||||
|
Loading…
Reference in New Issue
Block a user