[OpenBIOS] [PATCH 16/16] video: switch VGA and TCX drivers over to Forth console using is-install.
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Sun Mar 10 17:50:46 CET 2013
Here we install the Forth terminal console instead of the C console for
the VGA and TCX drivers.
Note that this patch also disables video output for SPARC32 when
CONFIG_DEBUG_CONSOLE_VIDEO is enabled, since these routines write directly
to the screen instead of using the Forth bindings causing some display
issues.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
openbios-devel/arch/sparc32/console.c | 12 ------------
openbios-devel/drivers/pci.c | 6 +++++-
openbios-devel/drivers/sbus.c | 2 ++
3 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/openbios-devel/arch/sparc32/console.c b/openbios-devel/arch/sparc32/console.c
index 2bcdf02..6fe48ac 100644
--- a/openbios-devel/arch/sparc32/console.c
+++ b/openbios-devel/arch/sparc32/console.c
@@ -30,15 +30,6 @@ void cls(void);
unsigned char *vmem;
volatile uint32_t *dac;
-static void video_putchar(int c)
-{
- char buf;
-
- buf = c & 0xff;
-
- console_draw_fstr(&buf, 1);
-}
-
static void video_cls(void)
{
memset((void *)vmem, 0, VMEM_SIZE);
@@ -63,9 +54,6 @@ int putchar(int c)
#ifdef CONFIG_DEBUG_CONSOLE_SERIAL
serial_putchar(c);
#endif
-#ifdef CONFIG_DEBUG_CONSOLE_VIDEO
- video_putchar(c);
-#endif
return c;
}
diff --git a/openbios-devel/drivers/pci.c b/openbios-devel/drivers/pci.c
index 009b974..b35492c 100644
--- a/openbios-devel/drivers/pci.c
+++ b/openbios-devel/drivers/pci.c
@@ -772,12 +772,16 @@ int macio_keylargo_config_cb (const pci_config_t *config)
int vga_config_cb (const pci_config_t *config)
{
- if (config->assigned[0] != 0x00000000)
+ if (config->assigned[0] != 0x00000000) {
vga_vbe_init(config->path,
pci_bus_addr_to_host_addr(config->assigned[0] & ~0x0000000F),
config->sizes[0],
pci_bus_addr_to_host_addr(config->assigned[1] & ~0x0000000F),
config->sizes[1]);
+
+ feval("['] qemu-vga-driver-init is-install");
+ }
+
return 0;
}
diff --git a/openbios-devel/drivers/sbus.c b/openbios-devel/drivers/sbus.c
index 3708a5e..06be8cd 100644
--- a/openbios-devel/drivers/sbus.c
+++ b/openbios-devel/drivers/sbus.c
@@ -329,6 +329,8 @@ ob_tcx_init(unsigned int slot, const char *path)
fword("property");
}
+ feval("['] qemu-tcx-driver-init is-install");
+
chosen = find_dev("/chosen");
push_str(path);
fword("open-dev");
--
1.7.10.4
More information about the OpenBIOS
mailing list