Re: [PATCH] NMI trap revised (was Re: NMI errors in 2.0.30??)

tenthumbs@cybernex.net
Fri, 09 May 1997 16:37:16 GMT


On Fri, 9 May 1997 18:06:07 +0200, you wrote:

> > Again, this depends on how much trust you have in the hardware setup.
>
> Hmmm... I don't have much trust in the hardware setup, but we should not
> enable the parity check HW if it's disabled as it can crash the machine.
> And switching the parity checks off probably doesn't make sense => no extra
> setup is necessary.
>

I agree. It is certainly wrong to enable parity checks if non-parity memory is
used. However, not enabling parity checks may also be wrong.

Maybe, it would be better to provide a method fo rextra hardware setup. How
about something like the attached patch to setup.S. If you need it, you just
turn it on; if you don't, nothing extra is generated.

John

--- setup.S.orig Fri May 9 12:23:12 1997
+++ setup.S Fri May 9 12:27:47 1997
@@ -242,6 +242,24 @@
xor bx,bx ! clear bx
int 0x16

+!
+! Extra setup for those with specific hardware problems.
+! If CONFIG_RM_EXTRA_SETUP is defined, then you must have
+! a extra_setup.S file and it must have an entry point named
+! extra_setup. Beyond that, there are no restrictions.
+! If CONFIG_RM_EXTRA_SETUP is not defined, no extra code is generated.
+!
+
+#ifdef CONFIG_RM_EXTRA_SETUP
+ pusha
+ push ds
+ push es
+ call extra_setup
+ pop es
+ pop ds
+ popa
+#endif
+
! Check for video adapter and its parameters and allow the
! user to browse video modes.

@@ -700,6 +718,14 @@
gdt_48:
.word 0x800 ! gdt limit=2048, 256 GDT entries
.word 512+gdt,0x9 ! gdt base = 0X9xxxx
+
+!
+! Include extra setup code
+!
+
+#ifdef CONFIG_RM_EXTRA_SETUP
+#include "extra_setup.S"
+#endif

!
! Include video setup & detection code