3220 Commits

Author SHA1 Message Date
Filip Lewiński
1002a59639 FtdiUsbSerialDxe.c: don't append redundant FlowControl node
There's no need to append a TtyTerm() node after the Uart node - that is
what TerminalDxe does. Doing so results in a duplicate TtyTerm() node.

Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2025-04-15 17:02:18 +02:00
Filip Lewiński
226ab5b88c FtdiUsbSerialDxe: ignore SerialIO Reset() failure
Some FTDI devices don't need resetting to function properly. For the
currently tested device, resetting caused errors. After ignoring them,
the device worked properly.

Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2025-04-15 17:00:50 +02:00
Filip Lewiński
f25b7faabc FtdiUsbSerialDxe: First try RESET then PURGE
Some FTDI chips don't support RESET_PORT_PURGE_RX and require RESET_PORT_RESET
(0x0) instead.

Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2025-04-15 17:00:43 +02:00
Michał Żygowski
3323ed481d Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c: do not assert if PCI enumeration not done
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
v0.9.0
2022-10-27 18:45:35 +02:00
Michael Kubacki
8ea6ec38da TigerlakeSiliconPkg: Fix invalid debug macros
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4095

Updates several debug macros in TigerlakeSiliconPkg to correctly
match print specifiers to actual arguments.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Heng Luo <heng.luo@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2022-10-24 17:49:30 -07:00
Michael Kubacki
de65831e5a KabylakeSiliconPkg: Fix invalid debug macros
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4095

Updates several debug macros in KabylakeSiliconPkg to correctly
match print specifiers to actual arguments.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2022-10-24 17:49:20 -07:00
Michael Kubacki
ba4318a58b CoffeelakeSiliconPkg: Fix invalid debug macros
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4095

Updates several debug macros in CoffeelakeSiliconPkg to correctly
match print specifiers to actual arguments.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2022-10-24 17:49:12 -07:00
Ard Biesheuvel
0286233f3b Platform/ARM: switch to local version of NorFlashDxe drivers
Drop the dependency on the ArmPlatformPkg version of NorFlashDxe and
NorFlashStandaloneMm, which will be going away soon. Instead, depend on
the local version under Platform/ARM.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-10-19 16:57:37 +02:00
Ard Biesheuvel
d7b286ae5f Platform/ARM: clone NorFlashDxe from ArmPlatformPkg
The ArmPlatformPkg version of NorFlashDxe and NorFlashStandaloneMm will
be going away, so clone them into Platform/ARM where the ARM platforms
that rely on this driver can keep using it.

Other than updating the INF version, refreshing the file GUIDs and
reorganizing the various INF sections, no changes have been made to the
driver.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-10-19 16:57:26 +02:00
Ard Biesheuvel
0e2cb9ba9d Platform/ARM: create local definition of NorFlashPlatformLib
The version of NorFlashPlatformLib defined in ArmPlatformPkg will go
away once we retire its version of NorFlashDxe, so switch to a local
Platform/ARM version instead.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-10-19 16:55:45 +02:00
Ard Biesheuvel
e073492f49 Platform/ARM/BootMonFs: drop spurious dependency on ArmPlatformPkg
Don't include NorFlashPlatformLib.h unnecessarily from BootMonFs, and
drop the reference to ArmPlatformPkg.dec, which isn't needed after that
either.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-10-19 16:55:22 +02:00
Ard Biesheuvel
85280b124e Silicon/SynQuacer: Drop dependency on NorFlashPlatformLib
Fip006Dxe is part of the SynQuacer platform, which is its only user, and
yet, it relies on NorFlashPlatformLib to carry the platform specific NOR
geometry. This library is tied to ArmPlatformPkg's NorFlashDxe, which
will be going away, so let's stop using it.

Since the abstraction serves no purpose here, let's just merge the
library with its only user.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
2022-10-19 16:51:15 +02:00
Ard Biesheuvel
cf45696d24 Platform: Remove ComCast RDK
The Comcast RDK platform was contributed years ago, but since then,
nobody has expressed any interest in it, leaving it to the maintainers
to keep it in shape. As it turns out, the maintainers can think of
better ways to spend their time, so let's just drop it.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
2022-10-19 16:48:58 +02:00
Sheng, W
4f16f918c3 IntelSiliconPkg/VTd: Refine VTd core driver
Refine the DRHD table print message.
Remove unused variable.

Hsd-es-id: 15012152545
Signed-off-by: Sheng Wei <w.sheng@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Jenny Huang <jenny.huang@intel.com>
Reviewed-by: Robert Kowalewski <robert.kowalewski@intel.com>
2022-10-18 15:43:42 +08:00
Benjamin Doron
4d99e03828 KabylakeOpenBoardPkg: Example of board S3
Use silicon code to detect S3 resume state. Apply some relevant policy
modifications.

PcdPeiMemSize must be in common scope, for a DXE module to allocate
required memory. Libraries that produce required PPIs are defined.

BootScriptExecutorDxe should only be linked against a functionally
compatible debug stack.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Jeremy Soller <jeremy@system76.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
2022-10-11 18:04:20 -07:00
Benjamin Doron
b83909ef37 MinPlatformPkg: Implement working S3 resume
Consume S3 resume memory allocation on resume flow.

