Hi all,
I want to ask if it is possible to add non standard VGA modes like 800x480
to seabios vgabios implementation. I want to be able to use it for qemu.
After looking at the code I am puzzeled about the "random numbers"
e.g. [1].
Can you hint me to any documentation or books I can read to understand
what they are doing?
best regards,
Bernhard
1 http://code.coreboot.org/p/seabios/source/tree/master/vgasrc/vgatables.c
--
Scanned by MailScanner.
With gcc 4.6.0 (20110530) and ld version 2.21.52.0.1-5.fc16 I get the
following compilation errors/warnings:
Working around non-functional -combine
Working around non-functional -combine
Working around non-functional -combine
Build Kconfig config file
Compiling whole program out/ccode.16.s
Compiling to assembler out/asm-offsets.s
In file included from out/ccode.16.s.tmp.c:35:0:
out/../src/ahci.c: In function ‘ahci_detect’:
out/../src/ahci.c:411:25: warning: variable ‘port’ set but not used
[-Wunused-but-set-variable]
Compiling whole program out/ccode32flat.o
Compiling whole program out/code32seg.o
Generating offset file out/asm-offsets.h
Compiling (16bit) out/code16.o
In file included from out/ccode32flat.o.tmp.c:35:0:
out/../src/ahci.c: In function ‘ahci_detect’:
out/../src/ahci.c:411:25: warning: variable ‘port’ set but not used
[-Wunused-but-set-variable]
In file included from out/ccode32flat.o.tmp.c:57:0:
out/../src/bmp.c: At top level:
out/../src/bmp.c:15:16: error: redefinition of ‘struct tagBITMAPFILEHEADER’
out/../src/bmp.c:15:16: note: originally defined here
out/../src/bmp.c:21:3: error: conflicting types for ‘BITMAPFILEHEADER’
out/../src/bmp.c:21:3: note: previous declaration of ‘BITMAPFILEHEADER’
was here
out/../src/bmp.c:21:21: error: conflicting types for ‘tagBITMAPFILEHEADER’
out/../src/bmp.c:21:21: note: previous declaration of
‘tagBITMAPFILEHEADER’ was here
out/../src/bmp.c:23:16: error: redefinition of ‘struct tagBITMAPINFOHEADER’
out/../src/bmp.c:23:16: note: originally defined here
out/../src/bmp.c:35:3: error: conflicting types for ‘BITMAPINFOHEADER’
out/../src/bmp.c:35:3: note: previous declaration of ‘BITMAPINFOHEADER’
was here
out/../src/bmp.c:35:21: error: conflicting types for ‘tagBITMAPINFOHEADER’
out/../src/bmp.c:35:21: note: previous declaration of
‘tagBITMAPINFOHEADER’ was here
out/../src/bmp.c:37:16: error: redefinition of ‘struct tagRGBQUAD’
out/../src/bmp.h:6:12: note: originally defined here
out/../src/bmp.c:42:3: error: conflicting types for ‘RGBQUAD’
out/../src/bmp.c:42:3: note: previous declaration of ‘RGBQUAD’ was here
out/../src/bmp.c:42:12: error: conflicting types for ‘tagRGBQUAD’
out/../src/bmp.c:42:12: note: previous declaration of ‘tagRGBQUAD’ was here
out/../src/bmp.c:50:13: error: redefinition of
‘raw_data_format_adjust_24bpp’
out/../src/bmp.c:50:13: note: previous definition of
‘raw_data_format_adjust_24bpp’ was here
out/../src/bmp.c:61:21: error: redefinition of ‘bmp_alloc’
out/../src/bmp.c:61:21: note: previous definition of ‘bmp_alloc’ was here
out/../src/bmp.c:67:5: error: redefinition of ‘bmp_decode’
out/../src/bmp.c:67:5: note: previous definition of ‘bmp_decode’ was here
out/../src/bmp.c:86:6: error: redefinition of ‘bmp_get_size’
out/../src/bmp.c:86:6: note: previous definition of ‘bmp_get_size’ was here
out/../src/bmp.c:93:5: error: redefinition of ‘bmp_show’
out/../src/bmp.c:93:5: note: previous definition of ‘bmp_show’ was here
make: *** [out/ccode32flat.o] Error 1
make: *** Waiting for unfinished jobs....
cp: cannot stat `out/bios.bin': No such file or directory
cp: cannot stat `out/bios.bin': No such file or directory
cp: cannot stat `out/bios.bin': No such file or directory
cp: cannot stat `out/bios.bin': No such file or directory
cp: cannot stat `out/bios.bin': No such file or directory
The following patch fixes them.
Signed-off-by: Stefan Berger <stefanb(a)linux.vnet.ibm.com>
diff --git a/Makefile b/Makefile
index 2786c9e..a4ca497 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ SRC16=$(SRCBOTH) system.c disk.c font.c
SRC32FLAT=$(SRCBOTH) post.c shadow.c memmap.c coreboot.c boot.c \
acpi.c smm.c mptable.c smbios.c pciinit.c optionroms.c mtrr.c \
lzmadecode.c bootsplash.c jpeg.c usb-hub.c paravirt.c \
- pci_region.c biostables.c xen.c bmp.c
+ pci_region.c biostables.c xen.c
SRC32SEG=util.c output.c pci.c pcibios.c apm.c stacks.c
cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
diff --git a/src/ahci.c b/src/ahci.c
index fb4b70c..f7bd4b5 100644
--- a/src/ahci.c
+++ b/src/ahci.c
@@ -408,7 +408,6 @@ static void
ahci_detect(void *data)
{
struct ahci_ctrl_s *ctrl = data;
- struct ahci_port_s *port;
u32 pnr, max;
int rc;
@@ -422,7 +421,7 @@ ahci_detect(void *data)
dprintf(1, "AHCI/%d: link %s\n", pnr, rc == 0 ? "up" : "down");
if (rc != 0)
continue;
- port = ahci_port_init(ctrl, pnr);
+ ahci_port_init(ctrl, pnr);
}
}
On Sun, Feb 21, 2010 at 04:18:38PM -0700, Brandon Bennett wrote:
> > On Sat, Feb 20, 2010 at 9:05 PM, Kevin O'Connor <kevin(a)koconnor.net> wrote:
> >> Should a kernel fail during boot, I'd suspect it doesn't like one of
> >> the apm/pcibios callbacks, or it doesn't like one of the
> >> smbios/mptable/acpi tables. You could try compiling the SeaBIOS code
> >> (see http://seabios.org/Download ) and increasing the debugging by
> >> modifying src/config.h. Specifically, you could increase
> >> CONFIG_DEBUG_LEVEL, and set DEBUG_HDL_pcibios32 and DEBUG_HDL_apm to
> >> 1. Also, you could try disabling some of the features to see if that
> >> prevents the fault (eg, disabling CONFIG_ACPI / CONFIG_SMBIOS /
> >> CONFIG_MPTABLE).
> >
>
> I have narrowed it down to SMBIOS. If I disable CONFIG_SMBIOS the
> image boots up fine.
Gleb, have you seen this thread?
Some of the recent changes to smbios that look like possible culprits
are:
Make SMBIOS table pass MS SVVP test
Use MaxCountCPUs during building of per cpu tables.
Add malloc_high/fseg() and rework bios table creation to use them.
There were other changes, but the comments indicate they were only
ports of changes already in bochs. I suppose it's also possible the
lack of smbios is turning off some other feature in the guest (eg,
acpi) that's the real culprit.
-Kevin
debug_serial() was doing a full flush while debug_serial_flush() was
only doing a partial flush. Fix that.
---
Changes from v1 - fix bit math so it actually checks the correct bit.
---
src/output.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/output.c b/src/output.c
index 5c91ae5..462ffb7 100644
--- a/src/output.c
+++ b/src/output.c
@@ -49,7 +49,7 @@ debug_serial(char c)
if (!CONFIG_DEBUG_SERIAL)
return;
int timeout = DEBUG_TIMEOUT;
- while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x60) != 0x60)
+ while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x20) != 0x20)
if (!timeout--)
// Ran out of time.
return;
@@ -63,7 +63,7 @@ debug_serial_flush(void)
if (!CONFIG_DEBUG_SERIAL)
return;
int timeout = DEBUG_TIMEOUT;
- while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x40) != 0x40)
+ while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x60) != 0x60)
if (!timeout--)
// Ran out of time.
return;
--
1.7.4.4
debug_serial() was doing a full flush while debug_serial_flush() was
only doing a partial flush. Fix that.
---
src/output.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/output.c b/src/output.c
index 5c91ae5..8b8371f 100644
--- a/src/output.c
+++ b/src/output.c
@@ -49,7 +49,7 @@ debug_serial(char c)
if (!CONFIG_DEBUG_SERIAL)
return;
int timeout = DEBUG_TIMEOUT;
- while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x60) != 0x60)
+ while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x40) != 0x40)
if (!timeout--)
// Ran out of time.
return;
@@ -63,7 +63,7 @@ debug_serial_flush(void)
if (!CONFIG_DEBUG_SERIAL)
return;
int timeout = DEBUG_TIMEOUT;
- while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x40) != 0x40)
+ while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x60) != 0x60)
if (!timeout--)
// Ran out of time.
return;
--
1.7.4.4
This patch series is the last of the 'struct pci_device' code
conversions. The goal of this series is to replace the use of 'u16
bdf' with 'struct pci_device' in the boot priority code. At the end
of this series the 'find_pci()' code, which was introduced in the
beginning of the pci_device conversion, can be removed.
-Kevin
Kevin O'Connor (7):
Push 'struct pci_device' into USB code (instead of using u16 bdf).
Push use of 'struct pci_device' to bootprio_find_usb().
Push use of 'struct pci_device' to bootprio_find_pci_device().
Push use of 'struct pci_device' to bootprio_find_fdc_device().
Push use of 'struct pci_device' to bootprio_find_ata_device().
Push use of 'struct pci_device' to bootprio_find_pci_rom().
Remove now unneeded find_pci().
src/ata.c | 20 +++++++++++---------
src/ata.h | 1 +
src/boot.c | 37 ++++++++++++-------------------------
src/boot.h | 11 ++++++-----
src/floppy.c | 2 +-
src/optionroms.c | 4 ++--
src/usb-ehci.c | 40 +++++++++++++++-------------------------
src/usb-ehci.h | 2 +-
src/usb-msc.c | 4 ++--
src/usb-ohci.c | 5 +++--
src/usb-ohci.h | 2 +-
src/usb-uhci.c | 5 +++--
src/usb-uhci.h | 2 +-
src/usb.c | 6 +++---
src/usb.h | 2 +-
src/virtio-blk.c | 7 ++++---
16 files changed, 67 insertions(+), 83 deletions(-)
--
1.7.4.4