mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
This patch replaces the string definitions in nvram.fs by the
simpler version s" that does not contain a complex parser for " "(0a) type of strings. Also use handle-text in " instead of the hand crafted version. This fixes strings in "see". Signed-off-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@613 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Stefan Reinauer
parent
8bd4ea05c8
commit
7dbe5e6507
@@ -39,7 +39,7 @@ constant config-info.size
|
||||
dup >cf.name 2@ $create ,
|
||||
does> @
|
||||
dup >cf.name 2@
|
||||
" /options" find-dev if
|
||||
s" /options" find-dev if
|
||||
get-package-property if 0 -1 then
|
||||
( configp prop-str prop-len )
|
||||
\ drop trailing zero
|
||||
@@ -120,14 +120,14 @@ constant config-info.size
|
||||
\ ------------------------------------------------------------
|
||||
|
||||
: exec-secmode-conf ( str len -- n )
|
||||
2dup " command" strcmp 0= if 2drop 1 exit then
|
||||
2dup " full" strcmp 0= if 2drop 2 exit then
|
||||
2dup s" command" strcmp 0= if 2drop 1 exit then
|
||||
2dup s" full" strcmp 0= if 2drop 2 exit then
|
||||
2drop 0
|
||||
;
|
||||
: check-secmode-conf ( str len -- str len valid? )
|
||||
2dup " none" strcmp 0= if true exit then
|
||||
2dup " command" strcmp 0= if true exit then
|
||||
2dup " full" strcmp 0= if true exit then
|
||||
2dup s" none" strcmp 0= if true exit then
|
||||
2dup s" command" strcmp 0= if true exit then
|
||||
2dup s" full" strcmp 0= if true exit then
|
||||
false
|
||||
;
|
||||
|
||||
@@ -141,18 +141,18 @@ constant config-info.size
|
||||
\ ------------------------------------------------------------
|
||||
|
||||
: exec-bool-conf ( str len -- value )
|
||||
2dup " true" strcmp 0= if 2drop true exit then
|
||||
2dup " false" strcmp 0= if 2drop false exit then
|
||||
2dup " TRUE" strcmp 0= if 2drop false exit then
|
||||
2dup " FALSE" strcmp 0= if 2drop false exit then
|
||||
2dup s" true" strcmp 0= if 2drop true exit then
|
||||
2dup s" false" strcmp 0= if 2drop false exit then
|
||||
2dup s" TRUE" strcmp 0= if 2drop false exit then
|
||||
2dup s" FALSE" strcmp 0= if 2drop false exit then
|
||||
parse-hex 0<>
|
||||
;
|
||||
|
||||
: check-bool-conf ( name len -- str len valid? )
|
||||
2dup " true" strcmp 0= if true exit then
|
||||
2dup " false" strcmp 0= if true exit then
|
||||
2dup " TRUE" strcmp 0= if 2drop " true" true exit then
|
||||
2dup " FALSE" strcmp 0= if 2drop " false" true exit then
|
||||
2dup s" true" strcmp 0= if true exit then
|
||||
2dup s" false" strcmp 0= if true exit then
|
||||
2dup s" TRUE" strcmp 0= if 2drop s" true" true exit then
|
||||
2dup s" FALSE" strcmp 0= if 2drop s" false" true exit then
|
||||
false
|
||||
;
|
||||
|
||||
@@ -181,7 +181,7 @@ constant config-info.size
|
||||
then
|
||||
|
||||
2swap encode-string 2swap
|
||||
" /options" find-package drop
|
||||
s" /options" find-package drop
|
||||
encode-property
|
||||
;
|
||||
|
||||
@@ -199,7 +199,7 @@ constant config-info.size
|
||||
linefeed parse 2drop
|
||||
|
||||
active-package
|
||||
" /options" find-device
|
||||
s" /options" find-device
|
||||
.properties
|
||||
active-package!
|
||||
;
|
||||
@@ -272,7 +272,7 @@ constant config-info.size
|
||||
dup if 1- then
|
||||
then
|
||||
( name len value-str len )
|
||||
2swap " =" 2swap
|
||||
2swap s" =" 2swap
|
||||
pocket tmpstrcat tmpstrcat drop
|
||||
2dup + 0 swap c!
|
||||
1+
|
||||
@@ -281,7 +281,7 @@ constant config-info.size
|
||||
: nvram-store-configs ( data len -- )
|
||||
2 - \ make room for two trailing zeros
|
||||
|
||||
" /options" find-dev 0= if 2drop exit then
|
||||
s" /options" find-dev 0= if 2drop exit then
|
||||
>r
|
||||
config-root
|
||||
( data len configptr R: phandle )
|
||||
@@ -301,66 +301,66 @@ constant config-info.size
|
||||
\ NVRAM variables
|
||||
\ --------------------------------------------------------
|
||||
\ fcode-debug? input-device output-device
|
||||
" true" " auto-boot?" bool-config \ 7.4.3.5
|
||||
" boot" " boot-command" str-config \ 7.4.3.5
|
||||
" " " boot-file" str-config \ 7.4.3.5
|
||||
" false" " diag-switch?" bool-config \ 7.4.3.5
|
||||
no-conf-def " diag-device" str-config \ 7.4.3.5
|
||||
no-conf-def " diag-file" str-config \ 7.4.3.5
|
||||
" false" " fcode-debug?" bool-config \ 7.7
|
||||
" " " nvramrc" str-config \ 7.4.4.2
|
||||
" false" " oem-banner?" bool-config
|
||||
" " " oem-banner" str-config
|
||||
" false" " oem-logo?" bool-config
|
||||
no-conf-def " oem-logo" str-config
|
||||
" false" " use-nvramrc?" bool-config \ 7.4.4.2
|
||||
" keyboard" " input-device" str-config \ 7.4.5
|
||||
" screen" " output-device" str-config \ 7.4.5
|
||||
" 80" " screen-#columns" int-config \ 7.4.5
|
||||
" 24" " screen-#rows" int-config \ 7.4.5
|
||||
" 0" " selftest-#megs" int-config
|
||||
no-conf-def " security-mode" secmode-config
|
||||
s" true" s" auto-boot?" bool-config \ 7.4.3.5
|
||||
s" boot" s" boot-command" str-config \ 7.4.3.5
|
||||
s" " s" boot-file" str-config \ 7.4.3.5
|
||||
s" false" s" diag-switch?" bool-config \ 7.4.3.5
|
||||
no-conf-def s" diag-device" str-config \ 7.4.3.5
|
||||
no-conf-def s" diag-file" str-config \ 7.4.3.5
|
||||
s" false" s" fcode-debug?" bool-config \ 7.7
|
||||
s" " s" nvramrc" str-config \ 7.4.4.2
|
||||
s" false" s" oem-banner?" bool-config
|
||||
s" " s" oem-banner" str-config
|
||||
s" false" s" oem-logo?" bool-config
|
||||
no-conf-def s" oem-logo" str-config
|
||||
s" false" s" use-nvramrc?" bool-config \ 7.4.4.2
|
||||
s" keyboard" s" input-device" str-config \ 7.4.5
|
||||
s" screen" s" output-device" str-config \ 7.4.5
|
||||
s" 80" s" screen-#columns" int-config \ 7.4.5
|
||||
s" 24" s" screen-#rows" int-config \ 7.4.5
|
||||
s" 0" s" selftest-#megs" int-config
|
||||
no-conf-def s" security-mode" secmode-config
|
||||
|
||||
\ --- devices ---
|
||||
" -1" " pci-probe-mask" int-config
|
||||
" false" " default-mac-address" bool-config
|
||||
" false" " skip-netboot?" bool-config
|
||||
" true" " scroll-lock" bool-config
|
||||
s" -1" s" pci-probe-mask" int-config
|
||||
s" false" s" default-mac-address" bool-config
|
||||
s" false" s" skip-netboot?" bool-config
|
||||
s" true" s" scroll-lock" bool-config
|
||||
|
||||
[IFDEF] CONFIG_PPC
|
||||
\ ---- PPC ----
|
||||
" disk" " boot-device" str-config \ 7.4.3.5
|
||||
" false" " little-endian?" bool-config
|
||||
" false" " real-mode?" bool-config
|
||||
" -1" " real-base" int-config
|
||||
" -1" " real-size" int-config
|
||||
" 4000000" " load-base" int-config
|
||||
" -1" " virt-base" int-config
|
||||
" -1" " virt-size" int-config
|
||||
s" disk" s" boot-device" str-config \ 7.4.3.5
|
||||
s" false" s" little-endian?" bool-config
|
||||
s" false" s" real-mode?" bool-config
|
||||
s" -1" s" real-base" int-config
|
||||
s" -1" s" real-size" int-config
|
||||
s" 4000000" s" load-base" int-config
|
||||
s" -1" s" virt-base" int-config
|
||||
s" -1" s" virt-size" int-config
|
||||
[THEN]
|
||||
|
||||
[IFDEF] CONFIG_X86
|
||||
\ ---- X86 ----
|
||||
" disk" " boot-device" str-config \ 7.4.3.5
|
||||
" true" " little-endian?" bool-config
|
||||
s" disk" s" boot-device" str-config \ 7.4.3.5
|
||||
s" true" s" little-endian?" bool-config
|
||||
[THEN]
|
||||
|
||||
[IFDEF] CONFIG_SPARC32
|
||||
\ ---- SPARC32 ----
|
||||
" true" " tpe-link-test?" bool-config
|
||||
" 9600,8,n,1,-" " ttya-mode" str-config
|
||||
" true" " ttya-ignore-cd" bool-config
|
||||
" false" " ttya-rts-dtr-off" bool-config
|
||||
" 9600,8,n,1,-" " ttyb-mode" str-config
|
||||
" true" " ttyb-ignore-cd" bool-config
|
||||
" false" " ttyb-rts-dtr-off" bool-config
|
||||
s" true" s" tpe-link-test?" bool-config
|
||||
s" 9600,8,n,1,-" s" ttya-mode" str-config
|
||||
s" true" s" ttya-ignore-cd" bool-config
|
||||
s" false" s" ttya-rts-dtr-off" bool-config
|
||||
s" 9600,8,n,1,-" s" ttyb-mode" str-config
|
||||
s" true" s" ttyb-ignore-cd" bool-config
|
||||
s" false" s" ttyb-rts-dtr-off" bool-config
|
||||
[THEN]
|
||||
|
||||
\ --- ??? ---
|
||||
" " " boot-screen" str-config
|
||||
" " " boot-script" str-config
|
||||
" false" " use-generic?" bool-config
|
||||
" " " boot-args" str-config \ ???
|
||||
s" " s" boot-screen" str-config
|
||||
s" " s" boot-script" str-config
|
||||
s" false" s" use-generic?" bool-config
|
||||
s" " s" boot-args" str-config \ ???
|
||||
|
||||
\ defers
|
||||
['] fcode-debug? to _fcode-debug?
|
||||
|
||||
@@ -1307,14 +1307,7 @@ false value capital-hex?
|
||||
+loop
|
||||
repeat
|
||||
over -
|
||||
state @ if
|
||||
['] (lit) , here 5 cells + ,
|
||||
['] (lit) , dup ,
|
||||
['] dobranch ,
|
||||
here -rot
|
||||
/n allot
|
||||
", null-align resolve-orig
|
||||
then
|
||||
handle-text
|
||||
; immediate
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user