summaryrefslogtreecommitdiff
path: root/i386/i386at/model_dep.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-03-25 22:25:44 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-06-28 12:55:30 +0200
commit4b9758c8ec6103c26228e1cda9731ab8bf1113e9 (patch)
tree64a9ba6685441e675bee388958e57fa0ad53f8dd /i386/i386at/model_dep.c
parentfa5e2ae5645b3eb005931f60b5481ee7e478640e (diff)
i386: improve the immediate console
Improve the immediate console to the point that it can be enabled and display e.g. assertion failures from very early on (i.e. from `c_boot_entry'). * device/cons.h (romgetc, romputc): New declarations. * i386/configfrag.ac: Add configuration variable. * i386/i386at/conf.c (dev_name_list): Add entry. * i386/i386at/cons_conf.c (constab): Add entry. * i386/i386at/immc.c: Add missing includes. (immc_cnprobe, immc_cninit, immc_cngetc, immc_romputc): New functions. (immc_cnputc): Fix signature, use virtual addresses. * i386/i386at/immc.h: New file. * i386/i386at/kd.c: Use `#if ENABLE_IMMEDIATE_CONSOLE'. * i386/i386at/kd.h (kd_setpos): Add missing declaration. * i386/i386at/model_dep.c (c_boot_entry): Install immediate console as early boot console.
Diffstat (limited to 'i386/i386at/model_dep.c')
-rw-r--r--i386/i386at/model_dep.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 03a9f15d..fdf983b9 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -77,6 +77,10 @@
#include <xen/xen.h>
#endif /* MACH_XEN */
+#if ENABLE_IMMEDIATE_CONSOLE
+#include "immc.h"
+#endif /* ENABLE_IMMEDIATE_CONSOLE */
+
/* Location of the kernel's symbol table.
Both of these are 0 if none is available. */
#if MACH_KDB
@@ -541,6 +545,10 @@ i386at_init(void)
*/
void c_boot_entry(vm_offset_t bi)
{
+#if ENABLE_IMMEDIATE_CONSOLE
+ romputc = immc_romputc;
+#endif /* ENABLE_IMMEDIATE_CONSOLE */
+
/* Stash the boot_image_info pointer. */
boot_info = *(typeof(boot_info)*)phystokv(bi);
int cpu_type;