linuxbios + epia-m + vga success, here are details

David Ashley dash at xdr.com
Fri Jul 18 00:11:38 CEST 2003


I included my epia-m contents when I pulled from the linuxbios cvs
snapshot, then made some changes.

My setup is we have a custom pci card in the slot of the epia-m that
has an rtl8139 as well as some other parts. This causes some special
problems. We want to boot of the pci card, not the internal via-rhine
chip. The problem was that the other circuitry on the pci card was
generating an interrupt, so when the board was soft reset there would be
a lockup as soon as the rtl8139 interrupt became active--there was no driver
present to ack the interrupt and make it go away.

SO to fix that problem I made the epia-m reboot (see earlysetup.inc) once
on startup. It uses CMOS ram byte 0x0e as a marker to tell whether we've
already rebooted. In order to access CMOS this early in linuxbios the
firewire device has to be moved out of the way, it defaults to answering
PCI IO address 0000-, so the CMOS access ports 0x70-0x71 can't be seen.
I don't know if my method here is strictly kosher but it seems to work
so far.

Incidentally there is a bug in the rtl8139.c driver of etherboot (and linux
for that matter). The use of the IntrStatus register (word 0x3e) is incorrect.
It is read only, any read clears all interrupts. The drivers behave as if
they have to write 1 bits back to this register to explicitly clear interrupt
request bits. This not the case. Careful reading of the rtl8139 data sheet
explains how the register works.

VGA system: There is a bit that has to be set in the device 0 function 0
pci registers to enable the VGA, as well as set its memory size. My setup is
to hardcode it to 32 megs of ram. ADLO + Bochs are not used at all since we
only want to boot into linux, no other legacy OS's. In another post on this
newsgroup were instructions on how to get the pcbios features working to
add a dummy bios as well as vga bios. In order to get the vga bios to write
to 0xc0000 the shadow ram has to be enabled there.

I extracted the VGA bios as described in the ADLO docs, doing the dd on
/proc/kcore.

I'm going
Linuxbios -> etherboot 5.0.10 -> tftp linux
The linux bootfile is produced with mkelfImage version 2.5, I'm using this
command:
	/ram/mkelfImage-2.5/objdir/sbin/mkelfImage  \
	  --command-line="root=/dev/ram console=ttyS0,115200 console=tty0" \
	  --kernel=/build/linux-via/arch/i386/boot/bzImage \
	  --ramdisk=/code/bootfiles/bootfiles/rd.gz \
	  --type=bzImage-i386 \
	  --output=bootfile_via_insecure

Now what do I have?

I have some simple bios boot message appearing on startup, VIA CLE266 appears
as well as some other text in the upper left. The system boots and launched
XFree86 without problems. No frame buffer device, I'm using VIA's own XFree86
drivers. Everything I've tested works, however a couple of applications using
SDL wig out the X server and cause it to seg fault, this should be easy to
track down. Also for some reasom the lm_sensors readings
cat /proc/sys/dev/sensors/vt1211-isa-ec00/temp*
are no longer valid, they seem frozen at some arbitrary values.

Linuxbios logs lots of biosint messages, some of which are unsupported:
biosint: # 0x15, eax 0x5f19 ebx 0x810 ecx 0x20 edx 0x3d4                        
biosint: ebp 0x11c30 esp 0xfca edi 0x44 esi 0xfffeb167                          
biosint: ip 0x4ef9 cs 0x44 flags 0x86                                           

biosint: Unsupport int #0x15                                                    
biosint: # 0x15, eax 0x5f0f ebx 0x10 ecx 0x20 edx 0x3d5                         
biosint: ebp 0x11c30 esp 0xff0 edi 0x44 esi 0xfffe0000                          
biosint: ip 0x5c98 cs 0x0 flags 0x2                                             

biosint: Unsupport int #0x15                                                    
biosint: # 0x15, eax 0x5f02 ebx 0x10 ecx 0x20 edx 0x3d4                         
biosint: ebp 0x11c30 esp 0xfde edi 0x44 esi 0xfffe0000                          
biosint: ip 0x4008 cs 0x0 flags 0x46                                            

biosint: Unsupport int #0x15                                                    
biosint: # 0x15, eax 0x5f18 ebx 0x10 ecx 0x20 edx 0x3d4                         
biosint: ebp 0x10000 esp 0xff0 edi 0x44 esi 0xfffe0000                          
biosint: ip 0x5d7f cs 0x0 flags 0x86                                            

In another email someone said these could be implemented, the VIA
BIOS PORTING GUIDE describes what they need to do. That might relate to
the crashing of XFree86.

Performance seems to be perhaps 10-15% slower than under the stock bios,
but that's not certain.

I've attached a uuencoded copy of my epia-m directory contents from
the freebios tree. I think that's all I've touched.

Hope this saves other people some time.
-Dave

begin 644 epia-m.tgz
M'XL(`*HF$S\``^T;:W/:QC9?T:_8QLD4'!LD(6'LE#LC&]EABL$%[+YR1R.D
MQ58#DJJ'L9N;_W[/6:T08`1)G+J/L&T,G-WSV+-[7JM5&%B5B>FX0\\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