#include <arch_mm.h>
#include <libfdt.h>
-/*
- * This structure contains start-of-day info, such as pagetable base pointer,
- * address of the shared_info structure, and things like that.
- * On x86, the hypervisor passes it to us. On ARM, we fill it in ourselves.
- */
-union start_info_union start_info_union;
-
/*
* Shared page for communicating with the hypervisor.
* Events flags go here, for example.
/* Map shared_info page */
HYPERVISOR_shared_info = map_shared_info(NULL);
- /* Fill in start_info */
get_console(NULL);
get_xenbus(NULL);
*/
shared_info_t *HYPERVISOR_shared_info;
-/*
- * This structure contains start-of-day info, such as pagetable base pointer,
- * address of the shared_info structure, and things like that.
- */
-union start_info_union start_info_union;
-
/*
* Just allocate the kernel stack here. SS:ESP is set up to point here
* in head.S.
/* Setup memory management info from start_info. */
arch_mm_preinit(par);
- /* Copy the start_info struct to a globally-accessible area. */
/* WARN: don't do printk before here, it uses information from
shared_info. Use xprintk instead. */
get_console(par);
HYPERVISOR_shared_info = map_shared_info(par);
si = par;
- memcpy(&start_info, si, sizeof(*si));
/* print out some useful information */
printk("Xen Minimal OS!\n");
}
-int app_main(start_info_t *si)
+int app_main(void *p)
{
create_thread("server", run_server, NULL);
return 0;
#include <xen/hvm/hvm_op.h>
#include <mini-os/traps.h>
-/*
- * a placeholder for the start of day information passed up from the hypervisor
- */
-union start_info_union
-{
- start_info_t start_info;
- char padding[512];
-};
-extern union start_info_union start_info_union;
-#define start_info (start_info_union.start_info)
-
/* hypervisor.c */
#ifndef CONFIG_PARAVIRT
int hvm_get_parameter(int idx, uint64_t *value);
/* This should be overridden by the application we are linked against. */
-__attribute__((weak)) int app_main(start_info_t *si)
+__attribute__((weak)) int app_main(void *p)
{
- printk("kernel.c: dummy main: start_info=%p\n", si);
+ printk("kernel.c: dummy main: par=%p\n", p);
return 0;
}
#endif
/* Call (possibly overridden) app_main() */
- app_main(&start_info);
+ app_main(NULL);
/* Everything initialised, start idle thread */
run_idle_thread();
do_exit();
}
-int app_main(start_info_t *si)
+int app_main(void *p)
{
- printk("main.c: dummy main: start_info=%p\n", si);
- main_thread = create_thread("main", call_main, si);
+ printk("main.c: dummy main: par=%p\n", p);
+ main_thread = create_thread("main", call_main, p);
return 0;
}
#endif
}
#endif
-int app_main(start_info_t *si)
+int app_main(void *p)
{
- printk("Test main: start_info=%p\n", si);
+ printk("Test main: par=%p\n", p);
#ifdef CONFIG_XENBUS
- create_thread("xenbus_tester", xenbus_tester, si);
+ create_thread("xenbus_tester", xenbus_tester, p);
#endif
- create_thread("periodic_thread", periodic_thread, si);
+ create_thread("periodic_thread", periodic_thread, p);
#ifdef CONFIG_NETFRONT
- create_thread("netfront", netfront_thread, si);
+ create_thread("netfront", netfront_thread, p);
#endif
#ifdef CONFIG_BLKFRONT
- create_thread("blkfront", blkfront_thread, si);
+ create_thread("blkfront", blkfront_thread, p);
#endif
#if defined(CONFIG_FBFRONT) && defined(CONFIG_KBDFRONT)
- create_thread("fbfront", fbfront_thread, si);
- create_thread("kbdfront", kbdfront_thread, si);
+ create_thread("fbfront", fbfront_thread, p);
+ create_thread("kbdfront", kbdfront_thread, p);
#endif
#ifdef CONFIG_PCIFRONT
- create_thread("pcifront", pcifront_thread, si);
+ create_thread("pcifront", pcifront_thread, p);
#endif
#ifdef CONFIG_XENBUS
- create_thread("shutdown", shutdown_thread, si);
+ create_thread("shutdown", shutdown_thread, p);
#endif
return 0;
}