Skip to content

Commit 4f88f35

Browse files
committed
kexec patch: remove unneeded xen EBDA patch.
Tested on x230 against Q4.2 (xen 4.17) and Q4.1 (xen 4.14) which changed behavior since original patch. For history, EBDA patch was introduced when Xen stopped being packed inside of Heads (yes. Xen was inside of Heads in the beginning). Things have been upstreamed since then. Note: Q4.1 and 4.2 gets vga on x230 when i915 driver is loaded in plymouth boot stage.
1 parent 7cf99a5 commit 4f88f35

1 file changed

Lines changed: 0 additions & 32 deletions

File tree

patches/kexec-2.0.26.patch

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -102,38 +102,6 @@ index 14263b0..55291d6 100644
102102
real_mode->lfb_width = var.xres;
103103
real_mode->lfb_height = var.yres;
104104
real_mode->lfb_depth = var.bits_per_pixel;
105-
diff --git a/kexec/kexec.c b/kexec/kexec.c
106-
index 0e92d96..f7984a8 100644
107-
--- a/kexec/kexec.c
108-
+++ b/kexec/kexec.c
109-
@@ -807,6 +807,27 @@ static int my_load(const char *type, int fileind, int argc, char **argv,
110-
if (sort_segments(&info) < 0) {
111-
return -1;
112-
}
113-
+
114-
+#if 1
115-
+ // force segment 0 to have memsz == bufsz
116-
+ // so that it won't overwrite EBDA
117-
+ if (info.segment[0].mem == 0)
118-
+ {
119-
+ if (kexec_debug)
120-
+ printf("hack ebda into segment 0!\n");
121-
+
122-
+ uint8_t * ebda = calloc(1, info.segment[0].memsz);
123-
+ memcpy(ebda, info.segment[0].buf, info.segment[0].bufsz);
124-
+ info.segment[0].bufsz = info.segment[0].memsz;
125-
+ info.segment[0].buf = ebda;
126-
+
127-
+ // install some default EBDA values that are off scale,
128-
+ // which will force Xen to use the multiboot info
129-
+ *(uint16_t*)(ebda + 0x40e) = 0xFFFF; // segment
130-
+ *(uint16_t*)(ebda + 0x413) = 0xFFFF; // size
131-
+ }
132-
+#endif
133-
+
134-
/* if purgatory is loaded update it */
135-
update_purgatory(&info);
136-
if (entry)
137105
diff --git a/purgatory/Makefile b/purgatory/Makefile
138106
index 4d2d071..ee5c642 100644
139107
--- a/purgatory/Makefile

0 commit comments

Comments
 (0)