aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2021-02-10 22:26:47 +0100
committerHelge Deller <deller@gmx.de>2021-09-24 11:10:17 +0200
commitd94196a29ed371abe2f9f381b5bad701062d0e3e (patch)
treeb35e59fcbf97a6f85f622302fcf779fb55fe7890
parent036b64e8ab37d4a16cb23fee7f93f4f43ade06f1 (diff)
downloadseabios-hppa-d94196a29ed371abe2f9f381b5bad701062d0e3e.zip
seabios-hppa-d94196a29ed371abe2f9f381b5bad701062d0e3e.tar.gz
seabios-hppa-d94196a29ed371abe2f9f381b5bad701062d0e3e.tar.bz2
output.c: Add PA-RISC specific output behaviour
On PA-RISC call an own screenc() implementation which doesn't use int10, prevent the Intel-specific \r newline when printing \n and don't output to serial debug port. Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--src/output.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/output.c b/src/output.c
index 0184444..6141fb6 100644
--- a/src/output.c
+++ b/src/output.c
@@ -18,6 +18,9 @@
#include "stacks.h" // call16_int
#include "string.h" // memset
#include "util.h" // ScreenAndDebug
+#if CONFIG_PARISC
+#include "parisc/sticore.h"
+#endif
struct putcinfo {
void (*func)(struct putcinfo *info, char c);
@@ -44,7 +47,8 @@ debug_putc(struct putcinfo *action, char c)
qemu_debug_putc(c);
if (!MODESEGMENT)
coreboot_debug_putc(c);
- serial_debug_putc(c);
+ if (!CONFIG_PARISC)
+ serial_debug_putc(c);
}
// Flush any pending output to debug port(s).
@@ -74,6 +78,7 @@ static struct putcinfo debuginfo = { debug_putc };
static void
screenc(char c)
{
+#if CONFIG_X86
if (!MODESEGMENT && GET_IVT(0x10).segoff == FUNC16(entry_10).segoff)
// No need to thunk to 16bit mode if vgabios is not present
return;
@@ -84,6 +89,9 @@ screenc(char c)
br.al = c;
br.bl = 0x07;
call16_int(0x10, &br);
+#else
+ parisc_screenc(c);
+#endif
}
// Handle a character from a printf request.
@@ -92,7 +100,7 @@ screen_putc(struct putcinfo *action, char c)
{
if (ScreenAndDebug)
debug_putc(&debuginfo, c);
- if (c == '\n')
+ if (CONFIG_X86 && c == '\n')
screenc('\r');
screenc(c);
}