Author: mcayland
Date: Sat Jul 27 15:17:49 2013
New Revision: 1198
URL: http://tracker.coreboot.org/trac/openbios/changeset/1198
Log:
terminal.fs: fix handling of backspace (0x8) control code
Annex B.2 of the IEEE1275 specification mentions that this code moves the
cursor one position to the left on the current line (i.e. it shouldn't
attempt to redraw any characters).
Remove the character redraw code to bring in line with the specification
which also has the side-effect of fixing the spinner used by quik.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/forth/device/terminal.fs
Modified: trunk/openbios-devel/forth/device/terminal.fs
==============================================================================
--- trunk/openbios-devel/forth/device/terminal.fs Sat Jul 27 15:17:47 2013 (r1197)
+++ trunk/openbios-devel/forth/device/terminal.fs Sat Jul 27 15:17:49 2013 (r1198)
@@ -240,10 +240,8 @@
endof
8 of \ BS
column# 0<> if
- column# dup
- to column#
- 20 draw-character 1-
- to column#
+ column# 1- to column#
+ toggle-cursor exit
then
endof
9 of \ TAB
Author: mcayland
Date: Sat Jul 27 15:17:47 2013
New Revision: 1197
URL: http://tracker.coreboot.org/trac/openbios/changeset/1197
Log:
terminal.fs: fix handling of NULL (0x0) control code
NULL is defined as a no-op, so make sure that we detect it and exit (term-emit)
immediately. Otherwise we fall through to the default code which redraws the
character and advances the column by 1.
This fixes the staggered line output that appear in quik.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/forth/device/terminal.fs
Modified: trunk/openbios-devel/forth/device/terminal.fs
==============================================================================
--- trunk/openbios-devel/forth/device/terminal.fs Sat Jul 27 15:17:43 2013 (r1196)
+++ trunk/openbios-devel/forth/device/terminal.fs Sat Jul 27 15:17:47 2013 (r1197)
@@ -230,6 +230,9 @@
then
case
+ 0 of \ NULL
+ toggle-cursor exit
+ endof
7 of \ BEL
blink-screen
s" /screen" s" ring-bell"
Author: mcayland
Date: Sat Jul 27 15:17:43 2013
New Revision: 1196
URL: http://tracker.coreboot.org/trac/openbios/changeset/1196
Log:
terminal.fs: fix accidental display of control characters and column position
When processing a control code, make sure we exit (term-emit) immediately
rather than falling through to the end of the function. Otherwise we still
call draw-character and advance the column as per normal character codes.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/forth/device/terminal.fs
Modified: trunk/openbios-devel/forth/device/terminal.fs
==============================================================================
--- trunk/openbios-devel/forth/device/terminal.fs Sat Jul 27 15:17:41 2013 (r1195)
+++ trunk/openbios-devel/forth/device/terminal.fs Sat Jul 27 15:17:43 2013 (r1196)
@@ -249,6 +249,7 @@
else
8 + -8 and ff and to column#
then
+ toggle-cursor exit
endof
a of \ LF
line# 1+ to line#
@@ -264,6 +265,7 @@
line# 0<> if
line# 1- to line#
then
+ toggle-cursor exit
endof
c of \ FF
0 to column# 0 to line#
@@ -271,6 +273,7 @@
endof
d of \ CR
0 to column#
+ toggle-cursor exit
endof
1b of \ ESC
1b (sequence) c!
Author: mcayland
Date: Sat Jul 27 15:17:41 2013
New Revision: 1195
URL: http://tracker.coreboot.org/trac/openbios/changeset/1195
Log:
video: rename qemu-video-* words to openbios-video-*
Now that the second half of the display rework is complete, the qemu-video-*
words are no longer QEMU-specific. This is because we now initialise the
defaults to the value of the VGA_DEFAULT_* constants and only attempt to
override them with the values supplied by the QEMU firmware interface if
built with CONFIG_QEMU enabled.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/drivers/tcx.fs
trunk/openbios-devel/drivers/vga.fs
trunk/openbios-devel/forth/device/display.fs
trunk/openbios-devel/libopenbios/video_common.c
Modified: trunk/openbios-devel/drivers/tcx.fs
==============================================================================
--- trunk/openbios-devel/drivers/tcx.fs Sat Jul 27 13:22:06 2013 (r1194)
+++ trunk/openbios-devel/drivers/tcx.fs Sat Jul 27 15:17:41 2013 (r1195)
@@ -12,28 +12,28 @@
\ and height, grab the ones passed in by QEMU/generated by OpenBIOS
\
-: qemu-video-addr
- " qemu-video-addr" $find if
+: openbios-video-addr
+ " openbios-video-addr" $find if
cell+ @
then
;
-: qemu-video-width
- " qemu-video-width" $find if
+: openbios-video-width
+ " openbios-video-width" $find if
cell+ @
then
;
-: qemu-video-height
- " qemu-video-height" $find if
+: openbios-video-height
+ " openbios-video-height" $find if
cell+ @
then
;
: qemu-tcx-driver-install ( -- )
- qemu-video-addr to frame-buffer-adr
+ openbios-video-addr to frame-buffer-adr
default-font set-font
- qemu-video-width qemu-video-height over char-width / over char-height /
+ openbios-video-width openbios-video-height over char-width / over char-height /
fb8-install
;
Modified: trunk/openbios-devel/drivers/vga.fs
==============================================================================
--- trunk/openbios-devel/drivers/vga.fs Sat Jul 27 13:22:06 2013 (r1194)
+++ trunk/openbios-devel/drivers/vga.fs Sat Jul 27 15:17:41 2013 (r1195)
@@ -12,28 +12,28 @@
\ and height, grab the ones passed in by QEMU/generated by OpenBIOS
\
-: qemu-video-addr
- " qemu-video-addr" $find if
+: openbios-video-addr
+ " openbios-video-addr" $find if
cell+ @
then
;
-: qemu-video-width
- " qemu-video-width" $find if
+: openbios-video-width
+ " openbios-video-width" $find if
cell+ @
then
;
-: qemu-video-height
- " qemu-video-height" $find if
+: openbios-video-height
+ " openbios-video-height" $find if
cell+ @
then
;
: qemu-vga-driver-install ( -- )
- qemu-video-addr to frame-buffer-adr
+ openbios-video-addr to frame-buffer-adr
default-font set-font
- qemu-video-width qemu-video-height over char-width / over char-height /
+ openbios-video-width openbios-video-height over char-width / over char-height /
fb8-install
;
Modified: trunk/openbios-devel/forth/device/display.fs
==============================================================================
--- trunk/openbios-devel/forth/device/display.fs Sat Jul 27 13:22:06 2013 (r1194)
+++ trunk/openbios-devel/forth/device/display.fs Sat Jul 27 15:17:41 2013 (r1195)
@@ -50,10 +50,10 @@
0 value line-bytes
0 value display-ih
-\ internal values read from QEMU firmware interface
-0 value qemu-video-addr
-0 value qemu-video-height
-0 value qemu-video-width
+\ internal values
+0 value openbios-video-addr
+0 value openbios-video-height
+0 value openbios-video-width
\ The following wordset is called the "defer word interface" of the
\ terminal-emulator support package. It gets overloaded by fb1-install
Modified: trunk/openbios-devel/libopenbios/video_common.c
==============================================================================
--- trunk/openbios-devel/libopenbios/video_common.c Sat Jul 27 13:22:06 2013 (r1194)
+++ trunk/openbios-devel/libopenbios/video_common.c Sat Jul 27 15:17:41 2013 (r1195)
@@ -224,11 +224,11 @@
feval("['] display-ih cell+");
video.ih = cell2pointer(POP());
- feval("['] qemu-video-addr cell+");
+ feval("['] openbios-video-addr cell+");
video.mvirt = cell2pointer(POP());
- feval("['] qemu-video-width cell+");
+ feval("['] openbios-video-width cell+");
video.w = cell2pointer(POP());
- feval("['] qemu-video-height cell+");
+ feval("['] openbios-video-height cell+");
video.h = cell2pointer(POP());
feval("['] depth-bits cell+");
video.depth = cell2pointer(POP());
Thanks to all who commented on this thread. It seems clear that OpenBIOS
won't enhance voting security.
Special thanks to _tarl-b2(a)tarl.net_ (mailto:tarl-b2@tarl.net) for the tip
on "trusted boot". That hardware/firmware solution appears to go a long
way toward preventing any tampering with BIOS. It isn't really necessary to
have a voting system that is impossible to subvert, as long as there are
techniques like buying absentee ballots, gerrymandering and preventing
certain groups from voting that are far easier to implement or provide far more
votes per dollar.
Chuck Gaston
In a message dated 7/23/2013 4:28:55 P.M. Eastern Daylight Time,
tarl-b2(a)tarl.net writes:
On 2013-Jul-23 16:15 , Mark Morgan Lloyd wrote:
>>>
>>
>> And having the USB keyboard work (which means USB HID support, USB hub
>> support, USB controller support, PCI support, etc).
>
> Although IIRC there's a simplified protocol for the keyboard,
> specifically for BIOS support. I've seen people discussing that in the
> context of devices such as the Parallax Propeller which don't really
> have USB support.
Not for USB. Whatever they may be talking about, they aren't getting USB
- there's no real way to enable EHCI/OHCI/UHCI/XHCI without implementing
the entire shebang.
>>
>> Once the control of the hardware has been taken over, there is no way
>> to take it back.
>
>
> Or put another way, you might /think/ you've regained full control,
> but you can never /know/ :-)
The problem of secure execution is fairly well understood. Google
"Verified Boot" or "Trusted Boot". The implementations that take it
seriously do verification of their PROM, sign it, and the hardware won't
let you start unless the PROM is good. Then the PROM verifies the
signature of each component as it's brought in (I was recently involved
in implementing public key verification for such).
It doesn't guarantee bug-free code, but it verifies that the code you
are running is what you think it is.
--
OpenBIOS http://openbios.org/
Mailinglist: http://lists.openbios.org/mailman/listinfo
Free your System - May the Forth be with you