From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (EUR01-VE1-obe.outbound.protection.outlook.com [40.107.14.72]) by mx.groups.io with SMTP id smtpd.web09.4896.1620815086443935242 for ; Wed, 12 May 2021 03:24:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=zaC1pcJu; spf=pass (domain: arm.com, ip: 40.107.14.72, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zX5eeoTdP4l8KBsqKadbdG0Zl84p7g3yqQV6w4UkuuA=; b=zaC1pcJuOLp1LHwDHuPgQ0MZBIHizmENllYHaimnnA7BxtgxusN5PmSRQLjJItMaabWip9uia1b/HUy3RWZ/8Ra9LMNrG5MQjdIVYKKqcaJWSKMqG7QgyeFTdAvO5Be78yQOz9ux68Mzi0ytK0ahIuOV9wGGrx97mlbO1YPHxDg= Received: from DU2PR04CA0153.eurprd04.prod.outlook.com (2603:10a6:10:2b0::8) by DB7PR08MB3097.eurprd08.prod.outlook.com (2603:10a6:5:1d::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Wed, 12 May 2021 10:24:43 +0000 Received: from DB5EUR03FT006.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2b0:cafe::e8) by DU2PR04CA0153.outlook.office365.com (2603:10a6:10:2b0::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Wed, 12 May 2021 10:24:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT006.mail.protection.outlook.com (10.152.20.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Wed, 12 May 2021 10:24:43 +0000 Received: ("Tessian outbound 13cdc29c30b8:v91"); Wed, 12 May 2021 10:24:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a2d9646d49f02e12 X-CR-MTA-TID: 64aa7808 Received: from e9c46b5f7042.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E10E526B-CB11-4CC1-922B-47AD40DA01CD.1; Wed, 12 May 2021 10:24:32 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e9c46b5f7042.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 12 May 2021 10:24:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G95XyaRGoTywI3dqc7DZwezmRI+QOCWcPMyZ1UGh3Kq/PYeNxKF+4it08tJ4YQlAPLDyr8AralHu3kRStxyUk5LpG8OAerP6XuGN3mcn6mzpqwt8UsmE6aecWjVKYMtX55p1BassgxUKOSa9FeDzoM8hRV/A4pNYrHvdnq7Ivx7e66p3YmY8XWJyKV5yIMze6asiVPoiuLi82BAKFGBxQI+ImzYrZf5tjI4rftVHJE+ZCywe5OHBHUCmREl8g7z+8RV3gMeNQS67AKjnZUjFzuBo/fMwu/odhMJN6vOqEjuSrHbkUQPfGf2FFIDpH9ar2sfeQofG0lH5XY+cZ++APQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zX5eeoTdP4l8KBsqKadbdG0Zl84p7g3yqQV6w4UkuuA=; b=TTTr959NWuxnM2IbP5A89JII4h0vsSW8R3oPEeXmOLurEXIsE2+HqpP9CoCbk86yMLgNORAtOxKQLUBySdcFA8pvLNa5eTnaI/rryiNekwJuPjWXcw+gN9BYb5AMpEiudi82ex59FZN2tEqf3W/sCyDEB7DbdQAJ5RhKXjssOq6uWiutBsRiEA+TYuGQZqPplpF0IVwE8/bf3tmC/8GFgurxPFQx1nMp+b8Go5L/w0KkcmxkWI+x+uhBMepoaqufOOa6pyiZsNyeUeUELEzZ5I+bqhzgQKZJUUOyQVOIrEVjwJAPOY+sdQj4ZdnfrQaW/Oelduy0pskdmC4IzsXc/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zX5eeoTdP4l8KBsqKadbdG0Zl84p7g3yqQV6w4UkuuA=; b=zaC1pcJuOLp1LHwDHuPgQ0MZBIHizmENllYHaimnnA7BxtgxusN5PmSRQLjJItMaabWip9uia1b/HUy3RWZ/8Ra9LMNrG5MQjdIVYKKqcaJWSKMqG7QgyeFTdAvO5Be78yQOz9ux68Mzi0ytK0ahIuOV9wGGrx97mlbO1YPHxDg= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AM6PR08MB3765.eurprd08.prod.outlook.com (2603:10a6:20b:8f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Wed, 12 May 2021 10:24:30 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::80cb:878d:c8f1:2688]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::80cb:878d:c8f1:2688%7]) with mapi id 15.20.4129.026; Wed, 12 May 2021 10:24:30 +0000 Subject: Re: [edk2-platforms][PATCH 3/4] Drivers/OpTee: address cast build warning issue in 32b mode To: Etienne Carriere , devel@edk2.groups.io Cc: Ard Biesheuvel , Ilias Apalodimas , Leif Lindholm , Sughosh Ganu , Thomas Abraham References: <20210510075304.9125-1-etienne.carriere@linaro.org> <20210510075304.9125-4-etienne.carriere@linaro.org> From: "Sami Mujawar" Message-ID: <030b0205-6450-1f19-11c9-26d32139364e@arm.com> Date: Wed, 12 May 2021 11:24:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20210510075304.9125-4-etienne.carriere@linaro.org> X-Originating-IP: [217.140.106.52] X-ClientProxiedBy: LO2P265CA0110.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::26) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.1.196.43] (217.140.106.52) by LO2P265CA0110.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Wed, 12 May 2021 10:24:29 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 707b6f8d-5417-43a8-d686-08d9153028c1 X-MS-TrafficTypeDiagnostic: AM6PR08MB3765:|DB7PR08MB3097: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: BRX1I+2FdkD9hoTAcOWtoIDfDZW2G26lnjhRomnxEoEznRK4vgVP2AijST16lunA26QT4j1Ht3WZu82EpIe7+gJ2+Arx8SASgngoW1xKbteQr+zPrd245Z6PDJvknsoAo0qIhzpwIpyrv7YGCyTHVvNJY2ojhVFwoUHSNyqZR08hh3Ry0d0u7LPg8NZ4JsJ6DBI/7k5jp4CGb4S6taFYusnS3SH9Yvikv/TqgUAXFU6F1IeuyNwDxL5kgm3bmGZgPOJtGGTt1JTjsmTFn4TRAkjyV6Gd233/wo1MFWUDVF5AjXoedQL9zYn0fy2MAH8T6M/7862+CHA4SflAeVXaoqhJxB0B/el+vKV7zPyLdUW8OCLIf4bLCx3YenYr6yQV7/eNWsM8pd1gSFtBIpsTbcnRlSwFiQ6N/2RpVU2QwHGsERTNGsA6G4FcEPXOTCflCjW9TZM57Bag9BzQIZcwTk9hw/PaIDvS/Hj40NRHDdgn8wsYn+W4jU8V/x2xEdkuQvubGK1nSQPSz5UscHOgC7I/5xSrEDN4ssSZikWetaCSdb/r6KQNityxEaqexYwzLciywiXL9XjO/fVdcXo4syNx4YzhuMdyvgeFaIxGkp9q0LGPs4A06+IWSLMYx+bfPeW+TgZQ6GJ80sBkYNhdi/2w3lO5w9TuDGmbYmwNqy6EMkGr8QkkkDISPNEG04LM25LYshPXtpJtYfDVaMQH17qg+J3/Ovs3xdwQLFUCIdo= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(136003)(396003)(346002)(376002)(39840400004)(366004)(186003)(16526019)(2616005)(2906002)(5660300002)(8936002)(26005)(38350700002)(956004)(478600001)(4326008)(66946007)(66476007)(66556008)(52116002)(6486002)(8676002)(38100700002)(54906003)(16576012)(44832011)(31696002)(53546011)(83380400001)(316002)(31686004)(86362001)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?RTQ5a1hBUlRmeFp4WjdLQTdGcldVREk3bDlLZlpVMEpRTlZ4WHk0ekgxM281?= =?utf-8?B?SllwR3NYTmtFKzhFMXJkelh3cU5pUHZBZWo5Zlo0MlhQUWhQUFdhVnRub3g2?= =?utf-8?B?YjgzU1hyTmxiRVl1YlRLdDV4TDBuaFdQazZ4VlNyMEE5S1NpSU1OYWlSdEU0?= =?utf-8?B?WS9nMGFMRldiTGI2QXJtcUlIRVJHQ2NGY3BxN1VxUnhTRDFWbnRsUCsveGNz?= =?utf-8?B?dHJINkY2bk5GQVZIUkNPYWNWWGVIN1MwanBUcGlzdk9tY1VWblM1TFlSVHdD?= =?utf-8?B?Y2RNWGFqdFlRR00vYm1PL0g4cXFvVGY1d244VVdQcWRIQ1RWYzBVclA3VTRI?= =?utf-8?B?NXI4NG5YeGIxNnFBWk5zaW5YNWpkRmpTOTR3RTdyUE5iUktScHdXemdHa3hm?= =?utf-8?B?dExCdjB4dXJtekNlVTdpOWhQblJrKzBjclpPc1NQbi9SRjRWdkhtemhBT3BH?= =?utf-8?B?Mkg4UUI4Mzg4UDhadjRLbUJPL1l2VFpjR0hjV2ZuRFJzSFNkT0FHTStPclpN?= =?utf-8?B?OWVhb1BiNVRLQVhmM2plRFhFWVUxa3FNQWNHNXRwV25nVVFHZTUzaGU3c1VD?= =?utf-8?B?MEFOZEo3K1JEOWZXWTBSNEhvREk1RVBkZ3l2S3hhM2VnMnVNelFFWlc4N3pW?= =?utf-8?B?Mnd5NmQrQmdtQVZjVXJYazlFYlpwemtqcXB6RVE3KzF4K3Qvd1JQcXg1OFZX?= =?utf-8?B?b21sZEYvVDBWRDBHamc1bjNXbXovV2xnMXpZRUppNnh1czZ1VWIyUmc1L0tZ?= =?utf-8?B?WWI3dzJKMHZjZDRtUUc5eDBqdStER01HcFlWSm1qWTNBd2xObXJjS2dCdWls?= =?utf-8?B?QmxiemIyUGNNNk92b2VmT1JYUXFDNmJzU0lXVXlnRmJ1QkJrSFZXSEdXZW5J?= =?utf-8?B?MU91QUdWcFYwT2ZDVEVLVGZ2empxMEVLalkxdGovcGc5WmtJb29sd2dEdWtD?= =?utf-8?B?ZXNxb2IxWC96bmFBRElIQXlUanRIVTBiOHJZQWpDWHlMK05nalpTYW5VclR5?= =?utf-8?B?OXptYm1mLzJJYmVMZFhWMkpzVjhoeWk2OTdEV1dLdmhyc3RRODdET1FJZFJa?= =?utf-8?B?VktWaVYzTm9LTzk2aE9NeFErM1Z6dExhcnQwSUZzL202WVo0aHNrQm5YSEt2?= =?utf-8?B?MHpieXhTL2hKbHB5cWlmSGNjRExYS01HejJzaC9IRmh6NXBmSEVaNlRsWERv?= =?utf-8?B?NXRlT2pBamp5MUs5UTFlcGNGMGh4YVF0MVBiNUtXZ3RxNFhyUzVZNm1RcFBH?= =?utf-8?B?UDl0K29WSkVKaEM0cnVKNWFvQTBFbDRKa2tBOWdmMXM0LzVMSDR0SHA2SWxH?= =?utf-8?B?UVhMdVJtY0ZvN0dRRXJ3cUFPL0EvV0hpanhyWC91R3NibWp0YldyS3hyaVdU?= =?utf-8?B?QXQ2NGNXOVJ1TGpjSU4xL0k2cmxzcEJTNXRDNzg4d2ZqTkRrVWw2OG5jdmMz?= =?utf-8?B?T0xUYVBCdk1qdVU2ZXBmNDFNcTZRTzRqblJ5Y2pJQzJjZWd6clhMK2F1RTJv?= =?utf-8?B?Q2VKcVp4aE83RFNZbVdNdWxNRHo1SFZPWlZhckE5SkIyTnYrbWl5ZlFSbkdR?= =?utf-8?B?WmZlSGUyNHBEeTA1ZDJ6bk8wS2dPMjhJYjNCMk5IZEZ0bXE3VWJrUXBoejNq?= =?utf-8?B?cmtxMGRUTVpZdTFDOXFpZDJIenFqSHBrKzVTZUhUZFVvR1VUYzVZSjQ0c2xW?= =?utf-8?B?R3ZrMWx6THgrd1hQRE9hS1lqamlqY1Z4SE1MVWdaQmFRcy9iL0ZJcS9sbUMx?= =?utf-8?Q?f4Oo/pboMVj4PaYZ5/paxhFUU3yvd0F8WFffsHP?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3765 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 9fd8ccba-7ab0-4332-6755-08d91530205d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g09TPSZ9qN256dfer6lQq3tA5bvkXVdjqVWpGTMikSy13SLaxSRV2v4GNQ13G/ypATg5YZlRHGO+6CFwCaCdkWmfshMG0zZhPxl67M3RRfTMakvVE8LE8iPWtK1h/Q688xXMdbSh8yoHi/7A/DnE2JJ7zSd3A9fTo4t5C2YeL0fqOTWJklNC1fJA+iUAZ0zYFLETrw2rWVgoxD1qYS3tLkBAp6u7Ss92NcYiI5sJPAXC4XwBgOvI5Ib7jQmZYV+8hKVYsxCIqfCEJzWHPrgultQhMrXRpNMJXlu3t+eGlEy2lVvpmJguzzQp0ujo5JxOB7VyujfcHQ+m4n6rUxwzLM4k/FBRpjn/9yhnVRrFywr2vJ6Q/HgkyZgK0cB7lyvx3tzLCa6oLOi87Fy+NY5lkFlBsW6pkyVIJd3HTnQZ1+lLETuDCvSQ2cYYIVShHcvYzblKeikUrAWfeGmeqety4u14KKkYq+D+k7nSJoFd07313ctsaR1l/z4owCZEjeHty+7Xb9dZ8e+fnlCSjhXTGc/fzw1X68GnMjo7tq706RnbWtYVXdPJc637zpexhOxRGA71cdS09NRCP633h5Q27WDsrhBMfZBUR9uvtqSJndXCeHwoZTE0/qnNdj5QrQK79koHM87gAbEJ8VhcPmLuC2vbx9dPFRvse2H56mnOh+OLu6EdhQCxdgE5Scr1QP3Z X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(6029001)(4636009)(376002)(39840400004)(346002)(136003)(396003)(46966006)(36840700001)(16576012)(478600001)(316002)(54906003)(2906002)(5660300002)(16526019)(4326008)(336012)(2616005)(6486002)(956004)(70586007)(70206006)(47076005)(44832011)(186003)(86362001)(8676002)(82310400003)(31686004)(81166007)(83380400001)(31696002)(36860700001)(53546011)(26005)(8936002)(36756003)(356005)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2021 10:24:43.5961 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 707b6f8d-5417-43a8-d686-08d9153028c1 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3097 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-GB Hi Etienn, Thank you for this patch. These changes look good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 10/05/2021 08:53 AM, Etienne Carriere wrote: > Use (UINTN) cast to cast physical or virtual address values to the > pointer size before casting from/to a pointer value. > > Cc: Ard Biesheuvel > Cc: Ilias Apalodimas > Cc: Leif Lindholm > Cc: Sami Mujawar > Signed-off-by: Etienne Carriere > --- > Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c | 21 +++++++++++++------- > 1 file changed, 14 insertions(+), 7 deletions(-) > > diff --git a/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c b/Drivers/OpTee/Op= teeRpmbPkg/OpTeeRpmbFvb.c > index 6eb19bed0e..83c2750368 100644 > --- a/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c > +++ b/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c > @@ -305,7 +305,8 @@ OpTeeRpmbFvbRead ( > } > } > > - Base =3D (VOID *)Instance->MemBaseAddress + (Lba * Instance->BlockSize= ) + Offset; > + Base =3D (VOID *)(UINTN)Instance->MemBaseAddress + (Lba * Instance->Bl= ockSize) + > + Offset; > // We could read the data from the RPMB instead of memory > // The 2 copies should already be identical > // Copy from memory image > @@ -387,7 +388,8 @@ OpTeeRpmbFvbWrite ( > return Status; > } > } > - Base =3D (VOID *)Instance->MemBaseAddress + Lba * Instance->BlockSize = + Offset; > + Base =3D (VOID *)(UINTN)Instance->MemBaseAddress + (Lba * Instance->Bl= ockSize) + > + Offset; > Status =3D ReadWriteRpmb ( > SP_SVC_RPMB_WRITE, > (UINTN)Buffer, > @@ -477,7 +479,8 @@ OpTeeRpmbFvbErase ( > return EFI_INVALID_PARAMETER; > } > NumBytes =3D NumLba * Instance->BlockSize; > - Base =3D (VOID *)Instance->MemBaseAddress + Start * Instance->BlockS= ize; > + Base =3D (VOID *)(UINTN)Instance->MemBaseAddress + > + (Start * Instance->BlockSize); > Buf =3D AllocatePool (NumLba * Instance->BlockSize); > if (Buf =3D=3D NULL) { > return EFI_DEVICE_ERROR; > @@ -689,7 +692,7 @@ InitializeFvAndVariableStoreHeaders ( > goto Exit; > } > // Install the combined header in memory > - CopyMem ((VOID*)Instance->MemBaseAddress, Headers, HeadersLength); > + CopyMem ((VOID*)(UINTN)Instance->MemBaseAddress, Headers, HeadersLengt= h); > > Exit: > FreePool (Headers); > @@ -747,14 +750,18 @@ FvbInitialize ( > // Read the file from disk and copy it to memory > ReadEntireFlash (Instance); > > - FwVolHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *)Instance->MemBaseAddress= ; > + FwVolHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)Instance->MemBase= Address; > Status =3D ValidateFvHeader (FwVolHeader); > if (EFI_ERROR (Status)) { > // There is no valid header, so time to install one. > DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __FUNCTIO= N__)); > > // Reset memory > - SetMem64 ((VOID *)Instance->MemBaseAddress, Instance->NBlocks * Inst= ance->BlockSize, ~0UL); > + SetMem64 ( > + (VOID *)(UINTN)Instance->MemBaseAddress, > + Instance->NBlocks * Instance->BlockSize, > + ~0UL > + ); > DEBUG ((DEBUG_INFO, "%a: Erasing Flash.\n", __FUNCTION__)); > Status =3D ReadWriteRpmb ( > SP_SVC_RPMB_WRITE, > @@ -827,7 +834,7 @@ OpTeeRpmbFvbInit ( > mInstance.FvbProtocol.Write =3D OpTeeRpmbFvbWrite; > mInstance.FvbProtocol.Read =3D OpTeeRpmbFvbRead; > > - mInstance.MemBaseAddress =3D (EFI_PHYSICAL_ADDRESS)Addr; > + mInstance.MemBaseAddress =3D (EFI_PHYSICAL_ADDRESS)(UINTN)Addr; > mInstance.Signature =3D FLASH_SIGNATURE; > mInstance.Initialize =3D FvbInitialize; > mInstance.BlockSize =3D EFI_PAGE_SIZE; IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.