A little patch

Philipp Rumpf prumpf at jcsbs.lanobis.de
Sun Nov 15 03:28:03 CET 1998


On Sun, Nov 15, 1998 at 02:40:24AM +0100, daniel.engstrom at riksnett.no wrote:
> On 15 Nov, Philipp Rumpf wrote:
> >> Can anybody figure out why the memtest fails? (boot/init32/memtest.S) 
> > 
> > %edx is 0 ?
> > cause you write
> > 
> > cmpl    $0, %edx        # did we relocate earlier ?
> > je      .out
> >         ^^^^ does not reset %eax, which is 0x10000 in the moment
> Thanks, (blaming the coffee) fixed now, time to hunt the next bug.

What one ? Apropos bug: Stefan, when do you want to put a new devbios
version on the net, here is my patch (against 0.2.100) again (I'll post
it here cause it's small enough and if some people are brave enough to
flash OpenBIOS sometime soon they should be sure they don't run into one
of the bugs and cause their system to hard-reboot half-way of flashing
a new BIOS(as this is definitely _no_ good time to reboot)).

I am currently reading the 82371 / 82430 documentation, perhaps I'll be
able to write something tomorrow, but my 3am code is not that good normally.

	Philipp Rumpf (prumpf at jcsbs.lanobis.de)
-------------- next part --------------
diff -ur devbios-0.2.100/ChangeLog devbios-p-0.2.100/ChangeLog
--- devbios-0.2.100/ChangeLog	Tue Aug 18 12:23:57 1998
+++ devbios-p-0.2.100/ChangeLog	Sun Sep  6 00:28:28 1998
@@ -1,5 +1,16 @@
 ChangeLog for /dev/bios 
 
+** 09/06/98 * ??????? ************************************************
+
+patches by prumpf at jcsbs.lanobis.de:
+
+ * The pointer to bios_release in bios.c was on the flush pointer's
+   position. This caused Oopses.
+ * When bios_read was called with a file position after the actual end
+   of bios, it tried to read non-existant memory positions due to size
+   being unsigned (it isn't anymore) , causing spontaneous reboots on
+   my system
+
 ** 08/18/98 * 0.2.100 ************************************************
 
  * Threw out the mem_type stuff. There are more important things than
diff -ur devbios-0.2.100/bios.c devbios-p-0.2.100/bios.c
--- devbios-0.2.100/bios.c	Tue Aug 18 12:38:18 1998
+++ devbios-p-0.2.100/bios.c	Sun Sep  6 00:20:42 1998
@@ -418,7 +418,7 @@
 
 static ssize_t bios_read(struct file *file, char *buffer, size_t count, loff_t *ppos)
 {
-	unsigned int size=((BIOS_SIZE-*ppos>count) ? count : BIOS_SIZE-*ppos);
+	signed int size=((BIOS_SIZE-*ppos>count) ? count : BIOS_SIZE-*ppos);
 	int i;
 
 	bios=flashdevices[FDEV].start;
@@ -620,6 +620,7 @@
 	NULL,			/* No ioctl */
 	NULL,			/* No mmap */
 	bios_open,
+	NULL,			/* No flush */
 	bios_release
 };
 


More information about the openbios mailing list