]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
kern/ieee1275/cmain/ppc64: Introduce flags to identify KVM and PowerVM
authorStefan Berger <stefanb@linux.ibm.com>
Thu, 30 Nov 2023 14:17:20 +0000 (09:17 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 5 Dec 2023 13:37:09 +0000 (14:37 +0100)
Introduce flags to identify PowerVM and KVM on Power and set them where
each type of host has been detected.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Cc: Hari Bathini <hbathini@linux.ibm.com>
Cc: Pavithra Prakash <pavrampu@in.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Carolyn Scherrer <cpscherr@us.ibm.com>
Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Cc: Sourabh Jain <sourabhjain@linux.ibm.com>
grub-core/kern/ieee1275/cmain.c
include/grub/ieee1275/ieee1275.h

index 400d85d28ab601fffd60d7b5034b8566c52f0c0b..e74de32483fd0c226babd88fd5d6e3a5e5d5bcf0 100644 (file)
@@ -126,7 +126,10 @@ grub_ieee1275_find_options (void)
 
 #if defined(__powerpc__)
       if (grub_strncmp (tmp, "IBM,", 4) == 0)
-       grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CAN_TRY_CAS_FOR_MORE_MEMORY);
+       {
+         grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CAN_TRY_CAS_FOR_MORE_MEMORY);
+         grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_POWER_VM);
+       }
 #endif
     }
 
@@ -193,6 +196,9 @@ grub_ieee1275_find_options (void)
       grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM);
 
       grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_HAS_CURSORONOFF);
+#if defined(__powerpc__)
+      grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_POWER_KVM);
+#endif
     }
 }
 
index 9f669fbee4a850837b1ff6b4e729bba4fb7c0734..dddb385149e047193f74ffe35236d51705d6a9db 100644 (file)
@@ -141,6 +141,10 @@ enum grub_ieee1275_flag
    */
   GRUB_IEEE1275_FLAG_CAN_TRY_CAS_FOR_MORE_MEMORY,
 #endif
+
+  GRUB_IEEE1275_FLAG_POWER_VM,
+
+  GRUB_IEEE1275_FLAG_POWER_KVM,
 };
 
 extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag);