shithub: riscv

Download patch

ref: 6dd605dbe273c97f522102ba0324a985583eb86a
parent: 59308f15dd6b375de6ed94f7d50c7a1053e3b7c9
author: cinap_lenrek <[email protected]>
date: Sat Nov 21 18:15:19 EST 2020

pc, pc64: fix grub multiboot

It appears that our IDT overlaps with the data structures
passed from grub in multiboot load.

So defer setup of the interrupt table after the multiboot
parameters have been processed.

--- a/sys/src/9/pc/main.c
+++ b/sys/src/9/pc/main.c
@@ -24,8 +24,8 @@
 main(void)
 {
 	mach0init();
-	trapinit0();
 	bootargsinit();
+	trapinit0();
 	ioinit();
 	i8250console();
 	quotefmtinstall();
--- a/sys/src/9/pc64/main.c
+++ b/sys/src/9/pc64/main.c
@@ -176,8 +176,8 @@
 main(void)
 {
 	mach0init();
-	trapinit0();
 	bootargsinit();
+	trapinit0();
 	ioinit();
 	i8250console();
 	quotefmtinstall();