summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus>2004-10-23 11:13:30 +0000
committermarcus <marcus>2004-10-23 11:13:30 +0000
commitb68698c6210311c98f39776b74548541b324a24c (patch)
tree7e0de7ab972b6a657e9e1a239d2cda7050c79b93
parent9f601665bd74b015ed6ec2a282b4b3d5c67245b1 (diff)
2004-10-23 Marcus Brinkmann <marcus@gnu.org>
* ia32-cmain.c (start_kernel): Flush the D-cache. * laden.c (main): Call panic() instead of shutdown() if kernel returns.
-rw-r--r--laden/ChangeLog6
-rw-r--r--laden/ia32-cmain.c10
-rw-r--r--laden/laden.c4
3 files changed, 16 insertions, 4 deletions
diff --git a/laden/ChangeLog b/laden/ChangeLog
index ed407c4..3418d6a 100644
--- a/laden/ChangeLog
+++ b/laden/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-23 Marcus Brinkmann <marcus@gnu.org>
+
+ * ia32-cmain.c (start_kernel): Flush the D-cache.
+ * laden.c (main): Call panic() instead of shutdown() if kernel
+ returns.
+
2004-03-30 Marcus Brinkmann <marcus@gnu.org>
* loader.c (loader_elf_dest, loader_elf_load): Use 32 and 64
diff --git a/laden/ia32-cmain.c b/laden/ia32-cmain.c
index 7c38ceb..ae09acc 100644
--- a/laden/ia32-cmain.c
+++ b/laden/ia32-cmain.c
@@ -38,10 +38,18 @@ help_arch (void)
}
-/* Start kernel by simply jumping to the entry point. */
+/* Start kernel. */
void
start_kernel (l4_word_t ip)
{
+ /* Flush the data cache, so that the kernel code instructions can be
+ found. Actually, ia32 does this automatically for backwards
+ compatibility, but other architectures may not. If you are
+ porting this file, make sure that the instruction fetcher gets to
+ see the loaded kernel code. */
+ asm volatile ("wbinvd");
+
+ /* Jump to the entry point. */
(*(void (*) (void)) ip) ();
}
diff --git a/laden/laden.c b/laden/laden.c
index 4d41724..874f24d 100644
--- a/laden/laden.c
+++ b/laden/laden.c
@@ -206,12 +206,10 @@ main (int argc, char *argv[])
output_deinit ();
- /* FIXME. Flush D-cache? */
-
start_kernel (kernel.ip);
/* Should not be reached. */
- shutdown ();
+ panic ("kernel returned to bootloader");
/* Never reached. */
return 0;