about summary refs log tree commit diff
path: root/pkgs/applications/virtualization/bochs/fix-build-smp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/virtualization/bochs/fix-build-smp.patch')
-rw-r--r--pkgs/applications/virtualization/bochs/fix-build-smp.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkgs/applications/virtualization/bochs/fix-build-smp.patch b/pkgs/applications/virtualization/bochs/fix-build-smp.patch
new file mode 100644
index 000000000000..faa2acfa5129
--- /dev/null
+++ b/pkgs/applications/virtualization/bochs/fix-build-smp.patch
@@ -0,0 +1,21 @@
+Description: A fix for SMP-enable configurations
+Inspired in: https://sourceforge.net/p/bochs/code/13778/
+
+============
+diff -Naur bochs-2.6.11-old/bx_debug/dbg_main.cc bochs-2.6.11-new/bx_debug/dbg_main.cc
+--- bochs-2.6.11-old/bx_debug/dbg_main.cc	2019-12-20 04:57:59.818924000 -0300
++++ bochs-2.6.11-new/bx_debug/dbg_main.cc	2020-03-30 23:20:29.402195707 -0300
+@@ -1494,11 +1494,11 @@
+ {
+   char cpu_param_name[16];
+ 
+-  Bit32u index = BX_ITLB_INDEX_OF(laddr);
++  Bit32u index = BX_CPU(dbg_cpu)->ITLB.get_index_of(laddr);
+   sprintf(cpu_param_name, "ITLB.entry%d", index);
+   bx_dbg_show_param_command(cpu_param_name, 0);
+ 
+-  index = BX_DTLB_INDEX_OF(laddr, 0);
++  index = BX_CPU(dbg_cpu)->DTLB.get_index_of(laddr);
+   sprintf(cpu_param_name, "DTLB.entry%d", index);
+   bx_dbg_show_param_command(cpu_param_name, 0);
+ }