Just an update on progress.
The X server crash was caused by our custom Xinput module
not intializing a feedback device handler, SDL makes use of this probably
related to joystick use. The call I needed to add is
InitPtrFeedbackClassDeviceStruct however this is unrelated to linuxbios and
was just a coincidence. I think I had gotten the problem before linuxbios
but it didn't cause a seg fault of the X server for some reason. Who knows?
The lm_sensors stuff wasn't working because the vt1211 superio device sensor
machinery wasn't initialized or turned on. The stock bios initializes it
but linuxbios doesn't. I added to epia-m's mainboard.c this table:
static unsigned char vt1211hwmonitorinits[]={
0x10,0x3, 0x11,0x10, 0x12,0xd, 0x13,0x7f,
0x14,0x21, 0x15,0x81, 0x16,0xbd, 0x17,0x8a,
0x18,0x0, 0x19,0x0, 0x1a,0x0, 0x1b,0x0,
0x1d,0xff, 0x1e,0x0, 0x1f,0x73, 0x20,0x67,
0x21,0xc1, 0x22,0xca, 0x23,0x74, 0x24,0xc2,
0x25,0xc7, 0x26,0xc9, 0x27,0x7f, 0x29,0x0,
0x2a,0x0, 0x2b,0xff, 0x2c,0x0, 0x2d,0xff,
0x2e,0x0, 0x2f,0xff, 0x30,0x0, 0x31,0xff,
0x32,0x0, 0x33,0xff, 0x34,0x0, 0x39,0xff,
0x3a,0x0, 0x3b,0xff, 0x3c,0xff, 0x3d,0xff,
0x3e,0x0, 0x3f,0xb0, 0x43,0xff, 0x44,0xff,
0x46,0xff, 0x47,0x50, 0x4a,0x3, 0x4b,0xc0,
0x4c,0x0, 0x4d,0x0, 0x4e,0xf, 0x5d,0x77,
0x5c,0x0, 0x5f,0x33, 0x40,0x1};
And inside mainboard_fixup() this function:
// initialize vt1211 hardware monitor registers, which are at 0xECXX
for(i=0;i<sizeof(vt1211hwmonitorinits);i+=2)
outb(vt1211hwmonitorinits[i+1],0xec00+vt1211hwmonitorinits[i]);
This seems to work.
I also am using CMOS registers 0x80+ to store a bootrom version string.
In our application we actually might prefer to remove the cmos battery.
There was mention of the performance being 15% slow, this is real and was
fixed by inplementing the bios callback for int 21 ax=0x5f18:
Inside src/arch/i386/lib/idt.c
case MEMSIZE:
// who cares.
eax = 64 * 1024;
ret = 0;
break;
+#ifdef CONFIG_INT21HANDLER
+ case 0x15:
+ ret=handleint21( &edi, &esi, &ebp, &esp,
+ &ebx, &edx, &ecx, &eax, &flags);
+ break;
+#endif
default:
printk_info(__FUNCTION__ ": Unsupport int #0x%x\n",
intnumber);
break;
}
Inside epia-m/mainboard.c again:
int handleint21( unsigned long *edi, unsigned long *esi, unsigned long *ebp,
unsigned long *esp, unsigned long *ebx, unsigned long *edx,
unsigned long *ecx, unsigned long *eax, unsigned long *flags)
{
int res=-1;
switch(*eax&0xffff)
{
case 0x5f19:
break;
case 0x5f18:
*eax=0x5f;
*ebx=0x15; // MCLK = 133, 32M frame buffer
res=0;
break;
}
return res;
}
--- And then inside the Config file:
option CONFIG_INT21HANDLER=1
NOW: Everything appears fine except for these:
1) Serial port baud settings are not working correctly, something
strange is happening. Probably some io device stepping on another.
2) DDR ram is hardcoded for some certain type of DDR module, instead of
reading the SPD eeprom chip to determine the module configuration.
I had at least 2 types of DDR modules, one of which doesn't work with
the current setup. It has 8 chips labeled GET (128M total). The one that
works has 16 chips labeled ICT (128M total also).
-Dave
>From linuxbios-admin(a)clustermatic.org Thu Jul 17 21:24:43 2003
>From: David Ashley <dash(a)xdr.com>
>To: Linuxbios(a)clustermatic.org
>Subject: linuxbios + epia-m + vga success, here are details
>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.
>