Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1016694ybb; Fri, 10 Apr 2020 15:13:44 -0700 (PDT) X-Google-Smtp-Source: APiQypJ1Ova9R53qOjDD/o+5XbcPn2WqerFSneP96kVkkXeJhPiIYcGm0dWCdQLrTP+HlmT1R0TX X-Received: by 2002:ac8:4f4f:: with SMTP id i15mr1220715qtw.329.1586556823922; Fri, 10 Apr 2020 15:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586556823; cv=none; d=google.com; s=arc-20160816; b=IWBGgD3WDlWoTqE/KXIWpn0p/RSfryqvX22NkC8bWKfLoY8isKb76HNAFICJE8Voa8 GREsUeyzWIdyVduP+mtnvMmCp0qsS5S+18TL21pLOamqxkCFWjnHceeAzsXqofemx1Gj qMCCEpTmtx2kgK7oHBxQfzdh1toOvX4iU8A9BXw20i3L6KUuY34OOjdBeDtDu4OkW6TC UUuThpx8McCG4aQjmHdFTeJoX7NeCFOFQLTdVkwDqjEx9kaJpQalpf9AXvR9hUaUlYSa t/4+ohscgYPIs7+50lK6dxdfmn+w5quDYluLYd2jCVWab8feRUfitsQhTC0jHKS23ULC c9sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature; bh=D0Y+sCK6rKCNXMeoxaoYpvvgm89nbthtQcMvcu2PWx4=; b=Egsv1Gw0PIN+qLPrHIJW9dTSM+afGXKEHgoD6PprNLNEL+Zl18pQbn7/Kmy6jTC0n8 gUdtiCUz+Ca1CI98IJQ+ceXKuPjxXgdZZIjOcYrc2wdAYZyJ6dT0l+Ne9TgaHZBVB8CJ 0DoDI2wzp24IkEqG6stWmqCV9WlFwEa0rkg4ACuEapMx1CIoWpkG1eR6Myt1ohcIbN3Y QzZ68WzANljyF7QkZPcnART3Vbx4FSiNCsG68CuH9UvGrF/iJWNDCXOqM+5MlockRq6X 1YLgiZAAsdy47wPxyDoim7tQY8zJZPK2nwUHbIUVqngVk1KrdwQUtGEXHCcZ6xbfAE6s zHdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=sTjcXYGX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si1769053qvn.108.2020.04.10.15.13.26; Fri, 10 Apr 2020 15:13:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=sTjcXYGX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726671AbgDJWMi (ORCPT + 99 others); Fri, 10 Apr 2020 18:12:38 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:44704 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbgDJWMh (ORCPT ); Fri, 10 Apr 2020 18:12:37 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03AMA1nx187200; Fri, 10 Apr 2020 22:12:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=D0Y+sCK6rKCNXMeoxaoYpvvgm89nbthtQcMvcu2PWx4=; b=sTjcXYGXMzAriDNrMtQYWAjqAtwfPbt1mkCR0DwcW8TTP5BgToI6FUFXL+o8s9sxT2S1 /DTUkNNO7SwzQxjx0ZVUvgFL6QF8i4fjXKQ1rcBK+bzo30ZTAObZajkVYQfO1bia1CcQ aKSqrxC88psP07VDdCVEdbBQlHdaiQ7mBKzKCnRvPwITpj7FfZACtpmrNsObSpAHawak tBOkmMMIOxKvNt+ZfoJ73WAZigxIypyKMmPlYR2ZRMquLSSrndCho11bmCOsqND2JRKl I1GCObFdKVAJ88sOw7m9mwhuL2JDbfXv+Smz8RQ/kNqzl3hAMdqOk0dAgJzAEXQEsq3G fw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 3091m186ka-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Apr 2020 22:12:35 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03AM7ZKM098900; Fri, 10 Apr 2020 22:12:34 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 3091m8mj65-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Apr 2020 22:12:34 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 03AMCXUD024840; Fri, 10 Apr 2020 22:12:33 GMT Received: from [10.159.140.158] (/10.159.140.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 10 Apr 2020 15:12:33 -0700 Subject: Re: [PATCH] efi/libstub/arm64: Enable __efistub_global define in .data section To: Ard Biesheuvel Cc: linux-efi , Linux Kernel Mailing List References: <1586468669-21456-1-git-send-email-victor.erminpour@oracle.com> From: Victor Erminpour Organization: Oracle America Message-ID: Date: Fri, 10 Apr 2020 15:12:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9587 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004100156 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9587 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 mlxscore=0 priorityscore=1501 phishscore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 malwarescore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004100156 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/10/20 1:09 AM, Ard Biesheuvel wrote: > On Thu, 9 Apr 2020 at 23:44, Victor Erminpour > wrote: >> >> Enable the __efistub_global define to place variables in the >> .data section for both CONFIG_ARM and CONFIG_ARM64. >> >> This places the EFIstub sys_table variable and other EFIstub >> static variables in the .data section for both CONFIG_ARM and >> CONFIG_ARM64. >> > > What does that achieve? Hi Ard, Without placing these global variables in .data, I get the following errors when booting an ARM64 EFI system: EFI stub: ERROR: Exit boot services failed. EFI stub: ERROR: Failed to update FDT and exit boot services I know that the ARM64 linker script is supposed to put the .init.bss into the .init.data section, but I don't think this is happening for all systems. Having it explicitly enabled for CONFIG_ARM64 worked for me. Regards, --Victor > >> Signed-off-by: Victor Erminpour >> --- >> drivers/firmware/efi/libstub/efistub.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h >> index c244b16..59932d6 100644 >> --- a/drivers/firmware/efi/libstub/efistub.h >> +++ b/drivers/firmware/efi/libstub/efistub.h >> @@ -25,7 +25,7 @@ >> #define EFI_ALLOC_ALIGN EFI_PAGE_SIZE >> #endif >> >> -#ifdef CONFIG_ARM >> +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) >> #define __efistub_global __section(.data) >> #else >> #define __efistub_global -- Victor Hugo Erminpour Principal Member of Technical Staff Oracle America