mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-09 04:36:31 +00:00
kboot: Move console, acpi and smbios init
Move the console probing to as early as possible. There's no real support for anything but hostcons, and setting it up early will show other error messages. ACPI and SMBIOS probing can be done just after we have the console, so move it there. This allows other parts of the early code to use info from that, as well as overriding and env vars set by these things on the command line (smbios data may be wrong during initial development phases as the automated way to populate per-board data may not be established, etc). Sponsored by: Netflix
This commit is contained in:
parent
68c890b443
commit
1d7bdae9ca
|
@ -342,16 +342,23 @@ main(int argc, const char **argv)
|
|||
heapbase = host_getmem(heapsize);
|
||||
setheap(heapbase, heapbase + heapsize);
|
||||
|
||||
/*
|
||||
* Set up console so we get error messages.
|
||||
*/
|
||||
cons_probe();
|
||||
|
||||
/*
|
||||
* Find acpi and smbios, if they exists. This allows command line and
|
||||
* later scripts to override if necessary.
|
||||
*/
|
||||
find_acpi();
|
||||
find_smbios();
|
||||
|
||||
/* Parse the command line args -- ignoring for now the console selection */
|
||||
parse_args(argc, argv);
|
||||
|
||||
parse_file("host:/kboot.conf");
|
||||
|
||||
/*
|
||||
* Set up console.
|
||||
*/
|
||||
cons_probe();
|
||||
|
||||
/* Initialize all the devices */
|
||||
devinit();
|
||||
|
||||
|
@ -394,13 +401,6 @@ main(int argc, const char **argv)
|
|||
memory_limits();
|
||||
enumerate_memory_arch();
|
||||
|
||||
/*
|
||||
* Find acpi, if it exists
|
||||
*/
|
||||
find_acpi();
|
||||
|
||||
find_smbios();
|
||||
|
||||
interact(); /* doesn't return */
|
||||
|
||||
return (0);
|
||||
|
|
Loading…
Reference in New Issue
Block a user