68000: allow configuration of di/ei masks
authorAlan Cox <alan@linux.intel.com>
Sat, 26 Jan 2019 22:25:30 +0000 (22:25 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 26 Jan 2019 22:25:30 +0000 (22:25 +0000)
We need this as the Atari ST for example expects to run at IPL 3 otherwise
you get bombed with horizontal timing interrupts

Kernel/kernel-68000.def
Kernel/lowlevel-68000.S

index 3930101..d39a2f0 100644 (file)
@@ -1,3 +1,5 @@
+#include "platform/kernel.def"
+
 /* Keep these in sync with struct u_data!! */
 
 #define U_DATA__U_PTAB         0
index 075a32e..af3bb75 100644 (file)
@@ -407,12 +407,17 @@ set_usp:  move.l 4(sp),a0
  */
 __hard_di:
                move.w sr,d0
-               and.w #$0700,d0
-               or.w #$0700,sr
+               move.w d0,d1
+               and.w #$F8FF,d1
+               or.w #DI_MASK,d1
+               move.w d1,sr
                rts
 
 __hard_ei:
-               and.w #$F8FF,sr
+               move.w sr,d0
+               and.w #$F8FF,d0
+               or.w #EI_MASK,d0
+               move.w d0,sr
                rts
 
 __hard_irqrestore: