Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pMZeB-0005UI-7o for mharc-grub-devel@gnu.org; Mon, 30 Jan 2023 14:16:55 -0500 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 1pMZe4-0005RI-Dp for grub-devel@gnu.org; Mon, 30 Jan 2023 14:16:48 -0500 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 1pMZe2-0004rZ-Nt for grub-devel@gnu.org; Mon, 30 Jan 2023 14:16:48 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30UIOKRD025012; Mon, 30 Jan 2023 19:16:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=d120UPkPd8yEpIP4G3TAxIXlNDhl++bezEWZn117INw=; b=Ho8tAYUH+tVkGyzgiUgDMG1D3eJsBA96nlCICh+cedHGvBJcVwVfil+DygkYgpm5cYXD nFcGcpQM2JWsgakRPwvcDH7DXf/8aOhh5kPaKVcFKwPHehDGy2atwudihLsxXwg14Rtm UjvUoKVFvp6za15i18YEtg7GxRyLefeIK4gYEJSIbDuxzjtkcUZItEHvs9yGJuV4tblJ ymqysgHVGBoypZH/9nkaiIfB22vhPD7cwwKwAr+W3bqRATo+RQ6paKwhh222YvUtFMcJ CWwi6gM6WT6dIT4TEeOZvjAzNGcIqchJmQRuHHgLKCqFGFsHmiEU1MZhE66uPVOBUT+U Jw== Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nefvtya0v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Jan 2023 19:16:43 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30UIEKam019216; Mon, 30 Jan 2023 19:16:42 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([9.208.130.98]) by ppma02dal.us.ibm.com (PPS) with ESMTPS id 3ncvuqf85u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Jan 2023 19:16:42 +0000 Received: from smtpav04.wdc07v.mail.ibm.com (smtpav04.wdc07v.mail.ibm.com [10.39.53.231]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30UJGeFS11010764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Jan 2023 19:16:41 GMT Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9CF7058050; Mon, 30 Jan 2023 19:16:40 +0000 (GMT) Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D156758045; Mon, 30 Jan 2023 19:16:39 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by smtpav04.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 30 Jan 2023 19:16:39 +0000 (GMT) From: Stefan Berger To: grub-devel@gnu.org, dkiper@net-space.pl Cc: development@efficientek.com, diegodo@linux.vnet.ibm.com, dja@axtens.net, sudhakar@linux.ibm.com, nasastry@in.ibm.com, Stefan Berger Subject: [PATCH v3 4/6] ieee1275: implement vec5 for cas negotiation Date: Mon, 30 Jan 2023 14:16:19 -0500 Message-Id: <20230130191621.3518274-5-stefanb@linux.ibm.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230130191621.3518274-1-stefanb@linux.ibm.com> References: <20230130191621.3518274-1-stefanb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: hwuJAYipIqp-Mzu5Zaxok7WT0e5Bg88B X-Proofpoint-ORIG-GUID: hwuJAYipIqp-Mzu5Zaxok7WT0e5Bg88B X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-30_17,2023-01-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 bulkscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=999 spamscore=0 mlxscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301300180 Received-SPF: pass client-ip=148.163.156.1; envelope-from=stefanb@linux.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_PASS=-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, 30 Jan 2023 19:16:48 -0000 From: Diego Domingos As a legacy support, if the vector 5 is not implemented, Power Hypervisor will consider the max CPUs as 64 instead 256 currently supported during client-architecture-support negotiation. This patch implements the vector 5 and set the MAX CPUs to 256 while setting the others values to 0 (default). Signed-off-by: Diego Domingos Acked-by: Daniel Axtens Signed-off-by: Stefan Berger --- grub-core/kern/ieee1275/init.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c index 726fcdd36..22e99d425 100644 --- a/grub-core/kern/ieee1275/init.c +++ b/grub-core/kern/ieee1275/init.c @@ -500,6 +500,19 @@ struct option_vector2 grub_uint8_t max_pft_size; } GRUB_PACKED; +struct option_vector5 +{ + grub_uint8_t byte1; + grub_uint8_t byte2; + grub_uint8_t byte3; + grub_uint8_t cmo; + grub_uint8_t associativity; + grub_uint8_t bin_opts; + grub_uint8_t micro_checkpoint; + grub_uint8_t reserved0; + grub_uint32_t max_cpus; +} GRUB_PACKED; + struct pvr_entry { grub_uint32_t mask; @@ -521,6 +534,8 @@ struct cas_vector grub_uint16_t vec3; grub_uint8_t vec4_size; grub_uint16_t vec4; + grub_uint8_t vec5_size; + struct option_vector5 vec5; } GRUB_PACKED; /* @@ -545,7 +560,7 @@ grub_ieee1275_ibm_cas (void) struct cas_vector vector = { .pvr_list = { { 0x00000000, 0xffffffff } }, /* any processor */ - .num_vecs = 4 - 1, + .num_vecs = 5 - 1, .vec1_size = 0, .vec1 = 0x80, /* ignore */ .vec2_size = 1 + sizeof (struct option_vector2) - 2, @@ -556,6 +571,10 @@ grub_ieee1275_ibm_cas (void) .vec3 = 0x00e0, /* ask for FP + VMX + DFP but don't halt if unsatisfied */ .vec4_size = 2 - 1, .vec4 = 0x0001, /* set required minimum capacity % to the lowest value */ + .vec5_size = 1 + sizeof (struct option_vector5) - 2, + .vec5 = { + 0, 0, 0, 0, 0, 0, 0, 0, 256 + } }; INIT_IEEE1275_COMMON (&args.common, "call-method", 3, 2); -- 2.25.1