diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2013-11-21 11:14:54 +0530 |
---|---|---|
committer | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2013-12-16 11:56:42 +0530 |
commit | 79f0600b9aa14e5a52e6c8428b0ce0c3e24cd480 (patch) | |
tree | 92d34dada75869d0ef9d4d448e4daa0287e61500 /board-qemu | |
parent | e086e9992c26bc23cd75dfad2239949c10da1fb1 (diff) | |
download | SLOF-79f0600b9aa14e5a52e6c8428b0ce0c3e24cd480.zip SLOF-79f0600b9aa14e5a52e6c8428b0ce0c3e24cd480.tar.gz SLOF-79f0600b9aa14e5a52e6c8428b0ce0c3e24cd480.tar.bz2 |
Output banner and initial display output in VNC window
Initial display output does not show up in the VGA/VNC window.
Create replay buffer to store the initial output and when vga/vnc
console starts, dump the buffer there.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Diffstat (limited to 'board-qemu')
-rw-r--r-- | board-qemu/Makefile | 2 | ||||
-rw-r--r-- | board-qemu/slof/Makefile | 8 | ||||
-rw-r--r-- | board-qemu/slof/OF.fs | 25 | ||||
-rw-r--r-- | board-qemu/slof/hvterm.fs | 17 | ||||
-rw-r--r-- | board-qemu/slof/version.S | 36 |
5 files changed, 84 insertions, 4 deletions
diff --git a/board-qemu/Makefile b/board-qemu/Makefile index eb43787..29ee016 100644 --- a/board-qemu/Makefile +++ b/board-qemu/Makefile @@ -31,7 +31,7 @@ subdirs: $(SUBDIRS) $(SUBDIRS): common-libs @echo " ====== Building $@ ======" - $(MAKE) -C $@ $(MAKEARG) + $(MAKE) -C $@ $(MAKEARG) RELEASE=-DRELEASE=\"\\\"$(RELEASE)\\\"\" stage1: common-libs @echo " ====== Building llfw ======" diff --git a/board-qemu/slof/Makefile b/board-qemu/slof/Makefile index a7deed7..43db4aa 100644 --- a/board-qemu/slof/Makefile +++ b/board-qemu/slof/Makefile @@ -16,8 +16,7 @@ include ../Makefile.dirs include $(TOPBRDDIR)/config include $(TOPCMNDIR)/make.rules - -all: Makefile.dep OF.ffs paflof $(SLOFCMNDIR)/xvect.bin +all: version.o Makefile.dep OF.ffs paflof $(SLOFCMNDIR)/xvect.bin CPPFLAGS = -I$(LIBCMNDIR)/libbootmsg -I$(LIBCMNDIR)/libhvcall \ -I$(LIBCMNDIR)/libvirtio -I$(LIBCMNDIR)/libnvram \ @@ -46,6 +45,11 @@ BOARD_SLOF_CODE = $(BOARD_SLOF_IN:%.in=%.code) include $(SLOFCMNDIR)/Makefile.inc +AS1FLAGS = $(CPPFLAGS) $(RELEASE) $(CPUARCHDEF) -Wa,-mregnames + +%.o: %.S + $(CC) $(AS1FLAGS) -o $@ -c $^ + FPPINCLUDES = -I. -I$(SLOFCMNDIR)/fs -I$(SLOFCMNDIR) USB_FFS_FILES = \ diff --git a/board-qemu/slof/OF.fs b/board-qemu/slof/OF.fs index 05d87c7..a4f1064 100644 --- a/board-qemu/slof/OF.fs +++ b/board-qemu/slof/OF.fs @@ -152,6 +152,29 @@ check-for-nvramrc #include <loaders.fs> 8a8 cp +CREATE version-str 10 ALLOT +0 value temp-ptr + +: dump-display-buffer + disp-ptr to temp-ptr + " SLOF **********************************************************************" terminal-write drop + cr + version-str get-print-version + version-str @ \ start + version-str 8 + @ \ end + over - terminal-write drop + " Press 's' to enter Open Firmware." terminal-write drop + cr cr + temp-ptr disp-size > IF + temp-ptr disp-size MOD + dup + prevga-disp-buf + swap disp-size swap - terminal-write drop + temp-ptr disp-size MOD + prevga-disp-buf swap 1 - terminal-write drop + ELSE + prevga-disp-buf temp-ptr terminal-write drop + THEN +; : enable-framebuffer-output ( -- ) \ enable output on framebuffer @@ -159,8 +182,10 @@ check-for-nvramrc \ we need to open/close the screen device once \ before "ticking" display-emit to emit open-dev close-node + false to store-prevga? s" display-emit" $find IF to emit + dump-display-buffer ELSE 2drop THEN diff --git a/board-qemu/slof/hvterm.fs b/board-qemu/slof/hvterm.fs index 9700685..98c1445 100644 --- a/board-qemu/slof/hvterm.fs +++ b/board-qemu/slof/hvterm.fs @@ -13,8 +13,23 @@ \ PAPR hvterm console. Enabled very early. 0 CONSTANT default-hvtermno +\ Buffer for pre-display +4096 CONSTANT disp-size +CREATE prevga-disp-buf 4096 allot +0 value disp-ptr +true value store-prevga? -: hvterm-emit default-hvtermno SWAP hv-putchar ; +: store-to-disp-buffer ( ch -- ) + prevga-disp-buf disp-ptr disp-size MOD + c! + disp-ptr 1 + to disp-ptr +; + +: hvterm-emit + store-prevga? IF + dup store-to-disp-buffer + THEN + default-hvtermno SWAP hv-putchar +; : hvterm-key? default-hvtermno hv-haschar ; : hvterm-key BEGIN hvterm-key? UNTIL default-hvtermno hv-getchar ; diff --git a/board-qemu/slof/version.S b/board-qemu/slof/version.S new file mode 100644 index 0000000..9aa2a94 --- /dev/null +++ b/board-qemu/slof/version.S @@ -0,0 +1,36 @@ +/****************************************************************************** + * Copyright (c) 2010, 2011 IBM Corporation + * All rights reserved. + * This program and the accompanying materials + * are made available under the terms of the BSD License + * which accompanies this distribution, and is available at + * http://www.opensource.org/licenses/bsd-license.php + * + * Contributors: + * IBM Corporation - initial implementation + *****************************************************************************/ + +/* + * Print version information - in SLOF + * This code is in a separate file so that it can be easily compiled during + * each new build (for refreshing the build date). + */ + +#include "termctrl.h" +#include <product.h> + +.global print_version +print_version: + .ascii TERM_CTRL_RESET + .ascii TERM_CTRL_CRSOFF + .ascii TERM_CTRL_BRIGHT + .ascii PRODUCT_NAME + .ascii " Starting\r\n" + .ascii TERM_CTRL_RESET + .ascii " Build Date = ", __DATE__, " ", __TIME__ + .ascii "\r\n" + .ascii " FW Version = " , RELEASE + .ascii "\r\n\0" + .align 2 +.global print_version_end +print_version_end: |