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