Re: [edk2-devel] public-inbox instance for edk2-devel, allowing use of b4 patch tool
On Mon, 31 Jul 2023 at 03:39, Rebecca Cran wrote: > > I've set up a public-inbox instance for edk2-devel at > https://openfw.io/edk2-devel . > Excellent, thanks for doing this! > This lets people use the 'b4' tool > (https://b4.docs.kernel.org/en/latest/) to apply patches from the > mailing list. > > > One issue at the moment is that line endings are normally mangled by > email clients or groups.io (I'm not sure which), so you need to fix the > patches before "git am" will work. > > > -- > Rebecca Cran > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107395): https://edk2.groups.io/g/devel/message/107395 Mute This Topic: https://groups.io/mt/100454246/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: UsbBusDxe: Rebuild Descriptor Table
> -Original Message- > From: devel@edk2.groups.io On Behalf Of > brit.chesley via groups.io > Sent: Saturday, July 8, 2023 1:07 AM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Gao, Liming > ; Wu, Hao A ; Ni, Ray > ; Abner Chang > Subject: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: UsbBusDxe: Rebuild > Descriptor Table > > From: Britton Chesley > > Fixed a bug which led to an ASSERT due to the USB device context being > maintained after a port reset, but the underlying XHCI context was > uninitialized. Specifically, Xhc->UsbDevContext is freed after a reset > and only re-allocates the default [0] enpoint transfer ring. Added build Really sorry for another question. My take is that the transfer ring of other endpoints (besides the Default Control Endpoint) will be re-initialized by the below flow: UsbSetConfig -> UsbCtrlRequest (USB_REQ_SET_CONFIG) -> XhcSetConfigCmd(64) -> XhcInitializeEndpointContext(64) Could you help to elaborate a bit more on what is the issue with the above (current) flow and why rebuilding the Descriptor Table before UsbSetConfig can resolve it? Thanks in advance. Best Regards, Hao Wu > descriptor table call in UsbIoPortReset. BZ 4456 > > Cc: Jian J Wang > Cc: Liming Gao > Cc: Hao A Wu > Cc: Ray Ni > Cc: Abner Chang > Signed-off-by: Britton Chesley > --- > MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c | 26 > - > 1 file changed, 25 insertions(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c > b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c > index c25f3cc2f279..a5b798bd8d6c 100644 > --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c > +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c > @@ -821,6 +821,7 @@ UsbIoPortReset ( >EFI_TPLOldTpl; >EFI_STATUS Status; >UINT8 DevAddress; > + UINT8 Config; > >OldTpl = gBS->RaiseTPL (USB_BUS_TPL); > > @@ -882,8 +883,26 @@ UsbIoPortReset ( >// is in CONFIGURED state. >// >if (Dev->ActiveConfig != NULL) { > -Status = UsbSetConfig (Dev, Dev->ActiveConfig->Desc.ConfigurationValue); > +UsbFreeDevDesc (Dev->DevDesc); > > +Status = UsbRemoveConfig (Dev); > +if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "UsbIoPortReset: Failed to remove > configuration - %r\n", Status)); > +} > + > +Status = UsbGetMaxPacketSize0 (Dev); > +if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "UsbIoPortReset: Failed to get max packet size - > %r\n", Status)); > +} > + > +Status = UsbBuildDescTable (Dev); > +if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "UsbIoPortReset: Failed to build descriptor > table - %r\n", Status)); > +} > + > +Config = Dev->DevDesc->Configs[0]->Desc.ConfigurationValue; > + > +Status = UsbSetConfig (Dev, Config); > if (EFI_ERROR (Status)) { >DEBUG (( > DEBUG_ERROR, > @@ -892,6 +911,11 @@ UsbIoPortReset ( > Status > )); > } > + > +Status = UsbSelectConfig (Dev, Config); > +if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "UsbIoPortReset: Failed to set configuration - > %r\n", Status)); > +} >} > > ON_EXIT: > -- > 2.36.1 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107396): https://edk2.groups.io/g/devel/message/107396 Mute This Topic: https://groups.io/mt/100010162/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 0/3] OvmfPkg/Bhyve: enable bus enumeration
On Mon, 31 Jul 2023 at 02:46, Rebecca Cran wrote: > > For the series: > > > Reviewed-by: Rebecca Cran > Thanks for taking care of this. In the future, when you merge patches for a package that you don't maintain, could you please mention this in a reply to the thread? That way, I'll know I won't have to bother pulling the patches and trying to apply them. Thanks, Ard. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107397): https://edk2.groups.io/g/devel/message/107397 Mute This Topic: https://groups.io/mt/100074281/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-platforms][PATCH V3] Silicon/Synopsys/DesignWare: DwEmacSnpDxe: Fix bug in EmacGetDmaStatus
On Mon, Jul 31, 2023 at 4:25 AM wangy wrote: > > From: Yang Wang > > The EFI spec (see UEFI 2.10, 24.1.12) requires > EFI_SIMPLE_NETWORK.GetStatus() to handle NULL InterruptStatus pointers > by not reading nor clearing the interrupt status from the device. > > However, EmacGetDmaStatus (part of the DwEmacSnpDxe GetStatus() > implementation) did not correctly handle NULL IrqStat, despite already > being tagged as an OPTIONAL argument. This made calling GetStatus() > with a NULL pointer (for example, the call in MnpRecycleTxBuf) either > corrupt memory or straight-up crash. > > Make it EFI spec compliant, by adding proper NULL pointer checks > around RI_SET_MSK and TI_SET_MSK retrieval/clearing. > > Cc: Leif Lindholm > Cc: Ard Biesheuvel > > Signed-off-by: Yang Wang > Acked-by: Pedro Falcato > Reviewed-by: Ran Wang > --- > .../Drivers/DwEmacSnpDxe/EmacDxeUtil.c| 22 --- > 1 file changed, 14 insertions(+), 8 deletions(-) > > diff --git a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c > b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c > index 3b982ce984..26d3ff6138 100755 > --- a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c > +++ b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c > @@ -500,24 +500,30 @@ EmacGetDmaStatus ( >UINT32 ErrorBit; >UINT32 Mask = 0; > > + if (IrqStat != NULL) { > +*IrqStat = 0; > + } > + >DmaStatus = MmioRead32 (MacBaseAddress + > DW_EMAC_DMAGRP_STATUS_OFST); >if (DmaStatus & DW_EMAC_DMAGRP_STATUS_NIS_SET_MSK) { > Mask |= DW_EMAC_DMAGRP_STATUS_NIS_SET_MSK; > // Rx interrupt > if (DmaStatus & DW_EMAC_DMAGRP_STATUS_RI_SET_MSK) { > - *IrqStat |= EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT; > - Mask |= DW_EMAC_DMAGRP_STATUS_RI_SET_MSK; > -} else { > - *IrqStat &= ~EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT; > + if (IrqStat != NULL) { > +*IrqStat |= EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT; > +Mask |= DW_EMAC_DMAGRP_STATUS_RI_SET_MSK; > + } > } > + > // Tx interrupt > if (DmaStatus & DW_EMAC_DMAGRP_STATUS_TI_SET_MSK) { > - *IrqStat |= EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT; > - Mask |= DW_EMAC_DMAGRP_STATUS_TI_SET_MSK; > -} else { > - *IrqStat &= ~EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT; > + if (IrqStat != NULL) { > +*IrqStat |= EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT; > +Mask |= DW_EMAC_DMAGRP_STATUS_TI_SET_MSK; > + } > } > + > // Tx Buffer > if (DmaStatus & DW_EMAC_DMAGRP_STATUS_TU_SET_MSK){ >Mask |= DW_EMAC_DMAGRP_STATUS_TU_SET_MSK; > -- > 2.25.1 Hi, No need for a v3, Ard has already applied the patch (https://github.com/tianocore/edk2-platforms/commit/cbab3c40f76ee913621a9f4afe3398b217b0d086). -- Pedro -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107398): https://edk2.groups.io/g/devel/message/107398 Mute This Topic: https://groups.io/mt/100455239/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] 回复: [PATCH v2 0/4] OvmfPkg/RiscVVirt: Add CLANGDWARF toolchain support
On Fri, 28 Jul 2023 at 07:32, Sunil V L wrote: > > On Tue, Jul 25, 2023 at 05:59:25PM +0200, Ard Biesheuvel wrote: > > On Fri, 21 Jul 2023 at 06:52, Sunil V L wrote: > > > > > > On Mon, Jul 17, 2023 at 11:38:31AM +0200, Ard Biesheuvel wrote: > > > > On Mon, 17 Jul 2023 at 03:51, gaoliming via groups.io > > > > wrote: > > > > > > > > > > Sunil: > > > > > Do you use which CLANG version is used to verify this change? > > > > > > > > > > > > > For the series, > > > > > > > > Tested-by: Ard Biesheuvel # Debian clang version > > > > 14.0.6 > > > > > > > Thanks!, Ard. > > > > > > Hi Liming, do you have any further feedback? > > > > > > > Could we make some progress here? I'm happy to go and merge this if i > > can get an ack on the basetools change > > Hi Liming, > > Could you please provide RB/ACK tag so that Ard can merge this? We would > like to get this support added for upcoming stable release. > If nobody objects, I will merge this tomorrow with or without an ack from the BaseTools maintainers. Thanks, Ard. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107399): https://edk2.groups.io/g/devel/message/107399 Mute This Topic: https://groups.io/mt/100187566/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 3/4] BaseTools/tools_def: Add CLANGDWARF support for RISC-V
Reviewed-by: Rebecca Cran On 7/11/23 09:43, Sunil V L wrote: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4478 Add tools_def definitions to support CLANGDWARF toolchain for RISC-V. This uses clang and the llvm LLD linker. This helps people by not requiring to install multiple cross compilers for different architectures. Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Cc: Ard Biesheuvel Signed-off-by: Sunil V L Acked-by: Ard Biesheuvel --- BaseTools/Conf/tools_def.template | 53 +++ 1 file changed, 53 insertions(+) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 90f4105506e5..1bf62362b611 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -745,6 +745,7 @@ DEFINE GCC_LOONGARCH64_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) -mabi=lp64d -fno-asyn DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access DEFINE GCC_AARCH64_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie -ffixed-x18 DEFINE GCC_AARCH64_CC_XIPFLAGS = -mstrict-align -mgeneral-regs-only +DEFINE GCC_RISCV64_CC_XIPFLAGS = -mstrict-align -mgeneral-regs-only DEFINE GCC_DLINK_FLAGS_COMMON = -nostdlib --pie DEFINE GCC_DLINK2_FLAGS_COMMON = -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds DEFINE GCC_IA32_X64_DLINK_COMMON = DEF(GCC_DLINK_FLAGS_COMMON) --gc-sections @@ -2023,6 +2024,58 @@ DEFINE CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_ RELEASE_CLANGDWARF_AARCH64_CC_FLAGS= DEF(CLANGDWARF_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O3 RELEASE_CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_DLINK_FLAGS) -flto -Wl,-O3 -fuse-ld=lld -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wl,--no-pie,--no-relax +## +# CLANGDWARF RISCV64 definitions +## +DEFINE CLANGDWARF_RISCV64_TARGET= -target riscv64-linux-gnu +DEFINE CLANGDWARF_RISCV64_CC_COMMON = DEF(GCC5_RISCV_ALL_CC_FLAGS) DEF(GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE) DEF(GCC5_RISCV_OPENSBI_TYPES) -march=DEF(GCC5_RISCV64_ARCH) -fno-builtin -fno-builtin-memcpy -fno-stack-protector -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -Wno-unused-but-set-variable -fpack-struct=8 -mcmodel=medany -mabi=lp64 -mno-relax +DEFINE CLANGDWARF_RISCV64_CC_FLAGS = DEF(CLANGDWARF_RISCV64_CC_COMMON) DEF(CLANGDWARF_RISCV64_TARGET) DEF(CLANGDWARF_WARNING_OVERRIDES) + +# This is similar to GCC flags but without -n +DEFINE CLANGDWARF_RISCV64_ALL_DLINK_COMMON = -nostdlib -Wl,-q,--gc-sections -z common-page-size=0x40 +DEFINE CLANGDWARF_RISCV64_ALL_DLINK_FLAGS = DEF(CLANGDWARF_RISCV64_ALL_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map +DEFINE CLANGDWARF_RISCV64_DLINK_FLAGS = DEF(CLANGDWARF_RISCV64_TARGET) DEF(CLANGDWARF_RISCV64_ALL_DLINK_FLAGS) -Wl,-melf64lriscv,--oformat=elf64-littleriscv,--no-relax + +*_CLANGDWARF_RISCV64_PP_FLAGS = DEF(GCC_PP_FLAGS) +*_CLANGDWARF_RISCV64_ASLCC_FLAGS= DEF(GCC_ASLCC_FLAGS) +*_CLANGDWARF_RISCV64_APP_FLAGS = +*_CLANGDWARF_RISCV64_ASL_FLAGS = DEF(IASL_FLAGS) +*_CLANGDWARF_RISCV64_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS) +*_CLANGDWARF_RISCV64_DTCPP_FLAGS= DEF(GCC_DTCPP_FLAGS) +*_CLANGDWARF_RISCV64_DEPS_FLAGS = DEF(GCC_DEPS_FLAGS) + +*_CLANGDWARF_RISCV64_CC_PATH= ENV(CLANGDWARF_BIN)clang +*_CLANGDWARF_RISCV64_ASM_PATH = ENV(CLANGDWARF_BIN)clang +*_CLANGDWARF_RISCV64_PP_PATH= ENV(CLANGDWARF_BIN)clang +*_CLANGDWARF_RISCV64_VFRPP_PATH = ENV(CLANGDWARF_BIN)clang +*_CLANGDWARF_RISCV64_ASLCC_PATH = ENV(CLANGDWARF_BIN)clang +*_CLANGDWARF_RISCV64_ASLPP_PATH = ENV(CLANGDWARF_BIN)clang +*_CLANGDWARF_RISCV64_DLINK_PATH = ENV(CLANGDWARF_BIN)clang +*_CLANGDWARF_RISCV64_ASLDLINK_PATH = ENV(CLANGDWARF_BIN)clang + +*_CLANGDWARF_RISCV64_SLINK_PATH = ENV(CLANGDWARF_BIN)llvm-ar +*_CLANGDWARF_RISCV64_RC_PATH= ENV(CLANGDWARF_BIN)llvm-objcopy + +*_CLANGDWARF_RISCV64_ASLCC_FLAGS= DEF(GCC_ASLCC_FLAGS) -fno-lto +*_CLANGDWARF_RISCV64_ASLDLINK_FLAGS = DEF(CLANGDWARF_RISCV64_TARGET) DEF(GCC5_RISCV32_RISCV64_ASLDLINK_FLAGS) +*_CLANGDWARF_RISCV64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANGDWARF_RISCV64_TARGET) $(PLATFORM_FLAGS) -Qunused-arguments -mabi=lp64 -mno-relax +*_CLANGDWARF_RISCV64_DLINK_FLAGS= DEF(CLANGDWARF_RISCV64_TARGET) DEF(GCC5_RISCV64_DLINK_FLAGS) +*_CLANGDWARF_RISCV64_DLINK_XIPFLAGS = -z common-page-size=0x20 +*_CLANGDWARF_RISCV64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x240 +*_CLANGDWARF_RISCV64_PLATFORM_FLAGS = +*_CLANGDWARF_RISCV64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGDWARF_RISCV64_TARGET) $(PLATFORM_FLAGS) +
Re: [edk2-devel] 回复: [PATCH v2 0/4] OvmfPkg/RiscVVirt: Add CLANGDWARF toolchain support
Sorry for the delay. I've just added my R-b. -- Rebecca On 7/31/23 04:29, Ard Biesheuvel wrote: On Fri, 28 Jul 2023 at 07:32, Sunil V L wrote: On Tue, Jul 25, 2023 at 05:59:25PM +0200, Ard Biesheuvel wrote: On Fri, 21 Jul 2023 at 06:52, Sunil V L wrote: On Mon, Jul 17, 2023 at 11:38:31AM +0200, Ard Biesheuvel wrote: On Mon, 17 Jul 2023 at 03:51, gaoliming via groups.io wrote: Sunil: Do you use which CLANG version is used to verify this change? For the series, Tested-by: Ard Biesheuvel # Debian clang version 14.0.6 Thanks!, Ard. Hi Liming, do you have any further feedback? Could we make some progress here? I'm happy to go and merge this if i can get an ack on the basetools change Hi Liming, Could you please provide RB/ACK tag so that Ard can merge this? We would like to get this support added for upcoming stable release. If nobody objects, I will merge this tomorrow with or without an ack from the BaseTools maintainers. Thanks, Ard. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107401): https://edk2.groups.io/g/devel/message/107401 Mute This Topic: https://groups.io/mt/100187566/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 0/3] OvmfPkg/Bhyve: enable bus enumeration
Sorry, I'll try and remember to do that in future. On 7/31/23 02:24, Ard Biesheuvel wrote: On Mon, 31 Jul 2023 at 02:46, Rebecca Cran wrote: For the series: Reviewed-by: Rebecca Cran Thanks for taking care of this. In the future, when you merge patches for a package that you don't maintain, could you please mention this in a reply to the thread? That way, I'll know I won't have to bother pulling the patches and trying to apply them. Thanks, Ard. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107402): https://edk2.groups.io/g/devel/message/107402 Mute This Topic: https://groups.io/mt/100074281/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] 回复: [PATCH v2 0/4] OvmfPkg/RiscVVirt: Add CLANGDWARF toolchain support
Thanks all. Merged now as #4701 On Mon, 31 Jul 2023 at 13:29, Rebecca Cran wrote: > > Sorry for the delay. I've just added my R-b. > > > -- > > Rebecca > > > On 7/31/23 04:29, Ard Biesheuvel wrote: > > On Fri, 28 Jul 2023 at 07:32, Sunil V L wrote: > >> On Tue, Jul 25, 2023 at 05:59:25PM +0200, Ard Biesheuvel wrote: > >>> On Fri, 21 Jul 2023 at 06:52, Sunil V L wrote: > On Mon, Jul 17, 2023 at 11:38:31AM +0200, Ard Biesheuvel wrote: > > On Mon, 17 Jul 2023 at 03:51, gaoliming via groups.io > > wrote: > >> Sunil: > >>Do you use which CLANG version is used to verify this change? > >> > > For the series, > > > > Tested-by: Ard Biesheuvel # Debian clang version > > 14.0.6 > > > Thanks!, Ard. > > Hi Liming, do you have any further feedback? > > >>> Could we make some progress here? I'm happy to go and merge this if i > >>> can get an ack on the basetools change > >> Hi Liming, > >> > >> Could you please provide RB/ACK tag so that Ard can merge this? We would > >> like to get this support added for upcoming stable release. > >> > > If nobody objects, I will merge this tomorrow with or without an ack > > from the BaseTools maintainers. > > > > Thanks, > > Ard. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107403): https://edk2.groups.io/g/devel/message/107403 Mute This Topic: https://groups.io/mt/100187566/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 1/1] MdePkg: Add Cxl20.h into IndustryStandard
hi Chris, I attached the file, which add some comments. Please help review it. One open need you to be taken care of the reserved fields on CXL2.0 register. Consider that CXL3.0 and new one will be compatible with CXL2.0, I remove the CXL version on CXL register definition in current CXL20.h. If New register in CXL30 or new one is defined on CXL20 register's reserved field, we can update these new register definition in CXL2.0 file. For a whole new registers on CXL30 or new one, we can add new header file CXL3.0 or new header file for them. -Original Message- From: Nong, Foster Sent: Tuesday, July 18, 2023 11:15 AM To: Ni, Ray ; devel@edk2.groups.io; chri...@os.amperecomputing.com; Yao, Jiewen Subject: RE: [edk2-devel] [PATCH 1/1] MdePkg: Add Cxl20.h into IndustryStandard Thanks Chris, I will take some time to review it. -Original Message- From: Ni, Ray Sent: Friday, June 30, 2023 2:08 PM To: devel@edk2.groups.io; chri...@os.amperecomputing.com; Yao, Jiewen ; Nong, Foster Subject: RE: [edk2-devel] [PATCH 1/1] MdePkg: Add Cxl20.h into IndustryStandard +@Nong, Foster > -Original Message- > From: devel@edk2.groups.io On Behalf Of Chris > Li OS via groups.io > Sent: Friday, June 30, 2023 2:07 PM > To: Yao, Jiewen ; devel@edk2.groups.io > Subject: Re: [edk2-devel] [PATCH 1/1] MdePkg: Add Cxl20.h into > IndustryStandard > > Thanks Jiewen, will soon send an v2 for it. > > > From: Yao, Jiewen > Sent: Thursday, June 29, 2023 4:43 PM > To: Chris Li OS; devel@edk2.groups.io > Cc: Yao, Jiewen > Subject: RE: [PATCH 1/1] MdePkg: Add Cxl20.h into IndustryStandard > > Thanks for the update. > > +} HDM_DECODER_N_INFO; > > I think this need add CXL_ prefix. > > Other looks good to me. > > Thank you > Yao, Jiewen > > > > > -Original Message- > > From: Chris Li OS > > Sent: Wednesday, June 28, 2023 1:28 PM > > To: devel@edk2.groups.io; Yao, Jiewen > > Subject: [PATCH 1/1] MdePkg: Add Cxl20.h into IndustryStandard > > > > 1) Add CXL 2.0 header file to comply with CXL 2.0 specification > > 2) CXL 2.0 header will embed Cxl11.h > > 3) Updated Cxl.h to point to 2.0 header file > > > > Signed-off-by: Chris Li > > --- > > MdePkg/Include/IndustryStandard/Cxl.h | 2 +- > > MdePkg/Include/IndustryStandard/Cxl20.h | 477 > > > 2 files changed, 478 insertions(+), 1 deletion(-) create mode > > 100644 MdePkg/Include/IndustryStandard/Cxl20.h > > > > diff --git a/MdePkg/Include/IndustryStandard/Cxl.h > > b/MdePkg/Include/IndustryStandard/Cxl.h > > index 06c1230e3e..9ad3242e25 100644 > > --- a/MdePkg/Include/IndustryStandard/Cxl.h > > +++ b/MdePkg/Include/IndustryStandard/Cxl.h > > @@ -12,7 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > > #ifndef _CXL_MAIN_H_ #define _CXL_MAIN_H_ > > > > -#include > > +#include > > // > > // CXL assigned new Vendor ID > > // > > diff --git a/MdePkg/Include/IndustryStandard/Cxl20.h > > b/MdePkg/Include/IndustryStandard/Cxl20.h > > new file mode 100644 > > index 00..a08251f4e9 > > --- /dev/null > > +++ b/MdePkg/Include/IndustryStandard/Cxl20.h > > @@ -0,0 +1,477 @@ > > +/** @file > > + CXL 2.0 Register definitions > > + > > + This file contains the register definitions based on the Compute > > + Express Link > > + (CXL) Specification Revision 2.0. > > + > > + Copyright (c) 2023, Ampere Computing LLC. All rights > > + reserved. > > + > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > + > > +#ifndef CXL20_H_ > > +#define CXL20_H_ > > + > > +#include > > + > > +// > > +// Ensure proper structure formats > > +// > > +#pragma pack(1) > > + > > + > > +// > > +// CXL DVSEC IDs and Revisions > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.1.1 > > +// > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_CXL_DEVICE0x0 > > +#define CXL_DVSEC_ID_NON_CXL_FUNCTION_MAP 0x2 > > +#define CXL_DVSEC_ID_CXL20_EXTENSIONS_DVSEC_FOR_PORTS 0x3 > > +#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_PORTS 0x4 > > +#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_DEVICES0x5 > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_FLEX_BUS_PORT 0x7 > > +#define CXL_DVSEC_ID_REGISTER_LOCATOR 0x8 > > +#define CXL_DVSEC_ID_MLD 0x9 > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_TEST_CAPABILITY 0xA > > + > > +#define CXL20_DVSEC_REVISON_REGISTOR_LOCATOR 0x0 > > + > > +// > > +// Register Block ID > > +// Compute Express Link Specification Revision 2.0 - Chapter > > +8.1.9.1 // > > +#define CXL_REGISTER_BLOCK_ID_EMPTY 0x0 > > +#define CXL_REGISTER_BLOCK_ID_COMPONENT 0x01 > > +#define CXL_REGISTER_BLOCK_ID_BAR_VIRTUALIZATION_ACL 0x02 > > +#define CXL_REGISTER_BLOCK_ID_DEVICE 0x03 > > + > > +// > > +// Component Register Block Register Ranges Offset // Compute > > +Express Link Specificatio
[edk2-devel] [PATCH v1 0/2] MdePkg: Add missing status codes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4514 Upon review it has been found that MdePkg is missing two status code definitions: 1. EFI_IP_ADDRESS_CONFLICT - Added in UEFI Spec v2.5 2. EFI_WARN_RESET_REQUIRED - Added in UEFI Spec v2.6 Moreover, PrintLib does not correctly decode the follow status codes: 1. EFI_IP_ADDRESS_CONFLICT 2. EFI_HTTP_ERROR 3. EFI_WARN_FILE_SYSTEM 4. EFI_WARN_RESET_REQUIRED These missing status codes and the missing decodings have been added. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Nate DeSimone Nate DeSimone (2): MdePkg: Add missing status codes MdePkg: Add new status codes to PrintLib MdePkg/Include/Base.h | 10 ++ MdePkg/Include/Uefi/UefiBaseType.h | 2 ++ MdePkg/Library/BasePrintLib/PrintLibInternal.c | 10 +++--- 3 files changed, 19 insertions(+), 3 deletions(-) -- 2.30.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107405): https://edk2.groups.io/g/devel/message/107405 Mute This Topic: https://groups.io/mt/100468025/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH 1/2] MdePkg: Add missing status codes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4514 Upon review it has been found that MdePkg is missing two status code definitions: 1. EFI_IP_ADDRESS_CONFLICT - Added in UEFI Spec v2.5 2. EFI_WARN_RESET_REQUIRED - Added in UEFI Spec v2.6 These missing status codes have been added. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Nate DeSimone --- MdePkg/Include/Base.h | 10 ++ MdePkg/Include/Uefi/UefiBaseType.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index d209e6de28..4472ede2b4 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -1133,6 +1133,11 @@ typedef UINTN RETURN_STATUS; /// #define RETURN_COMPROMISED_DATA ENCODE_ERROR (33) +/// +/// There is an address conflict address allocation. +/// +#define RETURN_IP_ADDRESS_CONFLICT ENCODE_ERROR (34) + /// /// A HTTP error occurred during the network operation. /// @@ -1172,6 +1177,11 @@ typedef UINTN RETURN_STATUS; /// #define RETURN_WARN_FILE_SYSTEM ENCODE_WARNING (6) +/// +/// The operation will be processed across a system reset. +/// +#define RETURN_WARN_RESET_REQUIRED ENCODE_WARNING (7) + /** Returns a 16-bit signature built from 2 ASCII characters. diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index 83975a08eb..df9a0d3709 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -141,6 +141,7 @@ typedef union { #define EFI_END_OF_FILE RETURN_END_OF_FILE #define EFI_INVALID_LANGUAGE RETURN_INVALID_LANGUAGE #define EFI_COMPROMISED_DATA RETURN_COMPROMISED_DATA +#define EFI_IP_ADDRESS_CONFLICT RETURN_IP_ADDRESS_CONFLICT #define EFI_HTTP_ERRORRETURN_HTTP_ERROR #define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH @@ -149,6 +150,7 @@ typedef union { #define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL #define EFI_WARN_STALE_DATARETURN_WARN_STALE_DATA #define EFI_WARN_FILE_SYSTEM RETURN_WARN_FILE_SYSTEM +#define EFI_WARN_RESET_REQUIREDRETURN_WARN_RESET_REQUIRED ///@} /// -- 2.30.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107406): https://edk2.groups.io/g/devel/message/107406 Mute This Topic: https://groups.io/mt/100468026/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH 2/2] MdePkg: Add new status codes to PrintLib
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4514 PrintLib does not correctly decode the follow status codes: 1. EFI_IP_ADDRESS_CONFLICT 2. EFI_HTTP_ERROR 3. EFI_WARN_FILE_SYSTEM 4. EFI_WARN_RESET_REQUIRED These missing status codes have been added. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Nate DeSimone --- MdePkg/Library/BasePrintLib/PrintLibInternal.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c b/MdePkg/Library/BasePrintLib/PrintLibInternal.c index 42b598a432..c666c6614c 100644 --- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c +++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c @@ -8,8 +8,8 @@ #include "PrintLibInternal.h" -#define WARNING_STATUS_NUMBER 5 -#define ERROR_STATUS_NUMBER33 +#define WARNING_STATUS_NUMBER 7 +#define ERROR_STATUS_NUMBER35 // // Safe print checks @@ -37,6 +37,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mWarningString[][24+1] = { "Warning Write Failure",// RETURN_WARN_WRITE_FAILURE = 3 "Warning Buffer Too Small", // RETURN_WARN_BUFFER_TOO_SMALL = 4 "Warning Stale Data", // RETURN_WARN_STALE_DATA= 5 + "Warning File System", // RETURN_WARN_FILE_SYSTEM = 6 + "Warning Reset Required", // RETURN_WARN_RESET_REQUIRED= 7 }; // @@ -75,7 +77,9 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mErrorString[][20+1] = { "Reserved (30)",// RESERVED = 30 | MAX_BIT "End of File", // RETURN_END_OF_FILE= 31 | MAX_BIT "Invalid Language", // RETURN_INVALID_LANGUAGE = 32 | MAX_BIT - "Compromised Data" // RETURN_COMPROMISED_DATA = 33 | MAX_BIT + "Compromised Data", // RETURN_COMPROMISED_DATA = 33 | MAX_BIT + "IP Address Conflict", // RETURN_IP_ADDRESS_CONFLICT= 34 | MAX_BIT + "HTTP Error"// RETURN_HTTP_ERROR = 35 | MAX_BIT }; /** -- 2.30.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107407): https://edk2.groups.io/g/devel/message/107407 Mute This Topic: https://groups.io/mt/100468027/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V3 3/3] ShellPkg/AcpiView: Add MPAM Parser
Hi Pierre, Apologies for the delay in response. ~~ > > + > > +/** > > + This function parses the locator field within the resource node for > ACPI > MPAM > > + table. The parsing is based on the locator type field. > > + > > + This function also performs validation of the locator field. > > + **/ > > +STATIC > > +VOID > > +EFIAPI > > +ParseLocator ( > > + VOID > > + ) > > +{ > > + UINT8 *LocatorPtr; > > + > > + LocatorPtr = Locator; > > + > > + switch (*LocatorType) { > > I think it would be simpler to define names as: > > STATIC CONST CHAR16 *MpamLocationNames[] = { > L"Processor cache", > L"Memory", > ... > > and also to define ACPI_PARSER tables for the locator descriptors > instead of using PrintGenericLocatorDescriptor(). > Eg: > STATIC CONST ACPI_PARSER SmmuLocatorDescriptorParser[] = { > { L"SMMU interface", 8, 0, L"%lu", NULL, NULL, NULL, NULL }, > { L"Reserved ID", 4, 8, L"%u", NULL, NULL, ValidateReservedGeneric, > >> (VOID > *)2 }, > > >>> > >>> [Rohit] The only reason I did not want to do this was to avoid manually > >> moving the offset back by x bytes to reparse the locator. We parse the > locator > >> using MpamMscResourceLocatorParser. If we would need to use > >> ACPI_PARSER, we would need to step back by 12 bytes (assuming offset is > >> used right after we parse the locator) and reparse the locator under the > >> respective switch case. We might not be able to skip > >> MpamMscResourceLocatorParser as > >> EFI_ACPI_MPAM_LOCATION_MEMORY_CACHE can't be parsed by > >> ACPI_PARSER. Would this be cleaner, what are your thoughts? > >> > >> Ok right, I misread the structure the first time. > >> In that case, would it be possible to use ParseLocator() (or a remake of > >> the > >> function) > >> as a ACPI_PARSER's PrintFormatter() callback ? > >> > >> Cf. the comment below, I think this should be possible to parse a > >> EFI_ACPI_MPAM_LOCATION_MEMORY_CACHE > >> struct using a ACPI_PARSER structure. > >> > > > > [Rohit] PrintFomatter would only be called for a call with Trace = TRUE. > > While > parsing MpamMscResourceLocatorParser, Trace is set to FALSE. > > > > // Snippet > > if (Trace) { > >// if there is a Formatter function let the function handle > >// the printing else if a Format is specified in the table use > >// the Format for printing > >PrintFieldName (2, Parser[Index].NameStr); > >if (Parser[Index].PrintFormatter != NULL) { > > Parser[Index].PrintFormatter (Parser[Index].Format, Ptr); > > > > IIUC, Trace = False for the MpamMscResourceLocatorParser struct because we > just > want to populate the 'Locator', and let ParseLocator() print/parse the fields. > > If a PrintFomatter() callback is implemented, the 'Locator' offset wouldn't > need to be populated anymore, the printing/parsing would directly happen > in the PrintFomatter(). Do you think it could work ? [Rohit] The format for PrintFomatter is as follows - STATIC VOID (*FN)(CONST CHAR16 *Format, UINT8 *Ptr). This would mean that we have access to Ptr to whatever field we implement this callback for, but not the Offset and AcpiTableLength. A way around this would be to have Offset and AcpiTableLength as globals, but this seems less clean in my opinion. > > > > >>> > > > +case EFI_ACPI_MPAM_LOCATION_PROCESSOR_CACHE: > > + PrintGenericLocatorDescriptor ( > > +4, > > +L"Processor cache", > > +L"* Cache reference", > > +L"* Reserved", > > +LocatorPtr, > > +TRUE > > +); > > + break; > > +case EFI_ACPI_MPAM_LOCATION_MEMORY: > > + PrintGenericLocatorDescriptor ( > > +4, > > +L"Memory", > > +L"* Proximity domain", > > +L"* Reserved", > > +LocatorPtr, > > +TRUE > > +); > > + break; > > +case EFI_ACPI_MPAM_LOCATION_SMMU: > > + PrintGenericLocatorDescriptor ( > > +4, > > +L"SMMU", > > +L"* SMMU interface", > > +L"* Reserved", > > +LocatorPtr, > > +TRUE > > +); > > + break; > > +case EFI_ACPI_MPAM_LOCATION_MEMORY_CACHE: > > The code would be more generic with ACPI_PARSER structures I think > >>> > >>> [Rohit] I believe ACPI_PARSER won't parse Memory-side cache locator > >> descriptor due to its odd field length. > >> > >> I think there is a similar case for the Reserved field of the 'GT Block > >> Timer > >> Structure', > >> Cf ACPI 6.5, Table 5.121: GT Block Timer Structure Format > >> and in the GtdtParser for the GtBlockTimerParser structure. > >> > >> A Dump7Chars function would need to be added for our case I beleive. > >> > >
Re: [edk2-devel] [PATCH v1 0/2] MdePkg: Add missing status codes
Reviewed-by: Michael D Kinney > -Original Message- > From: Desimone, Nathaniel L > Sent: Monday, July 31, 2023 11:43 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Gao, Liming > ; Liu, Zhiguang > Subject: [PATCH v1 0/2] MdePkg: Add missing status codes > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4514 > > Upon review it has been found that MdePkg is missing two > status code definitions: > > 1. EFI_IP_ADDRESS_CONFLICT - Added in UEFI Spec v2.5 > 2. EFI_WARN_RESET_REQUIRED - Added in UEFI Spec v2.6 > > Moreover, PrintLib does not correctly decode the follow status codes: > > 1. EFI_IP_ADDRESS_CONFLICT > 2. EFI_HTTP_ERROR > 3. EFI_WARN_FILE_SYSTEM > 4. EFI_WARN_RESET_REQUIRED > > These missing status codes and the missing decodings have been added. > > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Signed-off-by: Nate DeSimone > > Nate DeSimone (2): > MdePkg: Add missing status codes > MdePkg: Add new status codes to PrintLib > > MdePkg/Include/Base.h | 10 ++ > MdePkg/Include/Uefi/UefiBaseType.h | 2 ++ > MdePkg/Library/BasePrintLib/PrintLibInternal.c | 10 +++--- > 3 files changed, 19 insertions(+), 3 deletions(-) > > -- > 2.30.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107409): https://edk2.groups.io/g/devel/message/107409 Mute This Topic: https://groups.io/mt/100468025/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] MinPlatformPkg: Remove IA32 in PeiFspWrapperPlatformLib
Reviewed-by: Nate DeSimone -Original Message- From: Hsueh, DoraX Sent: Monday, July 24, 2023 3:07 AM To: devel@edk2.groups.io Cc: Hsueh, DoraX ; Chiu, Chasel ; Desimone, Nathaniel L ; Oram, Isaac W ; Gao, Liming ; Dong, Eric ; Chaganty, Rangasai V ; Chuang, Rosen ; Kuo, Ted Subject: [PATCH] MinPlatformPkg: Remove IA32 in PeiFspWrapperPlatformLib From: DoraX Hsueh REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4508 Remove IA32 only dependency, Because we need to support both IA32 and X64. Apply to a modern platform supporting x64. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Isaac Oram Cc: Liming Gao Cc: Eric Dong Cc: Rangasai V Chaganty Cc: Rosen Chuang Cc: Ted Kuo Signed-off-by: DoraX Hsueh --- .../PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf index dafd17dc..489b34cf 100644 --- a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf +++ b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf @@ -51,7 +51,7 @@ IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec MinPlatformPkg/MinPlatformPkg.dec -[LibraryClasses.IA32] +[LibraryClasses] SiliconPolicyInitLib SiliconPolicyUpdateLib PeiServicesTablePointerLib -- 2.26.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107410): https://edk2.groups.io/g/devel/message/107410 Mute This Topic: https://groups.io/mt/100333272/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] SimicsOpenBoardPkg: Set PcdDxeIplSwitchToLongMode to FALSE
Reviewed-by: Nate DeSimone -Original Message- From: Tan, Dun Sent: Wednesday, July 26, 2023 7:23 PM To: devel@edk2.groups.io Cc: Ni, Ray ; Desimone, Nathaniel L ; Zhiguang Liu Subject: [PATCH] SimicsOpenBoardPkg: Set PcdDxeIplSwitchToLongMode to FALSE Set PcdDxeIplSwitchToLongMode to FALSE if the execution mode is not IA32 PEI + X64 DXE. Signed-off-by: Dun Tan Cc: Ray Ni Cc: Nate DeSimone Cc: Zhiguang Liu --- Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc | 4 1 file changed, 4 insertions(+) diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc index b401bcd414..180f229545 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.ds +++ c @@ -32,7 +32,11 @@ ## gEfiMdeModulePkgTokenSpaceGuid.PcdBrowerGrayOutReadOnlyMenu|TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE +!if $(PEI_ARCH) == "IA32" && $(DXE_ARCH) == "X64" gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE +!else + gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE +!endif gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport|FALSE gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107411): https://edk2.groups.io/g/devel/message/107411 Mute This Topic: https://groups.io/mt/100383975/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, July 31, 2023 #cal-reminder
*Reminder: Tools, CI, Code base construction meeting series* *When:* Monday, July 31, 2023 4:30pm to 5:30pm (UTC-07:00) America/Los Angeles *Where:* https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1949453 ) *Description:* TianoCore community, Microsoft and Intel will be hosting a series of open meetings to discuss build, CI, tools, and other related topics. If you are interested, have ideas/opinions please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft Teams. MS Teams Link in following discussion: * https://github.com/tianocore/edk2/discussions/2614 Anyone is welcome to join. * tianocore/edk2: EDK II (github.com) * tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module (github.com) https://github.com/tianocore/edk2-basetools * tianocore/edk2-pytool-extensions: Extensions to the edk2 build system allowing for a more robust and plugin based build system and tool execution environment (github.com) https://github.com/tianocore/edk2-pytool-extensions * tianocore/edk2-pytool-library: Python library package that supports UEFI development (github.com) https://github.com/tianocore/edk2-pytool-library MS Teams Browser Clients * https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107413): https://edk2.groups.io/g/devel/message/107413 Mute This Topic: https://groups.io/mt/100452568/21656 Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] Now: Tools, CI, Code base construction meeting series - Monday, July 31, 2023 #cal-notice
*Tools, CI, Code base construction meeting series* *When:* Monday, July 31, 2023 4:30pm to 5:30pm (UTC-07:00) America/Los Angeles *Where:* https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1949453 ) *Description:* TianoCore community, Microsoft and Intel will be hosting a series of open meetings to discuss build, CI, tools, and other related topics. If you are interested, have ideas/opinions please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft Teams. MS Teams Link in following discussion: * https://github.com/tianocore/edk2/discussions/2614 Anyone is welcome to join. * tianocore/edk2: EDK II (github.com) * tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module (github.com) https://github.com/tianocore/edk2-basetools * tianocore/edk2-pytool-extensions: Extensions to the edk2 build system allowing for a more robust and plugin based build system and tool execution environment (github.com) https://github.com/tianocore/edk2-pytool-extensions * tianocore/edk2-pytool-library: Python library package that supports UEFI development (github.com) https://github.com/tianocore/edk2-pytool-library MS Teams Browser Clients * https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107414): https://edk2.groups.io/g/devel/message/107414 Mute This Topic: https://groups.io/mt/100473289/21656 Mute #cal-notice:https://edk2.groups.io/g/devel/mutehashtag/cal-notice Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, August 1, 2023 #cal-reminder
*Reminder: TianoCore Bug Triage - APAC / NAMO* *When:* Tuesday, August 1, 2023 6:30pm to 7:30pm (UTC-07:00) America/Los Angeles *Where:* https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d *Organizer:* Liming Gao gaolim...@byosoft.com.cn ( gaolim...@byosoft.com.cn?subject=Re:%20Event:%20TianoCore%20Bug%20Triage%20-%20APAC%20%2F%20NAMO ) View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1949449 ) *Description:* TianoCore Bug Triage - APAC / NAMO Hosted by Liming Gao Microsoft Teams meeting *Join on your computer or mobile app* Click here to join the meeting ( https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d ) *Join with a video conferencing device* te...@conf.intel.com Video Conference ID: 116 062 094 0 Alternate VTC dialing instructions ( https://conf.intel.com/teams/?conf=1160620940&ivr=teams&d=conf.intel.com&test=test_call ) *Or call in (audio only)* +1 916-245-6934,,77463821# ( tel:+19162456934,,77463821# ) United States, Sacramento Phone Conference ID: 774 638 21# Find a local number ( https://dialin.teams.microsoft.com/d195d438-2daa-420e-b9ea-da26f9d1d6d5?id=77463821 ) | Reset PIN ( https://mysettings.lync.com/pstnconferencing ) Learn More ( https://aka.ms/JoinTeamsMeeting ) | Meeting options ( https://teams.microsoft.com/meetingOptions/?organizerId=b286b53a-1218-4db3-bfc9-3d4c5aa7669e&tenantId=46c98d88-e344-4ed4-8496-4ed7712e255d&threadId=19_meeting_OTUyZTg2NjgtNDhlNS00ODVlLTllYTUtYzg1OTNjNjdiZjFh@thread.v2&messageId=0&language=en-US ) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107415): https://edk2.groups.io/g/devel/message/107415 Mute This Topic: https://groups.io/mt/100475232/21656 Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-platforms][PATCH V3] Silicon/Synopsys/DesignWare: DwEmacSnpDxe: Fix bug in EmacGetDmaStatus
Hi Pedro Falcato, At 2023-07-31 17:15:20, "Pedro Falcato" wrote: >On Mon, Jul 31, 2023 at 4:25 AM wangy wrote: >> >> From: Yang Wang >> >> The EFI spec (see UEFI 2.10, 24.1.12) requires >> EFI_SIMPLE_NETWORK.GetStatus() to handle NULL InterruptStatus pointers >> by not reading nor clearing the interrupt status from the device. >> >> However, EmacGetDmaStatus (part of the DwEmacSnpDxe GetStatus() >> implementation) did not correctly handle NULL IrqStat, despite already >> being tagged as an OPTIONAL argument. This made calling GetStatus() >> with a NULL pointer (for example, the call in MnpRecycleTxBuf) either >> corrupt memory or straight-up crash. >> >> Make it EFI spec compliant, by adding proper NULL pointer checks >> around RI_SET_MSK and TI_SET_MSK retrieval/clearing. >> >> Cc: Leif Lindholm >> Cc: Ard Biesheuvel >> >> Signed-off-by: Yang Wang >> Acked-by: Pedro Falcato >> Reviewed-by: Ran Wang >> --- >> .../Drivers/DwEmacSnpDxe/EmacDxeUtil.c| 22 --- >> 1 file changed, 14 insertions(+), 8 deletions(-) >> >> diff --git a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c >> b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c >> index 3b982ce984..26d3ff6138 100755 >> --- a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c >> +++ b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c >> @@ -500,24 +500,30 @@ EmacGetDmaStatus ( >>UINT32 ErrorBit; >>UINT32 Mask = 0; >> >> + if (IrqStat != NULL) { >> +*IrqStat = 0; >> + } >> + >>DmaStatus = MmioRead32 (MacBaseAddress + >> DW_EMAC_DMAGRP_STATUS_OFST); >>if (DmaStatus & DW_EMAC_DMAGRP_STATUS_NIS_SET_MSK) { >> Mask |= DW_EMAC_DMAGRP_STATUS_NIS_SET_MSK; >> // Rx interrupt >> if (DmaStatus & DW_EMAC_DMAGRP_STATUS_RI_SET_MSK) { >> - *IrqStat |= EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT; >> - Mask |= DW_EMAC_DMAGRP_STATUS_RI_SET_MSK; >> -} else { >> - *IrqStat &= ~EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT; >> + if (IrqStat != NULL) { >> +*IrqStat |= EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT; >> +Mask |= DW_EMAC_DMAGRP_STATUS_RI_SET_MSK; >> + } >> } >> + >> // Tx interrupt >> if (DmaStatus & DW_EMAC_DMAGRP_STATUS_TI_SET_MSK) { >> - *IrqStat |= EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT; >> - Mask |= DW_EMAC_DMAGRP_STATUS_TI_SET_MSK; >> -} else { >> - *IrqStat &= ~EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT; >> + if (IrqStat != NULL) { >> +*IrqStat |= EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT; >> +Mask |= DW_EMAC_DMAGRP_STATUS_TI_SET_MSK; >> + } >> } >> + >> // Tx Buffer >> if (DmaStatus & DW_EMAC_DMAGRP_STATUS_TU_SET_MSK){ >>Mask |= DW_EMAC_DMAGRP_STATUS_TU_SET_MSK; >> -- >> 2.25.1 > >Hi, > >No need for a v3, Ard has already applied the patch >(https://github.com/tianocore/edk2-platforms/commit/cbab3c40f76ee913621a9f4afe3398b217b0d086). Thank you very much, I see. Regards, Yang > >-- >Pedro -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107416): https://edk2.groups.io/g/devel/message/107416 Mute This Topic: https://groups.io/mt/100455239/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] 回复: [PATCH v1 3/4] MdeModulePkg: PeiMain: Introduce implementation of delayed dispatch
Hi Liming, Thanks for the feedback. Per your feedback (I suggest to define MACRO in PeiCore for them. If there is real usage model, new PCD can be introduced later.) on the following new PCDs: gEfiMdeModulePkgTokenSpaceGuid.PcdDelayedDispatchMaxDelayUs gEfiMdeModulePkgTokenSpaceGuid.PcdDelayedDispatchCompletionTimeoutUs gEfiMdeModulePkgTokenSpaceGuid.PcdDelayedDispatchMaxEntries Given this feature has been used internally at Project MU for a while, I collected some feedback from the consumer platforms: - Delayed dispatch is a feature that can be used for power up sequence, and thus the value of maximum entries in this case can depend on the number of PCI devices on the platform, and thus hardcoding the value as a macro definition will limit the usage and we might come to update it very soon. - There is already usage on our platforms that would override the timeout PCDs to based on the firmware builds. For example, on a test build, we might register extra entries to the PPI and thus extend the completion timeout. I agree with your comments on other fronts. Please let me know if you have further concerns regarding the PCDs above. I can send out an updated version after your input on those. Thanks, Kun On 7/24/2023 7:17 PM, gaoliming via groups.io wrote: Kun: I add my comments below. -邮件原件- 发件人: Kun Qin 发送时间: 2023年7月21日 5:07 收件人:devel@edk2.groups.io 抄送: Jian J Wang; Dandan Bi ; Liming Gao; Debkumar De; Catharine West ; Mike Turner 主题: [PATCH v1 3/4] MdeModulePkg: PeiMain: Introduce implementation of delayed dispatch REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4496 This change adds the implementation that fits the needs and description of PI spec defined Delayed Dispatch PPI in Pei Core. The PPI would allow minimal delay for registered callbacks. As well as allowing other functions to wait for GUIDed delayed dispatch callbacks. Cc: Jian J Wang Cc: Dandan Bi Cc: Liming Gao Cc: Debkumar De Cc: Catharine West Co-authored-by: Mike Turner Signed-off-by: Kun Qin --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 353 MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 3 + MdeModulePkg/Core/Pei/PeiMain.h | 76 + MdeModulePkg/Core/Pei/PeiMain.inf | 7 + MdeModulePkg/MdeModulePkg.dec | 15 + 5 files changed, 454 insertions(+) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 5f32ebb560ae..50e59bdbe732 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -3,12 +3,339 @@ Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved. (C) Copyright 2016 Hewlett Packard Enterprise Development LP +Copyright (c) Microsoft Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "PeiMain.h" +/** + DelayedDispatchDispatcher + + ayed Dispach cycle (ie one pass) through each entry, calling functions when their + e has expired. When UniqueId is specified, if there are any of the specified entries + the dispatch queue during dispatch, repeat the DelayedDispatch cycle. + [Liming] Above comments are incomplete. Please update. + @param DelayedDispatchTable Pointer to dispatch table + @param OPTIONAL UniqueId used to insure particular time is met. + + @return BOOLEAN +**/ +BOOLEAN +DelayedDispatchDispatcher ( + IN DELAYED_DISPATCH_TABLE *DelayedDispatchTable, + IN EFI_GUID*UniqueId OPTIONAL + ); + +/** + DelayedDispatch End of PEI callback function. Insure that all of the delayed dispatch + entries are complete before exiting PEI. + + @param[in] PeiServices - Pointer to PEI Services Table. + @param[in] NotifyDesc- Pointer to the descriptor for the Notification event that + caused this function to execute. + @param[in] Ppi - Pointer to the PPI data associated with this function. + + @retval EFI_STATUS - Always return EFI_SUCCESS +**/ +EFI_STATUS +EFIAPI +PeiDelayedDispatchOnEndOfPei ( + IN EFI_PEI_SERVICES **PeiServices, + IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc, + IN VOID *Ppi + ); + +EFI_DELAYED_DISPATCH_PPI mDelayedDispatchPpi = { PeiDelayedDispatchRegister, PeiDelayedDispatchWaitOnUniqueId }; +EFI_PEI_PPI_DESCRIPTORmDelayedDispatchDesc = { + (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), + &gEfiPeiDelayedDispatchPpiGuid, + &mDelayedDispatchPpi +}; + +EFI_PEI_NOTIFY_DESCRIPTOR mDelayedDispatchNotifyDesc = { + EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, + &gEfiEndOfPeiSignalPpiGuid, + PeiDelayedDispatchOnEndOfPei +}; + +/** + Helper function to look up DELAYED_DISPATCH_TABLE published in HOB. + + @return Pointer to DELAYED_DISPATCH_TABLE from HOB +**/ +DELAYED_DISPATCH_TAB