SHA256
1
0
forked from pool/grub2
grub2/0001-kern-ieee1275-init-Convert-plain-numbers-to-constant.patch
Michael Chang 5420dbe227 Accepting request 1081117 from home:michael-chang:branches:Base:System
- Fix PowerVS deployment fails to boot with 90 cores (bsc#1208581)
  * 0001-kern-ieee1275-init-Convert-plain-numbers-to-constant.patch
  * 0002-kern-ieee1275-init-Extended-support-in-Vec5.patch

OBS-URL: https://build.opensuse.org/request/show/1081117
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=451
2023-04-21 08:21:27 +00:00

51 lines
1.5 KiB
Diff

From 10f3a89078f9a6da7104e0978e385362e16af971 Mon Sep 17 00:00:00 2001
From: Avnish Chouhan <avnish@linux.vnet.ibm.com>
Date: Mon, 27 Mar 2023 12:25:39 +0530
Subject: [PATCH 1/2] kern/ieee1275/init: Convert plain numbers to constants in
Vec5
This patch converts the plain numbers used in Vec5 properties to constants.
1. LPAR: Client program supports logical partitioning and
associated hcall()s.
2. SPLPAR: Client program supports the Shared
Processor LPAR Option.
3. CMO: Enables the Cooperative Memory Over-commitment Option.
4. MAX_CPU: Defines maximum number of CPUs supported.
Signed-off-by: Avnish Chouhan <avnish@linux.vnet.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
grub-core/kern/ieee1275/init.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
index e1dbff86a..eaa25d0db 100644
--- a/grub-core/kern/ieee1275/init.c
+++ b/grub-core/kern/ieee1275/init.c
@@ -61,6 +61,12 @@ extern char _end[];
grub_addr_t grub_ieee1275_original_stack;
#endif
+#define LPAR 0x80
+#define SPLPAR 0x40
+#define BYTE2 (LPAR | SPLPAR)
+#define CMO 0x80
+#define MAX_CPU 256
+
void
grub_exit (void)
{
@@ -378,7 +384,7 @@ grub_ieee1275_ibm_cas (void)
.vec4 = 0x0001, /* set required minimum capacity % to the lowest value */
.vec5_size = 1 + sizeof (struct option_vector5) - 2,
.vec5 = {
- 0, 192, 0, 128, 0, 0, 0, 0, 256
+ 0, BYTE2, 0, CMO, 0, 0, 0, 0, MAX_CPU
}
};
--
2.39.2