|
|
fd0330 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
fd0330 |
From: Daniel Axtens <dja@axtens.net>
|
|
|
fd0330 |
Date: Mon, 6 Sep 2021 15:46:12 +1000
|
|
|
fd0330 |
Subject: [PATCH] powerpc: Drop Open Hack'Ware - remove
|
|
|
fd0330 |
GRUB_IEEE1275_FLAG_FORCE_CLAIM
|
|
|
fd0330 |
|
|
|
fd0330 |
Open Hack'Ware was the only user. It added a lot of complexity.
|
|
|
fd0330 |
|
|
|
fd0330 |
Signed-off-by: Daniel Axtens <dja@axtens.net>
|
|
|
fd0330 |
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
|
|
fd0330 |
(cherry picked from commit 333e63b356f1ce833cda1937ed8351618cbdf9d3)
|
|
|
fd0330 |
---
|
|
|
fd0330 |
grub-core/kern/ieee1275/init.c | 6 +-----
|
|
|
fd0330 |
grub-core/lib/ieee1275/relocator.c | 4 ----
|
|
|
fd0330 |
grub-core/loader/powerpc/ieee1275/linux.c | 14 --------------
|
|
|
fd0330 |
include/grub/ieee1275/ieee1275.h | 11 -----------
|
|
|
fd0330 |
4 files changed, 1 insertion(+), 34 deletions(-)
|
|
|
fd0330 |
|
|
|
fd0330 |
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
|
|
|
fd0330 |
index 0dcd114ce5..6581c2c996 100644
|
|
|
fd0330 |
--- a/grub-core/kern/ieee1275/init.c
|
|
|
fd0330 |
+++ b/grub-core/kern/ieee1275/init.c
|
|
|
fd0330 |
@@ -207,11 +207,7 @@ grub_claim_heap (void)
|
|
|
fd0330 |
{
|
|
|
fd0330 |
unsigned long total = 0;
|
|
|
fd0330 |
|
|
|
fd0330 |
- if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_FORCE_CLAIM))
|
|
|
fd0330 |
- heap_init (GRUB_IEEE1275_STATIC_HEAP_START, GRUB_IEEE1275_STATIC_HEAP_LEN,
|
|
|
fd0330 |
- 1, &total);
|
|
|
fd0330 |
- else
|
|
|
fd0330 |
- grub_machine_mmap_iterate (heap_init, &total);
|
|
|
fd0330 |
+ grub_machine_mmap_iterate (heap_init, &total);
|
|
|
fd0330 |
}
|
|
|
fd0330 |
#endif
|
|
|
fd0330 |
|
|
|
fd0330 |
diff --git a/grub-core/lib/ieee1275/relocator.c b/grub-core/lib/ieee1275/relocator.c
|
|
|
fd0330 |
index c6dd8facb0..d1bb45c75e 100644
|
|
|
fd0330 |
--- a/grub-core/lib/ieee1275/relocator.c
|
|
|
fd0330 |
+++ b/grub-core/lib/ieee1275/relocator.c
|
|
|
fd0330 |
@@ -38,8 +38,6 @@ grub_relocator_firmware_get_max_events (void)
|
|
|
fd0330 |
{
|
|
|
fd0330 |
int counter = 0;
|
|
|
fd0330 |
|
|
|
fd0330 |
- if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_FORCE_CLAIM))
|
|
|
fd0330 |
- return 0;
|
|
|
fd0330 |
grub_machine_mmap_iterate (count, &counter);
|
|
|
fd0330 |
return 2 * counter;
|
|
|
fd0330 |
}
|
|
|
fd0330 |
@@ -92,8 +90,6 @@ grub_relocator_firmware_fill_events (struct grub_relocator_mmap_event *events)
|
|
|
fd0330 |
.counter = 0
|
|
|
fd0330 |
};
|
|
|
fd0330 |
|
|
|
fd0330 |
- if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_FORCE_CLAIM))
|
|
|
fd0330 |
- return 0;
|
|
|
fd0330 |
grub_machine_mmap_iterate (grub_relocator_firmware_fill_events_iter, &ctx;;
|
|
|
fd0330 |
return ctx.counter;
|
|
|
fd0330 |
}
|
|
|
fd0330 |
diff --git a/grub-core/loader/powerpc/ieee1275/linux.c b/grub-core/loader/powerpc/ieee1275/linux.c
|
|
|
fd0330 |
index 818b2a86d1..6fdd863130 100644
|
|
|
fd0330 |
--- a/grub-core/loader/powerpc/ieee1275/linux.c
|
|
|
fd0330 |
+++ b/grub-core/loader/powerpc/ieee1275/linux.c
|
|
|
fd0330 |
@@ -111,20 +111,6 @@ grub_linux_claimmap_iterate (grub_addr_t target, grub_size_t size,
|
|
|
fd0330 |
.found_addr = (grub_addr_t) -1
|
|
|
fd0330 |
};
|
|
|
fd0330 |
|
|
|
fd0330 |
- if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_FORCE_CLAIM))
|
|
|
fd0330 |
- {
|
|
|
fd0330 |
- grub_uint64_t addr = target;
|
|
|
fd0330 |
- if (addr < GRUB_IEEE1275_STATIC_HEAP_START
|
|
|
fd0330 |
- + GRUB_IEEE1275_STATIC_HEAP_LEN)
|
|
|
fd0330 |
- addr = GRUB_IEEE1275_STATIC_HEAP_START
|
|
|
fd0330 |
- + GRUB_IEEE1275_STATIC_HEAP_LEN;
|
|
|
fd0330 |
- addr = ALIGN_UP (addr, align);
|
|
|
fd0330 |
- if (grub_claimmap (addr, size) == GRUB_ERR_NONE)
|
|
|
fd0330 |
- return addr;
|
|
|
fd0330 |
- return (grub_addr_t) -1;
|
|
|
fd0330 |
- }
|
|
|
fd0330 |
-
|
|
|
fd0330 |
-
|
|
|
fd0330 |
grub_machine_mmap_iterate (alloc_mem, &ctx;;
|
|
|
fd0330 |
|
|
|
fd0330 |
return ctx.found_addr;
|
|
|
fd0330 |
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
|
|
|
fd0330 |
index b5a1d49bbc..6a1d3e5d70 100644
|
|
|
fd0330 |
--- a/include/grub/ieee1275/ieee1275.h
|
|
|
fd0330 |
+++ b/include/grub/ieee1275/ieee1275.h
|
|
|
fd0330 |
@@ -85,14 +85,6 @@ extern grub_ieee1275_ihandle_t EXPORT_VAR(grub_ieee1275_mmu);
|
|
|
fd0330 |
|
|
|
fd0330 |
extern int (* EXPORT_VAR(grub_ieee1275_entry_fn)) (void *) GRUB_IEEE1275_ENTRY_FN_ATTRIBUTE;
|
|
|
fd0330 |
|
|
|
fd0330 |
-/* Static heap, used only if FORCE_CLAIM is set,
|
|
|
fd0330 |
- happens on Open Hack'Ware. Should be in platform-specific
|
|
|
fd0330 |
- header but is used only on PPC anyway.
|
|
|
fd0330 |
-*/
|
|
|
fd0330 |
-#define GRUB_IEEE1275_STATIC_HEAP_START 0x1000000
|
|
|
fd0330 |
-#define GRUB_IEEE1275_STATIC_HEAP_LEN 0x1000000
|
|
|
fd0330 |
-
|
|
|
fd0330 |
-
|
|
|
fd0330 |
enum grub_ieee1275_flag
|
|
|
fd0330 |
{
|
|
|
fd0330 |
/* Old World Macintosh firmware fails seek when "dev:0" is opened. */
|
|
|
fd0330 |
@@ -119,9 +111,6 @@ enum grub_ieee1275_flag
|
|
|
fd0330 |
/* Open Hack'Ware stops when grub_ieee1275_interpret is used. */
|
|
|
fd0330 |
GRUB_IEEE1275_FLAG_CANNOT_INTERPRET,
|
|
|
fd0330 |
|
|
|
fd0330 |
- /* Open Hack'Ware has no memory map, just claim what we need. */
|
|
|
fd0330 |
- GRUB_IEEE1275_FLAG_FORCE_CLAIM,
|
|
|
fd0330 |
-
|
|
|
fd0330 |
/* Open Hack'Ware don't support the ANSI sequence. */
|
|
|
fd0330 |
GRUB_IEEE1275_FLAG_NO_ANSI,
|
|
|
fd0330 |
|