Skip to content

Commit 80912a3

Browse files
committed
protos/multiboot2: Ignore top-down relocation hint as we do not properly support it
1 parent c8cdc9e commit 80912a3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

common/protos/multiboot2.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,20 +326,23 @@ noreturn void multiboot2_load(char *config, char* cmdline) {
326326

327327
switch (reloc_tag.preference) {
328328
default:
329-
case 0: case 1: // Prefer lowest to highest
329+
case 0: case 1: case 2: // Prefer lowest to highest
330330
reloc_ascend = true;
331331
relocated_base = ALIGN_UP(reloc_tag.min_addr, reloc_tag.align);
332332
if (relocated_base + ranges->length > reloc_tag.max_addr) {
333333
goto reloc_fail;
334334
}
335335
break;
336+
/*
337+
XXX: We do not support this properly, hence ignore, for now.
336338
case 2: // Prefer highest to lowest
337339
reloc_ascend = false;
338340
relocated_base = ALIGN_DOWN(reloc_tag.max_addr - ranges->length, reloc_tag.align);
339341
if (relocated_base < reloc_tag.min_addr) {
340342
goto reloc_fail;
341343
}
342344
break;
345+
*/
343346
}
344347

345348
for (;;) {

0 commit comments

Comments
 (0)