Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pggob-0005PH-OB for mharc-grub-devel@gnu.org; Mon, 27 Mar 2023 02:58:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pggoV-0005P0-19 for grub-devel@gnu.org; Mon, 27 Mar 2023 02:58:43 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pggoS-00029N-T5 for grub-devel@gnu.org; Mon, 27 Mar 2023 02:58:42 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32R6gp7l000887; Mon, 27 Mar 2023 06:58:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=BTvN1T9F1eUK7Rq9iHfVpXvui72q9mGEA9/RUYGcR9A=; b=qB3RSkECzx1ygD4PDL2j5TixjZjVu3AzgCuDLi7sTYvLBui1BMVzeEab0a33kRTBbNob iA5OXAUg4LMNNorl6w5p7P71o4m3u7oB6qR5ZhCC1EjKWJBmUHM9NtSQXAqomMCSB5Fm PtnqeoVzNAJjSix0ASFXX6Dod6967MWLqzNhqwhw5Mcm4wAbiVdTEkTHUZbXVVHvztF5 wpa1lcV/6vEvpydiaD1E9hPsoy29PjkQ4iayfFoKx+Mh7rY5nKxWabUJr7eyChF2w6Uc ZzjBQjDtp6PkUIG9NcMicvRjs8aDEbFoYgTfs8rtAVIMlIjw6O6btyH+ghFOT2/MUYHH UQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pjartyn0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Mar 2023 06:58:36 +0000 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32R6sj7w010224; Mon, 27 Mar 2023 06:58:36 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pjartyn0e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Mar 2023 06:58:36 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32QGt1M4010293; Mon, 27 Mar 2023 06:58:33 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma04ams.nl.ibm.com (PPS) with ESMTPS id 3phrk6jdkk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Mar 2023 06:58:33 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32R6wVOB28967468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Mar 2023 06:58:31 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 570D12004D; Mon, 27 Mar 2023 06:58:31 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B310920040; Mon, 27 Mar 2023 06:58:28 +0000 (GMT) Received: from li-5fd77d4c-2a67-11b2-a85c-de894c326bed.in.ibm.com (unknown [9.109.242.131]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 27 Mar 2023 06:58:28 +0000 (GMT) From: Avnish Chouhan To: grub-devel@gnu.org Cc: meghanaprakash@in.ibm.com, brking@linux.vnet.ibm.com, mchauras@linux.vnet.ibm.com, mamatha4@linux.vnet.ibm.com, rharwood@redhat.com, mlewando@redhat.com, mchang@suse.com, msuchanek@suse.com, dkiper@net-space.pl, Avnish Chouhan Subject: [PATCH v2 1/2] ieee1275 : Converting plain numbers to constants in Vec5 Date: Mon, 27 Mar 2023 12:25:39 +0530 Message-Id: <20230327065540.10927-1-avnish@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 7PmkA2juiN0rH9v9dEWMkdcxeUQhV8mO X-Proofpoint-GUID: F7AC6sU5_q7h2Y0DjAF3LLOhRFtKCXly X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-24_11,2023-03-24_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 clxscore=1011 mlxlogscore=999 impostorscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2303270053 Received-SPF: none client-ip=148.163.156.1; envelope-from=avnish@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2023 06:58:43 -0000 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 3. CMO : Enables the Cooperative Memory Over-commitment Option. 4. MAX_CPU : Defines maximum number of CPUs supported. Signed-off-by: Avnish Chouhan --- Change log: V2 - Split the patch as suggested by Daniel Kiper. - Converted existing plain numbers to constants. --- 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 7337e28..72474a9 100644 --- a/grub-core/kern/ieee1275/init.c +++ b/grub-core/kern/ieee1275/init.c @@ -72,6 +72,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) { @@ -573,7 +579,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.31.1