void boot2(int biosdev, u_int biossector) { extern char twiddle_toggle; twiddle_toggle = 1; /* no twiddling until we're ready */ printf("\f"); /* clear screen (hopefully) */ initio(boot_params.bp_consdev); #ifdef SUPPORT_PS2 biosmca(); #endif gateA20(); if (boot_params.bp_flags & X86_BP_FLAGS_RESET_VIDEO) biosvideomode(); twiddle_toggle = 0; printf("\n" ">> %s, Revision %s (from NetBSD %s)\n" ">> for Book:Lambda Ka Musume\n", bootprog_name, bootprog_rev, bootprog_kernrev); while (1) { step(); } }
/* * Called from the initial entry point boot_start in biosboot.S * * biosdev: BIOS drive number the system booted from * biossector: Sector number of the NetBSD partition */ void boot2(int biosdev, uint64_t biossector) { extern char twiddle_toggle; int currname; char c; twiddle_toggle = 1; /* no twiddling until we're ready */ initio(boot_params.bp_consdev); #ifdef SUPPORT_PS2 biosmca(); #endif gateA20(); boot_modules_enabled = !(boot_params.bp_flags & X86_BP_FLAGS_NOMODULES); if (boot_params.bp_flags & X86_BP_FLAGS_RESET_VIDEO) biosvideomode(); vbe_init(); /* need to remember these */ boot_biosdev = biosdev; boot_biossector = biossector; /* try to set default device to what BIOS tells us */ bios2dev(biosdev, biossector, &default_devname, &default_unit, &default_partition); /* if the user types "boot" without filename */ default_filename = DEFFILENAME; #ifndef SMALL if (!(boot_params.bp_flags & X86_BP_FLAGS_NOBOOTCONF)) { parsebootconf(BOOTCONF); } else { bootconf.timeout = boot_params.bp_timeout; } /* * If console set in boot.cfg, switch to it. * This will print the banner, so we don't need to explicitly do it */ if (bootconf.consdev) command_consdev(bootconf.consdev); else print_banner(); /* Display the menu, if applicable */ twiddle_toggle = 0; if (bootconf.nummenu > 0) { /* Does not return */ doboottypemenu(); } #else twiddle_toggle = 0; print_banner(); #endif printf("Press return to boot now, any other key for boot menu\n"); for (currname = 0; currname < NUMNAMES; currname++) { printf("booting %s - starting in ", sprint_bootsel(names[currname][0])); #ifdef SMALL c = awaitkey(boot_params.bp_timeout, 1); #else c = awaitkey((bootconf.timeout < 0) ? 0 : bootconf.timeout, 1); #endif if ((c != '\r') && (c != '\n') && (c != '\0')) { if ((boot_params.bp_flags & X86_BP_FLAGS_PASSWORD) == 0) { /* do NOT ask for password */ bootmenu(); /* does not return */ } else { /* DO ask for password */ if (check_password((char *)boot_params.bp_password)) { /* password ok */ printf("type \"?\" or \"help\" for help.\n"); bootmenu(); /* does not return */ } else { /* bad password */ printf("Wrong password.\n"); currname = 0; continue; } } } /* * try pairs of names[] entries, foo and foo.gz */ /* don't print "booting..." again */ bootit(names[currname][0], 0, 0); /* since it failed, try compressed bootfile. */ bootit(names[currname][1], 0, 1); } bootmenu(); /* does not return */ }