Re: New kernel not running.
Re: New kernel not running.
- Subject: Re: New kernel not running.
- From: Terry Lambert <email@hidden>
- Date: Wed, 21 Feb 2007 15:45:41 -0800
On Feb 21, 2007, at 1:37 PM, Dan Shoop wrote:
At 1:32 PM -0800 2/21/07, Terry Lambert wrote:
Actually, you still see the grey screen with the Apple logo while
the machine is POST-ing and loading BootX, but before it has loaded
the rest of the kernel and called bsd_init().
Terry, doesn't POST occur between power on and OF???
The Apple logo is found, iirc, in the bootx file. So this is well
after POST yet before the kernel loads.
...and bsd_init() happens well after the kernel has loaded. The
pager is started after this.
At least this is what we've been teaching as OS X Boot Internals ;)
--
Hi, Dan;
Mea culpa, you are correct about POST (Power On Self Test).
I'm a kernel guy, and I tend to count all the work that gets done
before the kernel gets loaded and my code starts to run as "POST
overhead". This lets me glaze over things like the difference between
OF on PPC and EFI on Intel with some hand waving... it also puts that
boot overhead out of my control, except for filing bugs.
One of the guys I work with calls what I do "the application", so it's
all a matter of perspective... 8-).
The actual origin of the grey screen and the Apple logo and the
failure indicators differ slightly between Intel and PPC. For
example, OF gets jettisoned by the time the kernel is running, but EFI
sticks around to run an NVRAM and other stuff (for example, the
BootCamp ACPI and BIOS emulation wouldn't work if EFI weren't still
there). Getting from there to a spinning wheel on a grey screen is
pretty much out of kernel control.
The bsd_init() is actually what kicks off the pager, since it's about
to kick off the init process (now launchd), and to do that, it has to
hand-craft a "kernproc", complete with credentials, from which it can
effectively force a "fork() + exec()".
The actual order once the Mach bootstrap thread gets going is:
kernel_bootstrap_thread()
PE_init_iokit() /* start a bunch of driver threads... */
bsd_init()
printf(copyright) /* copyright */
kmeminit() /* start kernel virtual memory (KVM) */
bsd_utaskbootstrap()
act_set_astbsd() /* set the AST_BSD that kicks off init */
serial_keyboard_init()
vm_pageout() /* start the pager: does not return */
/* some little time later, the AST fires... */
ast_taken()
bsd_ast()
bsd_init_task()
load_init_program() /* load the init program after AST_BSD */
The black screen with the printfs vs. the grey screen + spinny cursor
based on verbose/not verbose (either "-v" in the boot-args or command-
v on the keyboard at boot) comes from the graphics console driver.
The original poster, Romit, isn't even getting that far. If it's
because of him hacking on the OS, it's either because the booter can't
load the kernel, or the firmware can't load the booter. Since he
claims "the only thing I changed..." is the kernel, it's likely
permissions problems.
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden