From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web08.1700.1663887162552150954 for ; Thu, 22 Sep 2022 15:52:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CNUuVFwi; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: quicinc.com, ip: 205.220.180.131, mailfrom: quic_rcran@quicinc.com) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28MMIhn2000687; Thu, 22 Sep 2022 22:52:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=mn/uSuT0X9o50MJSJzZlqyWFIw8oQTs0ckLiGHtlzME=; b=CNUuVFwiLhA9r5IDJg2o0NlrY+i5OFv14o17qjJER4jrPonivjB/FIa5TBRpMIZwDeQQ oqT7B9gWsG4abElr1+oo4Oh3aH5qvgNNl2vgND3xxng3fd5qg+5QPqrktuk9gn7XgUGq IR1G4csEKI4gqO7if9vJ/xO+/WvViBWwSeQLjOvjQ/JCE5n0V9pseBXycv8G/gYpDIYq 7G5WCP3j1LJ/l2ltfYGnPqfybx/fS82oAhh+Jk7iM2DFLnlxw/qmwscZPUdF9YOFidbC 3Ar94g0ooZ8gWnbr3E7pIp4RgdQRNeYKmQWjGZkegTFYYmYfE6w9Ayc+sjmU0znh6JhZ 8w== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jr8y1umkv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Sep 2022 22:52:41 +0000 Received: from pps.filterd (NASANPPMTA04.qualcomm.com [127.0.0.1]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 28MMqemu018352; Thu, 22 Sep 2022 22:52:40 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NASANPPMTA04.qualcomm.com (PPS) with ESMTPS id 3jqw367hy1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Sep 2022 22:52:40 +0000 Received: from NASANPPMTA04.qualcomm.com (NASANPPMTA04.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 28MMqe9I018344; Thu, 22 Sep 2022 22:52:40 GMT Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA04.qualcomm.com (PPS) with ESMTPS id 28MMqeqn018341 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Sep 2022 22:52:40 +0000 Received: from [10.110.4.234] (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Thu, 22 Sep 2022 15:52:39 -0700 Message-ID: <91bed9e3-c9e9-74f0-8bdc-4e69ed791676@quicinc.com> Date: Thu, 22 Sep 2022 16:52:39 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [edk2-devel] OvmfPkgX64: PlatformInitLib.lib(IntelTdx.obj): in function `ValidateHobList': undefined reference to `memcpy' (CLANG38 NOOPT) To: Ard Biesheuvel , , CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , "Gerd Hoffmann" References: <79e3b3db-3ceb-e184-6138-80aa195c1347@quicinc.com> From: "Rebecca Cran" In-Reply-To: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: PS8JLkHL1eYeN0Z9Kwa6KfkFukT70isE X-Proofpoint-GUID: PS8JLkHL1eYeN0Z9Kwa6KfkFukT70isE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-22_14,2022-09-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 adultscore=0 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 impostorscore=0 mlxlogscore=865 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209220147 Content-Language: en-US Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit On 9/22/22 15:32, Ard Biesheuvel wrote: > This appears to be due to the use of initializers for the arrays. > Could you please check if the patch below makes the issue go away? > > diff --git a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c > b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c > index c6d7c8bb6e0e..0e0e13343b16 100644 > --- a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c > +++ b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c > @@ -153,7 +153,7 @@ BOOLEAN > EFIAPI > IsInValidList ( > IN UINT32 Value, > - IN UINT32 *ValidList, > + IN CONST UINT32 *ValidList, > IN UINT32 ValidListLength > ) > { > @@ -188,7 +188,7 @@ ValidateHobList ( > ) > { > EFI_PEI_HOB_POINTERS Hob; > - UINT32 EFI_BOOT_MODE_LIST[] = { > + STATIC CONST UINT32 EFI_BOOT_MODE_LIST[] = { > BOOT_WITH_FULL_CONFIGURATION, > BOOT_WITH_MINIMAL_CONFIGURATION, > BOOT_ASSUMING_NO_CONFIGURATION_CHANGES, > @@ -203,7 +203,7 @@ ValidateHobList ( > BOOT_IN_RECOVERY_MODE > }; > > - UINT32 EFI_RESOURCE_TYPE_LIST[] = { > + STATIC CONST UINT32 EFI_RESOURCE_TYPE_LIST[] = { > EFI_RESOURCE_SYSTEM_MEMORY, > EFI_RESOURCE_MEMORY_MAPPED_IO, > EFI_RESOURCE_IO, Yes, that fixes it. -- Rebecca Cran