851216d
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
851216d
From: Daniel Axtens <dja@axtens.net>
851216d
Date: Mon, 6 Sep 2021 15:46:11 +1000
851216d
Subject: [PATCH] powerpc: Drop Open Hack'Ware
851216d
851216d
Open Hack'Ware was an alternative firmware of powerpc under QEMU.
851216d
851216d
The last commit to any Open Hack'Ware repo I can find is from 2014 [1].
851216d
851216d
Open Hack'Ware was used for the QEMU "prep" machine type, which was
851216d
deprecated in QEMU in commit 54c86f5a4844 (hw/ppc: deprecate the
851216d
machine type 'prep', replaced by '40p') in QEMU v3.1, and had reportedly
851216d
been broken for years before without anyone noticing. Support was removed
851216d
in February 2020 by commit b2ce76a0730e (hw/ppc/prep: Remove the
851216d
deprecated "prep" machine and the OpenHackware BIOS).
851216d
851216d
Open Hack'Ware's limitations require some messy code in GRUB. This
851216d
complexity is not worth carrying any more.
851216d
851216d
Remove detection of Open Hack'Ware. We will clean up the feature flags
851216d
in following commits.
851216d
851216d
[1]: https://github.com/qemu/openhackware and
851216d
     https://repo.or.cz/w/openhackware.git are QEMU submodules. They have
851216d
     only small changes on top of OHW v0.4.1, which was imported into
851216d
     QEMU SCM in 2010. I can't find anything resembling an official repo
851216d
     any more.
851216d
851216d
Signed-off-by: Daniel Axtens <dja@axtens.net>
851216d
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
851216d
(cherry picked from commit f9ce538eec88c5cffbfde021c4e8a95a5e9d0e8f)
851216d
---
851216d
 grub-core/kern/ieee1275/cmain.c | 16 ----------------
851216d
 1 file changed, 16 deletions(-)
851216d
851216d
diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c
851216d
index dce7b84922..cb42f60ebe 100644
851216d
--- a/grub-core/kern/ieee1275/cmain.c
851216d
+++ b/grub-core/kern/ieee1275/cmain.c
851216d
@@ -49,7 +49,6 @@ grub_ieee1275_find_options (void)
851216d
   grub_ieee1275_phandle_t root;
851216d
   grub_ieee1275_phandle_t options;
851216d
   grub_ieee1275_phandle_t openprom;
851216d
-  grub_ieee1275_phandle_t bootrom;
851216d
   int rc;
851216d
   grub_uint32_t realmode = 0;
851216d
   char tmp[256];
851216d
@@ -198,21 +197,6 @@ grub_ieee1275_find_options (void)
851216d
 
851216d
       grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_HAS_CURSORONOFF);
851216d
     }
851216d
-
851216d
-  if (! grub_ieee1275_finddevice ("/rom/boot-rom", &bootrom)
851216d
-      || ! grub_ieee1275_finddevice ("/boot-rom", &bootrom))
851216d
-    {
851216d
-      rc = grub_ieee1275_get_property (bootrom, "model", tmp, sizeof (tmp), 0);
851216d
-      if (rc >= 0 && !grub_strncmp (tmp, "PPC Open Hack'Ware",
851216d
-				    sizeof ("PPC Open Hack'Ware") - 1))
851216d
-	{
851216d
-	  grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_OUTPUT);
851216d
-	  grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS);
851216d
-	  grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CANNOT_INTERPRET);
851216d
-	  grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_FORCE_CLAIM);
851216d
-	  grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_ANSI);
851216d
-	}
851216d
-    }
851216d
 }
851216d
 
851216d
 void