[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch: start_kernel
From: |
Johan Rydberg |
Subject: |
patch: start_kernel |
Date: |
Thu, 25 Sep 2003 23:50:00 +0200 |
Hi,
For the PowerPC port, it is not enough to just call the kernel
start address to launch the kernel. The OpenFirmware entry
point must be passed to the kernel. This patch moves the start
mechanism into the arch dependent part of laden.
2003-09-25 Johan Rydberg <address@hidden>
* laden.c (main): Call start_kernel to launch kernel instead
of calling the kernel start address.
* laden.h (start_kernel): Prototype.
* ia32-cmain.c (start_kernel): New function.
Index: laden.h
===================================================================
RCS file: /cvsroot/hurd/hurd-l4/laden/laden.h,v
retrieving revision 1.8
diff -u -p -r1.8 laden.h
--- laden.h 13 Sep 2003 00:25:50 -0000 1.8
+++ laden.h 25 Sep 2003 21:46:18 -0000
@@ -41,6 +41,9 @@ extern char *program_name;
required for booting. */
void find_components (void);
+/* Start kernel. IP is the entry point. */
+void start_kernel (l4_word_t ip);
+
typedef __l4_rootserver_t rootserver_t;
/* For the rootserver components, find_components() must fill in the
Index: ia32-cmain.c
===================================================================
RCS file: /cvsroot/hurd/hurd-l4/laden/ia32-cmain.c,v
retrieving revision 1.10
diff -u -p -r1.10 ia32-cmain.c
--- ia32-cmain.c 19 Sep 2003 18:50:12 -0000 1.10
+++ ia32-cmain.c 25 Sep 2003 21:46:18 -0000
@@ -36,6 +36,13 @@ help_arch (void)
"through to the rootserver\n"
"and handled by it.\n";
}
+
+/* Start kernel by simply jumping to the entry point. */
+void
+start_kernel (l4_word_t ip)
+{
+ (*(void (*) (void)) ip) ();
+}
/* Check if the bit BIT in FLAGS is set. */
Index: laden.c
===================================================================
RCS file: /cvsroot/hurd/hurd-l4/laden/laden.c,v
retrieving revision 1.7
diff -u -p -r1.7 laden.c
--- laden.c 19 Sep 2003 18:50:12 -0000 1.7
+++ laden.c 25 Sep 2003 21:46:18 -0000
@@ -208,7 +208,7 @@ main (int argc, char *argv[])
/* FIXME. Flush D-cache? */
- (*(void (*) (void)) kernel.ip) ();
+ start_kernel (kernel.ip);
/* Should not be reached. */
shutdown ();
- patch: start_kernel,
Johan Rydberg <=