Generalize output banner write routine

Initial display output is replayed to vga/vnc display, similar facility
will be needed for virtio-serial console as the enumeration would only
happen during PCI discovery.

Generalize the write routine that could be used accordingly for
virtio-serial driver as well.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
This commit is contained in:
Nikunj A Dadhania 2016-10-10 16:47:05 +05:30 committed by Alexey Kardashevskiy
parent e2a03fc04d
commit c1ab43d25b
1 changed files with 12 additions and 6 deletions

View File

@ -159,24 +159,30 @@ check-for-nvramrc
CREATE version-str 10 ALLOT
0 value temp-ptr
: dump-display-write
s" screen" find-alias IF
drop terminal-write drop
THEN
;
: dump-display-buffer
disp-ptr to temp-ptr
" SLOF **********************************************************************" terminal-write drop
" SLOF **********************************************************************" dump-display-write
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
over - dump-display-write
" Press 's' to enter Open Firmware." dump-display-write
cr cr
temp-ptr disp-size > IF
temp-ptr disp-size MOD
dup
prevga-disp-buf + swap disp-size swap - terminal-write drop
prevga-disp-buf + swap disp-size swap - dump-display-write
temp-ptr disp-size MOD
prevga-disp-buf swap 1 - terminal-write drop
prevga-disp-buf swap 1 - dump-display-write
ELSE
prevga-disp-buf temp-ptr terminal-write drop
prevga-disp-buf temp-ptr dump-display-write
THEN
;