Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p0qr1-0006nI-Eq for mharc-grub-devel@gnu.org; Thu, 01 Dec 2022 16:12:23 -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 1p0qqz-0006n0-Ds for grub-devel@gnu.org; Thu, 01 Dec 2022 16:12:21 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5] helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0qqx-0000h5-H8 for grub-devel@gnu.org; Thu, 01 Dec 2022 16:12:21 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B1KirMZ015339; Thu, 1 Dec 2022 21:12:16 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=OA9bP8duy7aKN4qWVmdrf1ewcCEL5FPtjtai1YmPrVA=; b=kFM7LcWiniAgNh2SvqSxeCynLW7K4V6CKdg6UUNKj4+0/yl3IWzerjpxitXaWcOZcPaP u9Iyn/pSgX9CP327uAOqFAaudM3jdX/r4r3tQm9RisUzp0MQfNnxGKM6zknoZj+7fzSI yg/+cB8V17hp73+5lkqxuMNyfEu+OrmpNI91flRMFnNexy5cL5UAP+guM/DPrPA92/kl 0FeYh756SQZGOpw0qGHlj142MWLZM75iiX80lOePFBpV4Du7RjA4wtSRPhxq8rbZolFh B8+D/oGMeHk8+/kzfnP1O1zgkwOeO026Evs6LE6r+KjPxiB4TQtxsPBnm9GLz5VsXKro jg== Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3m72dgarbg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 21:12:15 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2B1L651P015013; Thu, 1 Dec 2022 21:12:15 GMT Received: from smtprelay04.dal12v.mail.ibm.com ([9.208.130.102]) by ppma02dal.us.ibm.com with ESMTP id 3m3aea6ndv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 21:12:15 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay04.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B1LCDZR41025828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Dec 2022 21:12:14 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D246B5803F; Thu, 1 Dec 2022 21:12:13 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6012758061; Thu, 1 Dec 2022 21:12:13 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 1 Dec 2022 21:12:13 +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 Subject: [PATCH v2 2/6] ieee1275: drop len -= 1 quirk in heap_init Date: Thu, 1 Dec 2022 16:11:57 -0500 Message-Id: <20221201211201.2915206-3-stefanb@linux.ibm.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221201211201.2915206-1-stefanb@linux.ibm.com> References: <20221201211201.2915206-1-stefanb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: G5NyrzyQxC-66bxu6tYHVnWuSspdk_0l X-Proofpoint-ORIG-GUID: G5NyrzyQxC-66bxu6tYHVnWuSspdk_0l X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-01_14,2022-12-01_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 mlxscore=0 impostorscore=0 adultscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 suspectscore=0 phishscore=0 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212010161 Received-SPF: pass client-ip=148.163.158.5; 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, RCVD_IN_MSPIKE_H2=-0.001, 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: Thu, 01 Dec 2022 21:12:21 -0000 From: Daniel Axtens This was apparently 'required by some firmware': commit dc9468500919 ("2007-02-12 Hollis Blanchard "). It's not clear what firmware that was, and what platform from 14 years ago which exhibited the bug then is still both in use and buggy now. It doesn't cause issues on qemu (mac99 or pseries) or under PFW for Power8. I don't have access to old Mac hardware, but if anyone feels especially strongly we can put it under some feature flag. I really want to disable it under pseries because it will mess with region merging. Signed-off-by: Daniel Axtens --- grub-core/kern/ieee1275/init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c index 0bc571e3e..bb234b268 100644 --- a/grub-core/kern/ieee1275/init.c +++ b/grub-core/kern/ieee1275/init.c @@ -166,7 +166,6 @@ heap_init (grub_uint64_t addr, grub_uint64_t len, grub_memory_type_t type, addr = 0x180000; } } - len -= 1; /* Required for some firmware. */ /* Never exceed HEAP_MAX_SIZE */ if (*total + len > HEAP_MAX_SIZE) -- 2.25.1