diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-05-15 16:32:09 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-05-15 16:32:09 +0100 |
commit | 395112e684108eadf6a20f3f0bfb5227a142c7aa (patch) | |
tree | 628116f911afba841785f588333568dc6e7a2d0f /extras/mini-os/kernel.c | |
parent | c60d2bbfac66500f28217f0f7f3d40e4f74fb6c4 (diff) | |
download | xen-395112e684108eadf6a20f3f0bfb5227a142c7aa.tar.gz xen-395112e684108eadf6a20f3f0bfb5227a142c7aa.tar.bz2 xen-395112e684108eadf6a20f3f0bfb5227a142c7aa.zip |
Allow linking of mini-os with application-specific object code.
From: Jacob Gorm Hansen
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'extras/mini-os/kernel.c')
-rw-r--r-- | extras/mini-os/kernel.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/extras/mini-os/kernel.c b/extras/mini-os/kernel.c index 3ac572a035..49dbf6034b 100644 --- a/extras/mini-os/kernel.c +++ b/extras/mini-os/kernel.c @@ -106,6 +106,12 @@ void setup_xen_features(void) } } +/* This should be overridden by the application we are linked against. */ +__attribute__((weak)) int app_main(start_info_t *si) +{ + printk("Dummy main: start_info=%p\n", si); + return 0; +} /* * INITIAL C ENTRY POINT. @@ -165,12 +171,15 @@ void start_kernel(start_info_t *si) /* Init the console driver. */ init_console(); - /* Init scheduler. */ + /* Init scheduler. */ init_sched(); /* Init XenBus from a separate thread */ create_thread("init_xs", init_xs, NULL); + /* Call (possibly overridden) app_main() */ + app_main(&start_info); + /* Everything initialised, start idle thread */ run_idle_thread(); } |