Skip to content

Commit 6d0db8a

Browse files
committed
modules/linux: add 6.1 with patches
1 parent 20b9c51 commit 6d0db8a

4 files changed

Lines changed: 88 additions & 0 deletions

File tree

modules/linux

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ linux_hash := a6fbd4ee903c128367892c2393ee0d9657b6ed3ea90016d4dc6f1f6da20b2330
3131
else ifeq "$(CONFIG_LINUX_VERSION)" "5.10.5"
3232
linux_version := 5.10.5
3333
linux_hash := 3991a9e16a187d78d5f414d89236ae5d7f404a69e60c4c42a9d262ee19612ef4
34+
else ifeq "$(CONFIG_LINUX_VERSION)" "6.1"
35+
linux_version := 6.1
36+
linux_hash := 2ca1f17051a430f6fed1196e4952717507171acfd97d96577212502703b25deb
3437
else
3538
$(error "$(BOARD): does not specify linux kernel version under CONFIG_LINUX_VERSION")
3639
endif
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
diff --recursive -u ./clean/linux-4.9.80/drivers/acpi/acpica/evxfevnt.c linux-4.9.80/drivers/acpi/acpica/evxfevnt.c
2+
--- ./clean/linux-4.9.80/drivers/acpi/acpica/evxfevnt.c 2018-02-03 11:05:43.000000000 -0500
3+
+++ linux-4.9.80/drivers/acpi/acpica/evxfevnt.c 2018-02-07 15:51:28.786502597 -0500
4+
@@ -111,6 +111,8 @@
5+
}
6+
7+
ACPI_ERROR((AE_INFO, "Hardware did not enter ACPI mode"));
8+
+printk("%s:%d faking ACPI mode\n", __func__, __LINE__);
9+
+ return_ACPI_STATUS(AE_OK);
10+
return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);
11+
}
12+
13+
diff --recursive -u ./clean/linux-4.9.80/drivers/acpi/acpica/hwacpi.c linux-4.9.80/drivers/acpi/acpica/hwacpi.c
14+
--- ./clean/linux-4.9.80/drivers/acpi/acpica/hwacpi.c 2018-02-03 11:05:43.000000000 -0500
15+
+++ linux-4.9.80/drivers/acpi/acpica/hwacpi.c 2018-02-07 15:51:35.126557868 -0500
16+
@@ -168,12 +168,16 @@
17+
18+
status = acpi_read_bit_register(ACPI_BITREG_SCI_ENABLE, &value);
19+
if (ACPI_FAILURE(status)) {
20+
+printk("%s:%d faking ACPI mode\n", __func__, __LINE__);
21+
+ return_UINT32(ACPI_SYS_MODE_ACPI);
22+
return_UINT32(ACPI_SYS_MODE_LEGACY);
23+
}
24+
25+
if (value) {
26+
return_UINT32(ACPI_SYS_MODE_ACPI);
27+
} else {
28+
+//printk("%s:%d faking ACPI mode\n", __func__, __LINE__);
29+
+// return_UINT32(ACPI_SYS_MODE_ACPI);
30+
return_UINT32(ACPI_SYS_MODE_LEGACY);
31+
}
32+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --recursive -u ./clean/linux-4.9.80/arch/x86/kernel/nmi.c linux-4.9.80/arch/x86/kernel/nmi.c
2+
--- ./clean/linux-4.9.80/arch/x86/kernel/nmi.c 2018-02-03 11:05:43.000000000 -0500
3+
+++ linux-4.9.80/arch/x86/kernel/nmi.c 2018-02-07 18:56:10.475613884 -0500
4+
@@ -303,6 +303,8 @@
5+
6+
__this_cpu_add(nmi_stats.unknown, 1);
7+
8+
+#if 0
9+
+// qemu generates these for some reason
10+
pr_emerg("Uhhuh. NMI received for unknown reason %02x on CPU %d.\n",
11+
reason, smp_processor_id());
12+
13+
@@ -311,6 +313,7 @@
14+
nmi_panic(regs, "NMI: Not continuing");
15+
16+
pr_emerg("Dazed and confused, but trying to continue\n");
17+
+#endif
18+
}
19+
NOKPROBE_SYMBOL(unknown_nmi_error);
20+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
--- ./clean/linux-6.1/arch/x86/realmode/init.c 2023-04-25 18:02:54.932346344 +0200
2+
+++ linux-6.1/arch/x86/realmode/init.c 2023-04-25 18:06:48.384048760 +0200
3+
@@ -55,10 +55,12 @@
4+
5+
/* Has to be under 1M so we can execute real-mode AP code. */
6+
mem = memblock_phys_alloc_range(size, PAGE_SIZE, 0, 1<<20);
7+
- if (!mem)
8+
- pr_info("No sub-1M memory is available for the trampoline\n");
9+
- else
10+
- set_real_mode_mem(mem);
11+
+ if (!mem) {
12+
+ mem = 0x4000;
13+
+ pr_info("No sub-1M memory is available for the trampoline, guessing %p\n", mem);
14+
+ }
15+
+
16+
+ set_real_mode_mem(mem);
17+
18+
/*
19+
* Unconditionally reserve the entire fisrt 1M, see comment in
20+
@@ -202,8 +204,11 @@
21+
22+
static int __init init_real_mode(void)
23+
{
24+
- if (!real_mode_header)
25+
- panic("Real mode trampoline was not allocated");
26+
+ if (!real_mode_header) {
27+
+ // ignore for now
28+
+ pr_warn("Real mode trampoline was not allocated");
29+
+ return 0;
30+
+ }
31+
32+
setup_real_mode();
33+
set_real_mode_permissions();

0 commit comments

Comments
 (0)