From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=d+bZJpL8; spf=pass (domain: linaro.org, ip: 209.85.221.66, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by groups.io with SMTP; Wed, 15 May 2019 12:47:25 -0700 Received: by mail-wr1-f66.google.com with SMTP id r4so754724wro.10 for ; Wed, 15 May 2019 12:47:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=undi9wnW/m7r4xr7DTnuM+5EQUtMiTyMyA8CxzyZYAY=; b=d+bZJpL8gKMbXj/j13nEua7y8jlD4ty7vRww1y8DyHQajivuJpMc/ZqOcseKNAQq54 uSfygw842uBRKnjfaZdztEc3V/msSg1zF1xxsd7tO41a3/mx9nFTLi2hBv5HryY0fBBS BphzkPjI4cxBdzu0321chHZaLuACErkZcr9HUYqjA/W3hkTTQV+JoufvA2p9xyssFv0D N2Wkm3JLHQ2kHBRe0O2gyeV4kBTLnJHuzGi/2POZT9JPIGs7uMj3fdoOa4Y3wmOTEqZS lrY+/o3Tf4uQg/BeUfBaw4cJSRUZrAnujLmCsv6Rphrfpq+99QrAI0Jflz02uzDJJ86u cV0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=undi9wnW/m7r4xr7DTnuM+5EQUtMiTyMyA8CxzyZYAY=; b=uezw3bZan2ds3hHbA9Js1TvgcXyM0HRelktDAuFij+fazJF+/xqZxg3phEyLvV9A7j uHt2nPxvf8BS6x+RSKfZhMOX5SlT1RpoBWzhU9S+i+/fTBgvlbtlrWYtcdNrV1uILKBw cjnH4L58AhreILaQhbmXRR2Fg2wuDMh6wt93cNjHaPafuV3wzr3c88ZZDm7i0lil3qOR vrtQOf6WYUgSYroBGQBS/bpaQOA/hNSnOsB4n9zsusYR/WCgMPfSyFx6fvp0dLqU9jpP xNFOTH9aqMK/upGMOwsm/ASKpWn1mQkEJl7l1hQ16VoKnJ9f59Y8MHFZZU678QFeDjzc OmXg== X-Gm-Message-State: APjAAAVtTsK6fBfCYObzZbzPS71YaX6uvl5Xpmel2bzLWBO9AwiPw4yx b+DQJRy9DHuJCcCAwp2EwzbwKg== X-Google-Smtp-Source: APXvYqwBpNrOWU8+mt+p0eET0wZTKHihcvKsf2DcywcqIraFpqxx4YVdjgc7BCPT4a7AlnD+deJrng== X-Received: by 2002:a5d:49d0:: with SMTP id t16mr17548478wrs.324.1557949643777; Wed, 15 May 2019 12:47:23 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id s127sm3432979wmf.48.2019.05.15.12.47.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2019 12:47:22 -0700 (PDT) Date: Wed, 15 May 2019 20:47:21 +0100 From: "Leif Lindholm" To: Hao A Wu Cc: devel@edk2.groups.io, Ard Biesheuvel , Michael D Kinney Subject: Re: [edk2-platforms][PATCH v1 06/16] Hisilicon/D0x: Use StatusCode Router & Handler in MdeModulePkg Message-ID: <20190515194721.pzgeburqedolqcs6@bivouac.eciton.net> References: <20190514020831.7728-1-hao.a.wu@intel.com> <20190514020831.7728-9-hao.a.wu@intel.com> MIME-Version: 1.0 In-Reply-To: <20190514020831.7728-9-hao.a.wu@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 14, 2019 at 10:08:21AM +0800, Hao A Wu wrote: > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1800 > > This commit adopts a similar approach to edk2 commit > a6d594c5fabd8da2273d2794826ec086cf9c3c04. > > Currently, Hisilicon platforms use modules from under > "IntelFrameworkModulePkg/Universal/StatusCode/", which produce > EFI_PEI_PROGRESS_CODE_PPI and EFI_STATUS_CODE_PROTOCOL directly, and write > the status codes, as they are reported, to the serial port or to a memory > buffer. This is called "handling" the status codes. > > MdeModulePkg offers a PEIM under > "MdeModulePkg/Universal/ReportStatusCodeRouter/Pei" that produces both > EFI_PEI_PROGRESS_CODE_PPI and EFI_PEI_RSC_HANDLER_PPI, and a runtime DXE > driver under "MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe" > that produces both EFI_STATUS_CODE_PROTOCOL and EFI_RSC_HANDLER_PROTOCOL. > > MdeModulePkg also offers status code handler modules under > MdeModulePkg/Universal/StatusCodeHandler/ that depend on > EFI_PEI_RSC_HANDLER_PPI and EFI_RSC_HANDLER_PROTOCOL, respectively. > > The StatusCodeHandler modules register themselves with > ReportStatusCodeRouter through EFI_PEI_RSC_HANDLER_PPI / > EFI_RSC_HANDLER_PROTOCOL. When another module reports a status code > through EFI_PEI_PROGRESS_CODE_PPI / EFI_STATUS_CODE_PROTOCOL, it reaches > the phase-matching ReportStatusCodeRouter module first, which in turn > passes the status code to the pre-registered, phase-matching > StatusCodeHandler module. > > The status code handling in the StatusCodeHandler modules is identical to > the one currently provided by the IntelFrameworkModulePkg modules. Replace > the IntelFrameworkModulePkg modules with the MdeModulePkg ones, so we can > decrease our dependency on IntelFrameworkModulePkg. I would like to have Ard's opinion on this (and he should be back Friday), and probably testing on the platforms. I say this because I intend to push the trivial patches today, but not this one. / Leif > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Cc: Michael D Kinney > Signed-off-by: Hao A Wu > --- > Platform/Hisilicon/D03/D03.dsc | 6 ++++-- > Platform/Hisilicon/D05/D05.dsc | 6 ++++-- > Platform/Hisilicon/D06/D06.dsc | 6 ++++-- > Platform/Hisilicon/D03/D03.fdf | 6 ++++-- > Platform/Hisilicon/D05/D05.fdf | 6 ++++-- > Platform/Hisilicon/D06/D06.fdf | 6 ++++-- > 6 files changed, 24 insertions(+), 12 deletions(-) > > diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc > index 7e8cb59641..a3c3ae5aa6 100644 > --- a/Platform/Hisilicon/D03/D03.dsc > +++ b/Platform/Hisilicon/D03/D03.dsc > @@ -303,7 +303,8 @@ > > Platform/Hisilicon/D03/MemoryInitPei/MemoryInitPeim.inf > ArmPkg/Drivers/CpuPei/CpuPei.inf > - IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf > + MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf > MdeModulePkg/Universal/Variable/Pei/VariablePei.inf > > @@ -376,7 +377,8 @@ > ArmPkg/Drivers/TimerDxe/TimerDxe.inf > > MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf > - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > # > #ACPI > # > diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc > index 1d3a054d29..e285d1a3ce 100644 > --- a/Platform/Hisilicon/D05/D05.dsc > +++ b/Platform/Hisilicon/D05/D05.dsc > @@ -439,7 +439,8 @@ > > Platform/Hisilicon/D05/MemoryInitPei/MemoryInitPeim.inf > ArmPkg/Drivers/CpuPei/CpuPei.inf > - IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf > + MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf > MdeModulePkg/Universal/Variable/Pei/VariablePei.inf > > @@ -509,7 +510,8 @@ > ArmPkg/Drivers/TimerDxe/TimerDxe.inf > > MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf > - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > # > #ACPI > # > diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc > index c1cd13b6c7..0c12181a38 100644 > --- a/Platform/Hisilicon/D06/D06.dsc > +++ b/Platform/Hisilicon/D06/D06.dsc > @@ -255,7 +255,8 @@ > ArmPlatformPkg/PlatformPei/PlatformPeim.inf > > ArmPkg/Drivers/CpuPei/CpuPei.inf > - IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf > + MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf > MdeModulePkg/Universal/Variable/Pei/VariablePei.inf > > @@ -317,7 +318,8 @@ > ArmPkg/Drivers/TimerDxe/TimerDxe.inf > > MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf > - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > # > #ACPI > # > diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf > index 3f07b2e577..f7024f400d 100644 > --- a/Platform/Hisilicon/D03/D03.fdf > +++ b/Platform/Hisilicon/D03/D03.fdf > @@ -199,7 +199,8 @@ READ_LOCK_STATUS = TRUE > INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf > INF FatPkg/EnhancedFatDxe/Fat.inf > INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf > - INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > + INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > + INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > > # > # Usb Support > @@ -329,7 +330,8 @@ READ_LOCK_STATUS = TRUE > INF Platform/Hisilicon/D03/MemoryInitPei/MemoryInitPeim.inf > INF ArmPkg/Drivers/CpuPei/CpuPei.inf > INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf > - INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf > + INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf > + INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > INF Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.inf > > INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > diff --git a/Platform/Hisilicon/D05/D05.fdf b/Platform/Hisilicon/D05/D05.fdf > index 9632aea4b0..76c04b2740 100644 > --- a/Platform/Hisilicon/D05/D05.fdf > +++ b/Platform/Hisilicon/D05/D05.fdf > @@ -203,7 +203,8 @@ READ_LOCK_STATUS = TRUE > INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf > INF FatPkg/EnhancedFatDxe/Fat.inf > INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf > - INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > + INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > + INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > > # > # Usb Support > @@ -351,7 +352,8 @@ READ_LOCK_STATUS = TRUE > INF Platform/Hisilicon/D05/MemoryInitPei/MemoryInitPeim.inf > INF ArmPkg/Drivers/CpuPei/CpuPei.inf > INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf > - INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf > + INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf > + INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > INF Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.inf > > INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > diff --git a/Platform/Hisilicon/D06/D06.fdf b/Platform/Hisilicon/D06/D06.fdf > index e402628a1b..fb26881300 100644 > --- a/Platform/Hisilicon/D06/D06.fdf > +++ b/Platform/Hisilicon/D06/D06.fdf > @@ -204,7 +204,8 @@ READ_LOCK_STATUS = TRUE > INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf > INF FatPkg/EnhancedFatDxe/Fat.inf > INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf > - INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > + INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > + INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > > # > # Usb Support > @@ -345,7 +346,8 @@ READ_LOCK_STATUS = TRUE > INF Platform/Hisilicon/D06/MemoryInitPei/MemoryInitPeim.inf > INF ArmPkg/Drivers/CpuPei/CpuPei.inf > INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf > - INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf > + INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf > + INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > INF Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.inf > > INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > -- > 2.12.0.windows.1 >