* [Q] GRUB -> __start_xen?
@ 2005-06-24 18:25 Bharadwaj Yadavalli
2005-06-24 18:53 ` Chris Wright
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bharadwaj Yadavalli @ 2005-06-24 18:25 UTC (permalink / raw)
To: xen-devel
I am trying to understand the internals of Xen.
On x86 (and may be other architectures), it appears to me
that xen's entry point is
void __init __start_xen(multiboot_info_t *mbi)
that lives in xeno-unstable.bk/xen/arch/x86/setup.c.
1. Who builds the structure mbi and calls __start_xen?
2. How is __satrt_xen registered as the entry point?
Is there a place that I can read to understand the transfer
of control from multiboot GRUB to xen's entry point?
Thanks,
Bharadwaj
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Q] GRUB -> __start_xen?
2005-06-24 18:25 [Q] GRUB -> __start_xen? Bharadwaj Yadavalli
@ 2005-06-24 18:53 ` Chris Wright
2005-06-24 18:54 ` Carl Holtje ;021;vcsg6;
2005-06-24 18:54 ` Josh Triplett
2 siblings, 0 replies; 4+ messages in thread
From: Chris Wright @ 2005-06-24 18:53 UTC (permalink / raw)
To: xen-devel; +Cc: bharadwaj.yadavalli
* Bharadwaj Yadavalli (bharadwaj.yadavalli@hp.com) wrote:
> On x86 (and may be other architectures), it appears to me
> that xen's entry point is
>
> void __init __start_xen(multiboot_info_t *mbi)
I believe it is actually 'start' in arch/x86/boot/x86_32.S, for
example. At least, that's the elf entry point which does low-level
setup before calling __start_xen. In there you should find the layout
of the multiboot header that grub requires.
> that lives in xeno-unstable.bk/xen/arch/x86/setup.c.
>
> 1. Who builds the structure mbi and calls __start_xen?
The boot loader, and then stashes it in specified register (ebx in this
case).
> 2. How is __satrt_xen registered as the entry point?
start is the elf entry point.
> Is there a place that I can read to understand the transfer
> of control from multiboot GRUB to xen's entry point?
For more info on multiboot, read:
http://www.gnu.org/software/grub/manual/multiboot/
thanks,
-chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Q] GRUB -> __start_xen?
2005-06-24 18:25 [Q] GRUB -> __start_xen? Bharadwaj Yadavalli
2005-06-24 18:53 ` Chris Wright
@ 2005-06-24 18:54 ` Carl Holtje ;021;vcsg6;
2005-06-24 18:54 ` Josh Triplett
2 siblings, 0 replies; 4+ messages in thread
From: Carl Holtje ;021;vcsg6; @ 2005-06-24 18:54 UTC (permalink / raw)
To: Bharadwaj Yadavalli; +Cc: xen-devel
On Fri, 24 Jun 2005, Bharadwaj Yadavalli wrote:
> I am trying to understand the internals of Xen.
>
> On x86 (and may be other architectures), it appears to me
> that xen's entry point is
>
> void __init __start_xen(multiboot_info_t *mbi)
>
> that lives in xeno-unstable.bk/xen/arch/x86/setup.c.
>
> 1. Who builds the structure mbi and calls __start_xen?
See xen/arch/x86/boot/x86_32.S .. __start_xen is called from there, with
the multiboot info..
It is at this point that assembler becomes C code, and everything is
easier to debug. :)
> 2. How is __satrt_xen registered as the entry point?
__start_xen is not the "real" entry point; instead it's the ENTRY(start)
line in xen/arch/x86/boot/x86_32.S
Carl
- --
"There are 10 types of people in the world: Those who understand binary
and those that don't."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Q] GRUB -> __start_xen?
2005-06-24 18:25 [Q] GRUB -> __start_xen? Bharadwaj Yadavalli
2005-06-24 18:53 ` Chris Wright
2005-06-24 18:54 ` Carl Holtje ;021;vcsg6;
@ 2005-06-24 18:54 ` Josh Triplett
2 siblings, 0 replies; 4+ messages in thread
From: Josh Triplett @ 2005-06-24 18:54 UTC (permalink / raw)
To: xen-devel
On Fri, 2005-06-24 at 14:25 -0400, Bharadwaj Yadavalli wrote:
> I am trying to understand the internals of Xen.
>
> On x86 (and may be other architectures), it appears to me
> that xen's entry point is
>
> void __init __start_xen(multiboot_info_t *mbi)
>
> that lives in xeno-unstable.bk/xen/arch/x86/setup.c.
>
> 1. Who builds the structure mbi and calls __start_xen?
The Grub bootloader creates the structure, and calls a Xen startup
function defined in xen/arch/x86/boot/x86_32.S . That assembly code
does some minimal setup and then calls the C startup function, passing
the structure pointer.
> 2. How is __satrt_xen registered as the entry point?
The Xen image booted by GRUB has a well-specified format which includes
the location of the entry point.
> Is there a place that I can read to understand the transfer
> of control from multiboot GRUB to xen's entry point?
http://www.gnu.org/software/grub/manual/multiboot/multiboot.html
- Josh Triplett
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-06-24 18:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-24 18:25 [Q] GRUB -> __start_xen? Bharadwaj Yadavalli
2005-06-24 18:53 ` Chris Wright
2005-06-24 18:54 ` Carl Holtje ;021;vcsg6;
2005-06-24 18:54 ` Josh Triplett
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.