EPIA + CONFIG_VGABIOS works

SONE Takeshi ts1 at cma.co.jp
Thu May 22 03:43:00 CEST 2003


Sorry, forgot to attach the files!

--
Takeshi
-------------- next part --------------
diff -urN freebios-cvs/src/arch/i386/lib/vgabios.c freebios-vgabios/src/arch/i386/lib/vgabios.c
--- freebios-cvs/src/arch/i386/lib/vgabios.c	2002-03-30 08:11:05.000000000 +0900
+++ freebios-vgabios/src/arch/i386/lib/vgabios.c	2003-05-21 19:06:04.000000000 +0900
@@ -160,12 +160,19 @@
     printk_debug("NO VGA FOUND\n");
     return;
   }
-  printk_debug("found VGA: vid=%ux, did=%ux\n", dev->vendor, dev->device);
+  printk_debug("found VGA: vid=%x, did=%x\n", dev->vendor, dev->device);
+
+#ifdef VGABIOS_START
+  // Use VGA BIOS blob at specified address
+  rom = VGABIOS_START;
+#else
+  // Use the ROM with the VGA card
   pci_read_config_dword(dev, PCI_ROM_ADDRESS, &rom);
   // paranoia
   rom = 0xf0000000;
   pci_write_config_dword(dev, PCI_ROM_ADDRESS, rom|1);
   printk_debug("rom base, size: %x\n", rom);
+#endif
   buf = (unsigned char *) rom;
   if ((buf[0] == 0x55) && (buf[1] = 0xaa)) {
   	memcpy((void *) 0xc0000, buf, size);
@@ -176,7 +183,9 @@
   	real_mode_switch_call_vga();
   } else 
 	printk_debug("BAD SIGNATURE 0x%x 0x%x\n", buf[0], buf[1]);
+#ifndef VGABIOS_START
   pci_write_config_dword(dev, PCI_ROM_ADDRESS, 0);
+#endif
 }
 
 #endif // (CONFIG_VGABIOS == 1)
diff -urN freebios-cvs/src/bioscall/pcibios.c freebios-vgabios/src/bioscall/pcibios.c
--- freebios-cvs/src/bioscall/pcibios.c	2002-03-31 15:25:56.000000000 +0900
+++ freebios-vgabios/src/bioscall/pcibios.c	2003-05-21 19:05:44.000000000 +0900
@@ -76,7 +76,7 @@
 			*peax = 0;
 				// busnum is an unsigned char;
 				// devfn is an int, so we mask it off. 
-			busdevfn = dev->bus->number | (dev->devfn & 0xff);
+			busdevfn = dev->bus->secondary | (dev->devfn & 0xff);
 			printk_debug("0x%x: return 0x%x\n", func, busdevfn);
 			*pebx = busdevfn;
 			retval = 0;
-------------- next part --------------
#
# LinuxBIOS config file for: VIA epia mini-itx
#

target epia-vgabios

# via epia
mainboard via/epia

# Enable Serial Console for debugging
option SERIAL_CONSOLE=1
option TTYS0_BAUD=115200
option MAXIMUM_CONSOLE_LOGLEVEL=8
option DEFAULT_CONSOLE_LOGLEVEL=8
option DEBUG=1
option SERIAL_POST=1

# Use 256KB Standard Flash as Normal BIOS 
option RAMTEST=1
option STD_FLASH=1
option ZKERNEL_START=0xfffc0000
option ROM_SIZE=262144

# payload size
option PAYLOAD_SIZE=196608

# use ELF Loader
option USE_ELF_BOOT=1

# Boot ELF kernel in IDE hard disk partition
option BOOT_IDE=1
#option IDE_BOOT_DRIVE=0
#option ONE_TRACK=63
option CONFIG_UDELAY_TSC=1

# Boot payload in ROM
#option USE_GENERIC_ROM=1

# our payload 
#payload /home/ts1/memtest86-3.0/memtest
#payload /home/ts1/freebios/util/ADLO/payload
payload /home/ts1/freebios/util/ADLO/video.bios.bin

# Enable video
option HAVE_FRAMEBUFFER=1
# Frame buffer (shared memory) size in Megs
#option SMA_SIZE=8

#option CONFIG_COMPRESS=0

# DIMM type
#option DIMM_PC133=1
#option DIMM_CL2=1

# Run VGA BIOS
option CONFIG_VGABIOS=1
option CONFIG_REALMODE_IDT=1
option CONFIG_PCIBIOS=1
dir src/bioscall
# Have VGA BIOS blob in ROM (note the payload line)
option VGABIOS_START=0xfffc0000


More information about the coreboot mailing list