[openfirmware] [commit] r2223 - cpu/x86/pc/biosload
repository service
svn at openfirmware.info
Wed May 25 22:27:40 CEST 2011
Author: wmb
Date: Wed May 25 22:27:40 2011
New Revision: 2223
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2223
Log:
BIOSload version - Fixed direct BIOS call gateway and used it for VESA BIOS calls, thus enabling the use of VESA framebuffers without needing syslinux.
Modified:
cpu/x86/pc/biosload/callbios.fth
cpu/x86/pc/biosload/callvbe.fth
cpu/x86/pc/biosload/fw.bth
Modified: cpu/x86/pc/biosload/callbios.fth
==============================================================================
--- cpu/x86/pc/biosload/callbios.fth Wed May 25 09:03:39 2011 (r2222)
+++ cpu/x86/pc/biosload/callbios.fth Wed May 25 22:27:40 2011 (r2223)
@@ -79,7 +79,7 @@
op: pushf op: pusha ds push es push fs push gs push
cli
- cs ax mov ax ds mov
+ ax ax xor ax ds mov \ Assumes that the real-mode buffers are in the low 64K
op: pm-gdt-save #) lgdt
cr0 ax mov 1 # al or ax cr0 mov
@@ -151,7 +151,7 @@
\ Video - INT 10
: video-mode ( mode# -- )
- d# 55 set-tick-limit h# 10 bios{ 3 al bx }bios d# 10 set-tick-limit
+ ( d# 55 set-tick-limit ) h# 10 bios{ 3 al bx }bios ( d# 10 set-tick-limit )
;
: text-mode 3 video-mode ;
: 1024x768x8 h# 105 video-mode ;
Modified: cpu/x86/pc/biosload/callvbe.fth
==============================================================================
--- cpu/x86/pc/biosload/callvbe.fth Wed May 25 09:03:39 2011 (r2222)
+++ cpu/x86/pc/biosload/callvbe.fth Wed May 25 22:27:40 2011 (r2223)
@@ -1,6 +1,7 @@
\ Call VESA BIOS from a syslinux-loaded ".c32" image
\ COM32 arguments are at 0 @ 4 +
+[ifndef] bios{
code vesa-mode ( mode# -- )
cx pop
@@ -76,6 +77,22 @@
h# 4f01 vbe-call ( )
h# 200 +c32-regs ( adr )
;
+: current-vesa-mode ( -- mode# ) h# 4f03 vbe-call 'c32-bx l@ ;
+: set-vesa-mode ( mode# -- ) 'c32-bx w! h# 4f02 vbe-call ;
+[else]
+h# 2000 constant vesa-rm-buf
+: vbe-info ( -- adr )
+ vesa-rm-buf ( adr )
+ h# 32454256 over l! ( adr )
+ h# 10 bios{ dup es:di h# 4f00 ax }bios ( adr )
+;
+: vesa-mode-info ( mode# -- adr )
+ h# 10 bios{ cx h# 2000 dup es:di h# 4f01 ax }bios ( adr )
+;
+: current-vesa-mode ( -- mode# ) h# 10 bios{ h# 4f03 ax }bios bios-bx l@ ;
+: set-vesa-mode ( mode# -- ) h# 10 bios{ bx h# 4f02 ax }bios ;
+[then]
+
: .vesa-mode-info ( mode# -- )
push-hex dup 3 u.r space
vesa-mode-info >r ( r: adr )
@@ -201,7 +218,5 @@
3e.l MaxPixelClock
[then]
-: current-vesa-mode ( -- mode# ) h# 4f03 vbe-call 'c32-bx l@ ;
-: set-vesa-mode ( mode# -- ) 'c32-bx w! h# 4f02 vbe-call ;
: set-linear-mode ( mode# -- ) h# 4000 or set-vesa-mode ;
: vesa-lfb-adr ( mode# -- padr ) h# 4000 or vesa-mode-info h# 28 + l@ ;
Modified: cpu/x86/pc/biosload/fw.bth
==============================================================================
--- cpu/x86/pc/biosload/fw.bth Wed May 25 09:03:39 2011 (r2222)
+++ cpu/x86/pc/biosload/fw.bth Wed May 25 22:27:40 2011 (r2223)
@@ -185,6 +185,8 @@
fload ${BP}/cpu/x86/pc/rmtools.fth
+fload ${BP}/cpu/x86/pc/biosload/callbios.fth
+
[ifdef] syslinux-loaded
fload ${BP}/cpu/x86/pc/biosload/callvbe.fth
[then]
@@ -247,7 +249,6 @@
fload ${BP}/cpu/x86/pc/biosload/usb.fth
-fload ${BP}/cpu/x86/pc/biosload/callbios.fth
\ fload ${BP}/cpu/x86/pc/biosload/rmenter.fth
\ false to stand-init-debug?
@@ -262,7 +263,7 @@
standalone? if
cr ." Type 'i' to interrupt stand-init sequence" cr
- d# 2000 ms
+ d# 1000 ms
key? if
key upc ascii I = if ." Interacting" cr hex interact then
then
More information about the openfirmware
mailing list