From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.40]) by mx.groups.io with SMTP id smtpd.web10.52586.1674669684449435737 for ; Wed, 25 Jan 2023 10:01:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=Jh+25rua; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.236.40, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F64jRM+JV5dw228jsQA29OeTbmIEoaKehYMIL/qsxUMxSPQQ+ktLDe4tEmfsDAE+wQzh1MPy8DrbHFre829HPnW5mB3WG5p9mwEiydsgMWFHS96m50iE52ITJlJsue+SwolTavifYWTVJ+UviDRUFG3aj1laDdtJ5VMFYz313xz1YMsVpFSy5O8Rk9fPJaAdoskrhRkORZuf9jAiwtVKZCN6327XNQmF7tirNCU/FopiaRqrU2sGvtLb26I67II8B4p+KTpDt8rRS1Il0viy/1Q8SgJoEHeIR7ENRQ+GhBGcsowWSlt9AymA9yknEFqcYbdTlnIE83Tgrr7Ma7+GHA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r//dHumR6GAA4fLLviuRWdCkvc556kBs2t4X3yO7jOs=; b=CRRfuWdD90tw04EkmTHU4RMaaQZUTkUqPQzWBY4sAPPzc6VreZnZb7Mf1ags3IjPr5iRwBgIzvUoNVkYHspWa2hIJO2hRU7R+FuRDcVH3+gDbD5SH3mN7uXv7v9jzGAJhFCNwqXCL/deMjkALhRDb2bjYGyg0lRK8Dp8B7XLFnICXjKy0jH4iIxDaLk0D2JA7W6VrEpHvtgUdZpB6vU3iopLjTlLsHvyNC26hSeP5deIQKJncIqV1oju0bCA72mx1Z5eQaJBWc7nqPHUB2QkWwSAM9TlisWbXGnhMsieYEpxY29NCMcEmaQAAi8FLfPfBjFa3m3i+NYB1Sh3wYAQIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r//dHumR6GAA4fLLviuRWdCkvc556kBs2t4X3yO7jOs=; b=Jh+25ruabQb736D3U+afCeu1QTo1bIWXPFnYaLNuEG6JdNiR8HCsPP0PRyAEvN7KaRHHQ7JGVwB8bm20r6HAIydXlfA4lHk1NWntDx3tSqYI9xwtfcTyqTaXNpL1hH5EBjvj9jdrowBnw/Jix7wZDXKAMdSCj9YnntaemeunTKc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) by CH2PR12MB4857.namprd12.prod.outlook.com (2603:10b6:610:64::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 18:01:22 +0000 Received: from DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::8200:4042:8db4:63d7]) by DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::8200:4042:8db4:63d7%3]) with mapi id 15.20.6002.033; Wed, 25 Jan 2023 18:01:21 +0000 Message-ID: <73a4dbb7-b394-4ddc-0fba-5701058122f1@amd.com> Date: Wed, 25 Jan 2023 12:01:19 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB() To: devel@edk2.groups.io, kraxel@redhat.com Cc: Pawel Polawski , Jiewen Yao , Oliver Steffen , Ard Biesheuvel , Jordan Justen References: <20230125171049.1958204-1-kraxel@redhat.com> From: "Lendacky, Thomas" In-Reply-To: <20230125171049.1958204-1-kraxel@redhat.com> X-ClientProxiedBy: CH0PR04CA0044.namprd04.prod.outlook.com (2603:10b6:610:77::19) To DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) Return-Path: Thomas.Lendacky@amd.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB5229:EE_|CH2PR12MB4857:EE_ X-MS-Office365-Filtering-Correlation-Id: dbff0fbc-5ce9-4e38-10f3-08dafefe2a9f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DzYlyp2zTJT1Hp3HVwwKe0itxrCWDs11lfYF+zUMEo9w2KLt4b7G8VIUhD2iXccK/q/gRjJNQhQ36LCGAhp83j0kvViT96Oq0xRuZltKSGCvyKXcezvUUCzHZ3LzcdVAq9ZR37XlixW5LRS+gp9bSCidBG0qaCOwAdIUq3mZqxijuoRlFkfMUpDHjR0g4Tw5Aw8bb1NZoPCZ6rkGGfEUaotGnmmcPnX+y9Nq4zAoMRVL4cn8XTQeviUcTuI/VG0fWMmqHUjRTZEkEUARxXz5O88a80lDxMKW73Bg5T2I45eHq7oH6aJOPMxFYKhKls478vN6a7AenFZN9X5TyfuzxO8qNNeQPXEOnP0x5E8/1+CmbCdg2/QaSKT1GI/YHeXSHqlfiLGWE3pKx65rLkxueX9/tmQQgNmHVb59kuL69tXaeZJ7p5ERSCp0bMa+PTBJ1KgMimdGuzRhQTDDkwak1ab3xXeRhQ3tF0WOI5wP7NPM7MoKyLxu4D0AkoanLg4bWN65rRo/C9SF86MpoQ2TmJgHy47zhTPtYUY7mmqNfXGm2JQT/dLIM1aFLu1oh6HCfrpCresnK71N+TCa3XuU5+wFfA4cNKsTItgHo6ISRHePuv811X3rBCdqYIgF9vGZFYh5KevlScfqQEHLlPWzqhYxCZGKsl1gfdVzRNE2LIUwBfJ3t/ENznyGgomNRdSvrF3RAwx+MP3j1MbBhRj6tdAALaXEBQ0SCMrQGHCSxyA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5229.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(396003)(346002)(39860400002)(376002)(366004)(136003)(451199018)(5660300002)(83380400001)(31696002)(86362001)(38100700002)(41300700001)(2906002)(4326008)(8936002)(53546011)(8676002)(6506007)(478600001)(66946007)(186003)(6512007)(6486002)(316002)(66556008)(31686004)(66476007)(26005)(2616005)(54906003)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?anExalBuaC9EY24xQUpjSzNSY1lFS0NlTWFNZGdNOW5Da1hSK3FTR0NHTHpQ?= =?utf-8?B?cjd5bThWVDNRK0RhdDBkYm5zNldQUjdOM1hxRDJxY0N6dG5ZQ0RPUm5PYUV2?= =?utf-8?B?TXV1NnprQ0hZSVBrOVJ1NUVDZXMyekJOZzI5RWIyaU92cFZrU2pycHdqK2pS?= =?utf-8?B?bEZjUVFRMUVwdURMVzg0UDhiOGxUUEQ4dFc4aVgrTkxoTUN3MUFZUXAwbHFB?= =?utf-8?B?bnVheUFxaWR0RE1aMVpQSnFRMUliRDdDWkNiYkYwNmNRQkg3a2lIZzFsbTdN?= =?utf-8?B?NXRyc1lqTjIyeFpIRERXQlVROXlHeVljNUJROTlEN05qaldhR3o2ZUg3ZExJ?= =?utf-8?B?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: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbff0fbc-5ce9-4e38-10f3-08dafefe2a9f X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 18:01:21.7812 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: glWAQRgYJdqW4XaAd1nhBlM2hEbl1s5zlVtW+mE1zKjQ+rsY4la84nNKzdpnPjjd/aSJZGjwXtl80fXI5Fi0FA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4857 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/25/23 11:10, Gerd Hoffmann via groups.io wrote: > BuildResourceDescriptorHob() expects the third parameter be the Length, > not the End address. > > Fixes: 328076cfdf45 ("OvmfPkg/PlatformInitLib: Add PlatformAddHobCB") Thanks for the quick fix, Gerd! Tested-by: Tom Lendacky > Reported-by: Tom Lendacky > Signed-off-by: Gerd Hoffmann > --- > OvmfPkg/Library/PlatformInitLib/MemDetect.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c > index 5aeeeff89f57..38cece9173e8 100644 > --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c > +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c > @@ -200,7 +200,7 @@ PlatformAddHobCB ( > > break; > case EfiAcpiAddressRangeReserved: > - BuildResourceDescriptorHob (EFI_RESOURCE_MEMORY_RESERVED, 0, Base, End); > + BuildResourceDescriptorHob (EFI_RESOURCE_MEMORY_RESERVED, 0, Base, End - Base); > DEBUG ((DEBUG_INFO, "%a: Reserved [0x%Lx, 0x%Lx)\n", __FUNCTION__, Base, End)); > break; > default: