From: Dietmar Hahn Subject: [PATCH]mini-os: handle start_info_t pointer Date: Fri, 27 Oct 2006 11:12:40 +0200 Message-ID: <200610271112.40432.dietmar.hahn@fujitsu-siemens.com> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_I2cQFzIZmSu+FfQ" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Grzegorz Milos Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_I2cQFzIZmSu+FfQ Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Gregor, on ia64 the start_info_t pointer is stored within shared_info_t structure. So it makes sense to initialize the pointer within arch_init(), which is different from x86. With this patch the &si is given to arch_init(). Please have a look! Thanks. Dietmar. --Boundary-00=_I2cQFzIZmSu+FfQ Content-Type: text/x-diff; charset="iso-8859-15"; name="mini-os_startinfo.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mini-os_startinfo.patch" # HG changeset patch # User hahn@amur.mch.fsc.net # Date 1161939782 -7200 # Node ID ca87a5ceecff1b51c4f539c4d6b36d798eee5dd8 # Parent 5a98f2dcdc8651b9fe9313b62c5eefb8862a2585 In ia64 the start_info_t pointer is stored within shared_info_t structure. So it makes sense to initialize the pointer within arch_init(), which is different from x86. Now the &si is given to arch_init() to realize this. Signed-off-by: Dietmar Hahn diff -r 5a98f2dcdc86 -r ca87a5ceecff extras/mini-os/arch/x86/setup.c --- a/extras/mini-os/arch/x86/setup.c Thu Oct 26 13:44:20 2006 +0200 +++ b/extras/mini-os/arch/x86/setup.c Fri Oct 27 11:03:02 2006 +0200 @@ -73,12 +73,12 @@ shared_info_t *map_shared_info(unsigned } void -arch_init(start_info_t *si) +arch_init(start_info_t **si) { /* 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. */ - memcpy(&start_info, si, sizeof(*si)); + memcpy(&start_info, *si, sizeof(**si)); /* set up minimal memory infos */ phys_to_machine_mapping = (unsigned long *)start_info.mfn_list; diff -r 5a98f2dcdc86 -r ca87a5ceecff extras/mini-os/include/x86/os.h --- a/extras/mini-os/include/x86/os.h Thu Oct 26 13:44:20 2006 +0200 +++ b/extras/mini-os/include/x86/os.h Fri Oct 27 11:03:02 2006 +0200 @@ -61,7 +61,7 @@ extern shared_info_t *HYPERVISOR_shared_ void trap_init(void); -void arch_init(start_info_t *si); +void arch_init(start_info_t **si); void arch_print_info(void); diff -r 5a98f2dcdc86 -r ca87a5ceecff extras/mini-os/kernel.c --- a/extras/mini-os/kernel.c Thu Oct 26 13:44:20 2006 +0200 +++ b/extras/mini-os/kernel.c Fri Oct 27 11:03:02 2006 +0200 @@ -84,7 +84,7 @@ void start_kernel(start_info_t *si) (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(hello), hello); - arch_init(si); + arch_init(&si); trap_init(); --Boundary-00=_I2cQFzIZmSu+FfQ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_I2cQFzIZmSu+FfQ--