Also, include complementary FirmwarePerformanceDataTablePei module in
MinPlatform FV for S3 resume performance measurement.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
2022-10-11 17:54:23 -07:00
Benjamin Doron
07d0c98908 S3FeaturePkg: Implement working S3 resume
Follow-up commits to MinPlatform (PeiFspWrapperHobProcessLib for
memory) and FSP-related board libraries (policy overrides)
required for successful S3 resume.

Factored allocation logic into new module to avoid MinPlatform
dependency on S3Feature package.

TODO: Can optimise required size.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>

S3FeaturePkg/Build: Add libraries needed by S3FeaturePkg

This change is needed for proposed S3FeaturePkg additions.
Changes ensure standalone build for S3FeaturePkg and AdvancedFeaturePkg

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Benjamin Doron <benjamin.doron00@gmail.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

MinPlatformPkg/S3: Use EFI_PHYSICAL_ADDRESS for address

This change fixes build warnings with type casts from some compilers.
Also changes type for ACPI_S3_MEMORY S3PeiMemBase to EFI_PHYSICAL_ADDRESS.
This generally makes code eaiser to understand as opposed to UINT64.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Benjamin Doron <benjamin.doron00@gmail.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2022-10-11 17:52:24 -07:00
Benjamin Doron
12064d5fc0 MinPlatformPkg: Add SmmLockBox to build
The LockBox is used for S3 resume in the follow-up patches, but might be
used to support other features too. So, the module is added to a
MinPlatform FV here.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
2022-10-11 17:20:39 -07:00
Isaac Oram
ee8d078e39 WhitleyOpenBoardPkg/AcpiPlatform: Fix table install logic
Fix ACPI table install logic issue introduced by incorrect fix
in 4c9b69e590 that prevents
some tables from being installed.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2022-10-11 17:09:07 -07:00
Michael Kubacki
66cef08cde WhitleyOpenBoardPkg: Fix invalid debug macros
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4094

Updates several debug macros in WhitleyOpenBoardPkg to correctly
match print specifiers to actual arguments.

Note: The "EFI_D_ERROR" macro was changed to "DEBUG_ERROR" in
FspWrapperHobProcessLib.c to pass PatchCheck and comply with latest
guidelines.

Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
2022-10-10 14:16:11 -07:00
Michael Kubacki
b7d17b66fe TigerLakeOpenBoardPkg: Remove unnecessary debug macro argument
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4094

Removes an argument passed to a debug macro without a print
specifier. The argument appears to be useless.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Heng Luo <heng.luo@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Heng Luo <heng.luo@intel.com>
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
2022-10-10 14:16:00 -07:00
Michael Kubacki
df65f5d85c MinPlatformPkg: Fix invalid debug macros
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4094

Updates several debug macros in MinPlatformPkg to correctly match
print specifiers to actual arguments.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Revied-by: Isaac Oram <isaac.w.oram@intel.com>
2022-10-10 14:11:55 -07:00
Michael Kubacki
45c2015953 IntelSiliconPkg/SpiFvbService: Read FV header length from header
Bug Fix: Read the FV header length from the Firmware Volume Block
(FVB) information structure as opposed to EFI_FIRMWARE_VOLUME_HEADER
to account for a variable number of block map entries.

Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Ashraf Ali S <ashraf.ali.s@intel.com>
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
2022-10-10 14:02:24 -07:00
Adrien Thierry
ad00518399 Platform/RaspberryPi: fix pci DT node address in SyncPcie()
To make sure the XHCI controller does not get reset by Linux in DT mode,
we remove its pci parent node from the device tree. However, the pci
node address has been updated in the Raspberry Pi 4 device tree [1] and
no longer matches the one we are trying to remove in SyncPcie(). This
results in the XHCI controller actually being reset by Linux, which
leads to errors during USB initialization:

[    3.563963] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    3.569538] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[    3.577452] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000040000000890
[    3.587725] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    3.593115] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    3.600693] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    3.608106] hub 1-0:1.0: USB hub found
[    3.612026] hub 1-0:1.0: 1 port detected
[    3.616819] hub 2-0:1.0: USB hub found
[    3.620726] hub 2-0:1.0: 4 ports detected
[    3.875902] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    4.008123] usb 1-1: device descriptor read/64, error -71
[    4.256088] usb 1-1: device descriptor read/64, error -71
[    4.495882] usb 1-1: new high-speed USB device number 3 using xhci_hcd
[    4.628111] usb 1-1: device descriptor read/64, error -71
[    4.872083] usb 1-1: device descriptor read/64, error -71
[    5.407888] usb 1-1: new high-speed USB device number 4 using xhci_hcd
[    6.023964] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.
[    6.239977] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.

This patch allows matching any address for the pci node, thus working
with both legacy and new device trees.

[1] https://lore.kernel.org/all/20210831125843.1233488-1-nsaenzju@redhat.com/

Fixes: efff29cdcd ("Platform/RaspberryPi: Always use non translating DMA in DT mode")
Signed-off-by: Adrien Thierry <athierry@redhat.com>
Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
Tested-by: Jeremy Linton <jeremy.linton@arm.com>
2022-10-10 11:14:17 +02:00
Sheng Wei
3b889620a5 IntelSiliconPkg/VTd: Enable ADM when change TTM
In Abort DMA Mode(ADM), hardware will abort all DMA operations without
the need to set up a roottable. Enable Abort DMA Mode, when change
Translation Table Mode(TTM)

Signed-off-by: Sheng Wei <w.sheng@intel.com>
Reviewed-by: Jenny Huang <jenny.huang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
2022-10-10 13:18:40 +08:00