From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com []) by mx.groups.io with SMTP id smtpd.web11.2469.1624416764968334886 for ; Tue, 22 Jun 2021 19:52:57 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhiguang.liu@intel.com) IronPort-SDR: rPDc2WCmfEpU6joJqODUtPXtju6Jkaa2+ONfO3DJBUy/Rv1PvVo7TAicUNoHVzUe946PExhrZo v1cB0qmDgO5A== X-IronPort-AV: E=McAfee;i="6200,9189,10023"; a="204175555" X-IronPort-AV: E=Sophos;i="5.83,293,1616482800"; d="scan'208";a="204175555" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2021 19:52:57 -0700 IronPort-SDR: glNlOkx0cwoH4QXscyR0S2KDGScBQ4Kl8KHVdiqf8M9mFdvWbm0avUcuXMsNgTg9IY3erYInTO Oj8idLDH/ygw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,293,1616482800"; d="scan'208";a="487138342" Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by orsmga001.jf.intel.com with ESMTP; 22 Jun 2021 19:52:55 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Maurice Ma , Guo Dong , Benjamin You Subject: [Patch V2 09/12] UefiPayloadPkg: Remove assert when reserve MMIO/IO resource for devices Date: Wed, 23 Jun 2021 10:52:32 +0800 Message-Id: <20210623025235.3311-10-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.30.0.windows.2 In-Reply-To: <20210623025235.3311-1-zhiguang.liu@intel.com> References: <20210623025235.3311-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Some boot loader may already reserve MMIO/IO resource for IOAPIC and HPET, so remove the assert when reserve MMIO/IO resource for IOAPIC and HPET Cc: Maurice Ma Cc: Guo Dong Cc: Benjamin You Reviewed-by: Guo Dong Signed-off-by: Zhiguang Liu --- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c b/UefiPayloadPkg/Bl= SupportDxe/BlSupportDxe.c index ffd3427fb3..04e968a232 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c @@ -41,13 +41,12 @@ ReserveResourceInGcd ( );=0D if (EFI_ERROR (Status)) {=0D DEBUG ((=0D - DEBUG_ERROR,=0D + DEBUG_WARN,=0D "Failed to add memory space :0x%lx 0x%lx\n",=0D BaseAddress,=0D Length=0D ));=0D }=0D - ASSERT_EFI_ERROR (Status);=0D Status =3D gDS->AllocateMemorySpace (=0D EfiGcdAllocateAddress,=0D GcdType,=0D @@ -57,14 +56,20 @@ ReserveResourceInGcd ( ImageHandle,=0D NULL=0D );=0D - ASSERT_EFI_ERROR (Status);=0D } else {=0D Status =3D gDS->AddIoSpace (=0D GcdType,=0D BaseAddress,=0D Length=0D );=0D - ASSERT_EFI_ERROR (Status);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((=0D + DEBUG_WARN,=0D + "Failed to add IO space :0x%lx 0x%lx\n",=0D + BaseAddress,=0D + Length=0D + ));=0D + }=0D Status =3D gDS->AllocateIoSpace (=0D EfiGcdAllocateAddress,=0D GcdType,=0D @@ -74,7 +79,6 @@ ReserveResourceInGcd ( ImageHandle,=0D NULL=0D );=0D - ASSERT_EFI_ERROR (Status);=0D }=0D return Status;=0D }=0D @@ -106,11 +110,9 @@ BlDxeEntryPoint ( //=0D // Report MMIO/IO Resources=0D //=0D - Status =3D ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0= xFEC00000, SIZE_4KB, 0, ImageHandle); // IOAPIC=0D - ASSERT_EFI_ERROR (Status);=0D + ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFEC00000, = SIZE_4KB, 0, ImageHandle); // IOAPIC=0D =0D - Status =3D ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0= xFED00000, SIZE_1KB, 0, ImageHandle); // HPET=0D - ASSERT_EFI_ERROR (Status);=0D + ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFED00000, = SIZE_1KB, 0, ImageHandle); // HPET=0D =0D //=0D // Find the frame buffer information and update PCDs=0D --=20 2.30.0.windows.2