Hi,
I send v4 of PciEmulation, which base on NonDiscoverablePciDeviceDxe driver: [PATCH v3 0/5] MdeModulePkg: add support for non-discoverable devices
Because I was forced to adapt registration of the devices after yesterday's patchset from Ard, I didn't want to add another string-based PCD (with mem region size), so basically entire PciEmulation was re-written. String parsing removed and added Armada 70x0 XHCI/AHCI/SDHCI description in a static structure.
This allowed to clean init sequence and use single PCD per interface type.
Code is also available in the github: https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/opp-...
Tested on XHCI and SDHCI. New board is still on it's way, so we have to wait for AHCI verification.
I'm looking forward to your review.
Best regards, Marcin
Changelog v3 -> v4 * Remove Pcd string parsing * Add HW description structure * Rewrite driver * Adjust documentation
v2 -> v3
* Use static globals for PCD-related variables * Check with 'if' in runtime if they are correct * Return error on each kind of failure * Don't use arrays of DmaTypes/DevTypes for registering NonDiscoverableDevices * Remove redundant protocols, includes, libraries * Add reviewed-by in patches 2-6
v1 -> v2
* Move to NonDiscoverablePciDeviceDxe
Jan Dąbroś (3): Platforms/Marvell: Enable PciEmulation driver for Armada70x0 platform Platforms/Marvell: Enable USB stack for Armada70x0 platform Platforms/Marvell: Enable SATA stack for Armada70x0 platform
Marcin Wojtas (3): Platforms/Marvell: Add PciEmulation driver Platforms/Marvell: Enable two xHCI ports for Armada70x0 board Platforms/Marvell: Enable SATA port for Armada70x0 board
.../Marvell/PortingGuide/PciEmulation.txt | 31 +++ Platforms/Marvell/Armada/Armada.dsc.inc | 19 ++ Platforms/Marvell/Armada/Armada70x0.dsc | 7 + Platforms/Marvell/Armada/Armada70x0.fdf | 18 ++ Platforms/Marvell/Marvell.dec | 5 + Platforms/Marvell/PciEmulation/PciEmulation.c | 221 +++++++++++++++++++++ Platforms/Marvell/PciEmulation/PciEmulation.inf | 61 ++++++ 7 files changed, 362 insertions(+) create mode 100644 Documentation/Marvell/PortingGuide/PciEmulation.txt create mode 100644 Platforms/Marvell/PciEmulation/PciEmulation.c create mode 100644 Platforms/Marvell/PciEmulation/PciEmulation.inf
In order to use numerous UEFI drivers based on PCI bus, PciEmulation driver is implemented. It enables proper registration of platform devices as NonDiscoverableDevices and use generic EDK2 PciEmulation solution.
Used devices are enabled basing on PCD's and Armada 70x0 hardware description in a dedicated structure.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marcin Wojtas mw@semihalf.com Signed-off-by: Jan Dabros jsd@semihalf.com --- .../Marvell/PortingGuide/PciEmulation.txt | 31 +++ Platforms/Marvell/Marvell.dec | 5 + Platforms/Marvell/PciEmulation/PciEmulation.c | 221 +++++++++++++++++++++ Platforms/Marvell/PciEmulation/PciEmulation.inf | 61 ++++++ 4 files changed, 318 insertions(+) create mode 100644 Documentation/Marvell/PortingGuide/PciEmulation.txt create mode 100644 Platforms/Marvell/PciEmulation/PciEmulation.c create mode 100644 Platforms/Marvell/PciEmulation/PciEmulation.inf
diff --git a/Documentation/Marvell/PortingGuide/PciEmulation.txt b/Documentation/Marvell/PortingGuide/PciEmulation.txt new file mode 100644 index 0000000..ec1afbc --- /dev/null +++ b/Documentation/Marvell/PortingGuide/PciEmulation.txt @@ -0,0 +1,31 @@ +PciEmulation configuration +-------------------------- +Installation of various NonDiscoverable devices via PciEmulation driver is performed +via set of PCDs. Following are available: + + gMarvellTokenSpaceGuid.PcdPciEXhci + +Indicates, which Xhci devices are used. + + gMarvellTokenSpaceGuid.PcdPciEAhci + +Indicates, which Ahci devices are used. + + gMarvellTokenSpaceGuid.PcdPciESdhci + +Indicates, which Sdhci devices are used. + +All above PCD's correspond to hardware description in a dedicated structure: + +STATIC PCI_E_PLATFORM_DESC A70x0PlatDescTemplate + +in Platforms/Marvell/PciEmulation/PciEmulation.c file. It comprises device +count, base addresses, register region size and DMA-coherency type. + +Examples +-------- +Assuming we want to enable second XHCI port and one SDHCI port on Armada +70x0 board, following needs to be declared: + + gMarvellTokenSpaceGuid.PcdPciEXhci|{ 0x0 0x1 } + gMarvellTokenSpaceGuid.PcdPciESdhci|{ 0x1 } diff --git a/Platforms/Marvell/Marvell.dec b/Platforms/Marvell/Marvell.dec index db99230..f1d2def 100644 --- a/Platforms/Marvell/Marvell.dec +++ b/Platforms/Marvell/Marvell.dec @@ -209,6 +209,11 @@ gMarvellTokenSpaceGuid.PcdPp2XlgBaseAddress|0|UINT64|0x3000031 gMarvellTokenSpaceGuid.PcdPp2XlgDevSize|0|UINT32|0x3000032
+#PciEmulation + gMarvellTokenSpaceGuid.PcdPciEXhci|{ 0x0 }|VOID*|0x3000033 + gMarvellTokenSpaceGuid.PcdPciEAhci|{ 0x0 }|VOID*|0x3000034 + gMarvellTokenSpaceGuid.PcdPciESdhci|{ 0x0 }|VOID*|0x3000035 + #ResetLib gMarvellTokenSpaceGuid.PcdResetRegAddress|0|UINT64|0x40000050 gMarvellTokenSpaceGuid.PcdResetRegMask|0|UINT32|0x4000051 diff --git a/Platforms/Marvell/PciEmulation/PciEmulation.c b/Platforms/Marvell/PciEmulation/PciEmulation.c new file mode 100644 index 0000000..56e66f5 --- /dev/null +++ b/Platforms/Marvell/PciEmulation/PciEmulation.c @@ -0,0 +1,221 @@ +/******************************************************************************** +Copyright (C) 2016 Marvell International Ltd. + +Marvell BSD License Option + +If you received this File from Marvell, you may opt to use, redistribute and/or +modify this File under the following licensing terms. +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Marvell nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*******************************************************************************/ + +#include <PiDxe.h> + +#include <Library/DebugLib.h> +#include <Library/NonDiscoverableDeviceRegistrationLib.h> +#include <Library/UefiBootServicesTableLib.h> + +#include <Protocol/EmbeddedExternalDevice.h> + +typedef struct { + // XHCI + UINT8 XhciDevCount; + UINTN XhciBaseAddresses[4]; + UINTN XhciMemSize[4]; + NON_DISCOVERABLE_DEVICE_DMA_TYPE XhciDmaType[4]; + // AHCI + UINT8 AhciDevCount; + UINTN AhciBaseAddresses[4]; + UINTN AhciMemSize[4]; + NON_DISCOVERABLE_DEVICE_DMA_TYPE AhciDmaType[4]; + // SDHCI + UINT8 SdhciDevCount; + UINTN SdhciBaseAddresses[4]; + UINTN SdhciMemSize[4]; + NON_DISCOVERABLE_DEVICE_DMA_TYPE SdhciDmaType[4]; +} PCI_E_PLATFORM_DESC; + +STATIC PCI_E_PLATFORM_DESC A70x0PlatDescTemplate = { + 2, // XHCI + { 0xF2500000, 0xF2510000 }, + { SIZE_16KB, SIZE_16KB }, + { NonDiscoverableDeviceDmaTypeCoherent, NonDiscoverableDeviceDmaTypeCoherent }, + 1, // AHCI + { 0xF2540000 }, + { SIZE_8KB }, + { NonDiscoverableDeviceDmaTypeCoherent }, + 1, // SDHCI + { 0xF06E0000 }, + { SIZE_1KB }, + { NonDiscoverableDeviceDmaTypeCoherent } +}; + +STATIC UINT8 * CONST XhciDeviceTable = FixedPcdGetPtr (PcdPciEXhci); +STATIC UINT8 * CONST AhciDeviceTable = FixedPcdGetPtr (PcdPciEAhci); +STATIC UINT8 * CONST SdhciDeviceTable = FixedPcdGetPtr (PcdPciESdhci); + +STATIC +EFI_STATUS +PciEmulationInitXhci ( + ) +{ + PCI_E_PLATFORM_DESC *Desc = &A70x0PlatDescTemplate; + EFI_STATUS Status; + UINT8 i; + + if (PcdGetSize (PcdPciEXhci) < Desc->XhciDevCount) { + DEBUG((DEBUG_ERROR, "PciEmulation: Wrong PcdPciEXhci format\n")); + return EFI_INVALID_PARAMETER; + } + + for (i = 0; i < Desc->XhciDevCount; i++) { + if (XhciDeviceTable[i] == 0) { + continue; + } + + Status = RegisterNonDiscoverableMmioDevice ( + NonDiscoverableDeviceTypeXhci, + Desc->XhciDmaType[i], + NULL, + NULL, + 1, + Desc->XhciBaseAddresses[i], Desc->XhciMemSize[i] + ); + + if (EFI_ERROR(Status)) { + DEBUG((DEBUG_ERROR, "PciEmulation: Cannot install Xhci device with ID=%d\n", i)); + return Status; + } + } + + return EFI_SUCCESS; +} + +STATIC +EFI_STATUS +PciEmulationInitAhci ( + ) +{ + PCI_E_PLATFORM_DESC *Desc = &A70x0PlatDescTemplate; + EFI_STATUS Status; + UINT8 i; + + if (PcdGetSize (PcdPciEAhci) < Desc->AhciDevCount) { + DEBUG((DEBUG_ERROR, "PciEmulation: Wrong PcdPciEAhci format\n")); + return EFI_INVALID_PARAMETER; + } + + for (i = 0; i < Desc->AhciDevCount; i++) { + if (AhciDeviceTable[i] == 0) { + continue; + } + + Status = RegisterNonDiscoverableMmioDevice ( + NonDiscoverableDeviceTypeAhci, + Desc->AhciDmaType[i], + NULL, + NULL, + 1, + Desc->AhciBaseAddresses[i], Desc->AhciMemSize[i] + ); + + if (EFI_ERROR(Status)) { + DEBUG((DEBUG_ERROR, "PciEmulation: Cannot install Ahci device with ID=%d\n", i)); + return Status; + } + } + + return EFI_SUCCESS; +} + +STATIC +EFI_STATUS +PciEmulationInitSdhci ( + ) +{ + PCI_E_PLATFORM_DESC *Desc = &A70x0PlatDescTemplate; + EFI_STATUS Status; + UINT8 i; + + if (PcdGetSize (PcdPciESdhci) < Desc->SdhciDevCount) { + DEBUG((DEBUG_ERROR, "PciEmulation: Wrong PcdPciESdhci format\n")); + return EFI_INVALID_PARAMETER; + } + + for (i = 0; i < Desc->SdhciDevCount; i++) { + if (SdhciDeviceTable[i] == 0) { + continue; + } + + Status = RegisterNonDiscoverableMmioDevice ( + NonDiscoverableDeviceTypeSdhci, + Desc->SdhciDmaType[i], + NULL, + NULL, + 1, + Desc->SdhciBaseAddresses[i], Desc->SdhciMemSize[i] + ); + + if (EFI_ERROR(Status)) { + DEBUG((DEBUG_ERROR, "PciEmulation: Cannot install Sdhci device with ID=%d\n", i)); + return Status; + } + } + + return EFI_SUCCESS; +} + +// +// Below function is used to parse devices information from PCD strings. +// Once obtained, the resources are used for registration of +// NonDiscoverable devices. +// +EFI_STATUS +EFIAPI +PciEmulationEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + + Status = PciEmulationInitXhci(); + if (EFI_ERROR(Status)) { + return Status; + } + + Status = PciEmulationInitAhci(); + if (EFI_ERROR(Status)) { + return Status; + } + + Status = PciEmulationInitSdhci(); + if (EFI_ERROR(Status)) { + return Status; + } + + return EFI_SUCCESS; +} diff --git a/Platforms/Marvell/PciEmulation/PciEmulation.inf b/Platforms/Marvell/PciEmulation/PciEmulation.inf new file mode 100644 index 0000000..5d569b9 --- /dev/null +++ b/Platforms/Marvell/PciEmulation/PciEmulation.inf @@ -0,0 +1,61 @@ +# Copyright (C) 2016 Marvell International Ltd. +# +# Marvell BSD License Option +# +# If you received this File from Marvell, you may opt to use, redistribute and/or +# modify this File under the following licensing terms. +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of Marvell nor the names of its contributors may be +# used to endorse or promote products derived from this software without +# specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +[Defines] + INF_VERSION = 0x00010019 + BASE_NAME = PciEmulation + FILE_GUID = 3dfa08da-923b-4841-9435-c77a604d7493 + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + + ENTRY_POINT = PciEmulationEntryPoint + +[Sources.common] + PciEmulation.c + +[Packages] + EmbeddedPkg/EmbeddedPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + OpenPlatformPkg/Platforms/Marvell/Marvell.dec + +[LibraryClasses] + NonDiscoverableDeviceRegistrationLib + UefiDriverEntryPoint + +[Pcd] + gMarvellTokenSpaceGuid.PcdPciEXhci + gMarvellTokenSpaceGuid.PcdPciEAhci + gMarvellTokenSpaceGuid.PcdPciESdhci + +[Depex] + TRUE
On Thu, Nov 17, 2016 at 05:33:04AM +0100, Marcin Wojtas wrote:
In order to use numerous UEFI drivers based on PCI bus, PciEmulation driver is implemented. It enables proper registration of platform devices as NonDiscoverableDevices and use generic EDK2 PciEmulation solution.
Used devices are enabled basing on PCD's and Armada 70x0 hardware description in a dedicated structure.
Happy with the functionality, a couple of cosmetic suggestions inline below.
Regards,
Leif
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marcin Wojtas mw@semihalf.com Signed-off-by: Jan Dabros jsd@semihalf.com
.../Marvell/PortingGuide/PciEmulation.txt | 31 +++ Platforms/Marvell/Marvell.dec | 5 + Platforms/Marvell/PciEmulation/PciEmulation.c | 221 +++++++++++++++++++++ Platforms/Marvell/PciEmulation/PciEmulation.inf | 61 ++++++ 4 files changed, 318 insertions(+) create mode 100644 Documentation/Marvell/PortingGuide/PciEmulation.txt create mode 100644 Platforms/Marvell/PciEmulation/PciEmulation.c create mode 100644 Platforms/Marvell/PciEmulation/PciEmulation.inf
diff --git a/Documentation/Marvell/PortingGuide/PciEmulation.txt b/Documentation/Marvell/PortingGuide/PciEmulation.txt new file mode 100644 index 0000000..ec1afbc --- /dev/null +++ b/Documentation/Marvell/PortingGuide/PciEmulation.txt @@ -0,0 +1,31 @@ +PciEmulation configuration +-------------------------- +Installation of various NonDiscoverable devices via PciEmulation driver is performed +via set of PCDs. Following are available:
- gMarvellTokenSpaceGuid.PcdPciEXhci
+Indicates, which Xhci devices are used.
- gMarvellTokenSpaceGuid.PcdPciEAhci
+Indicates, which Ahci devices are used.
- gMarvellTokenSpaceGuid.PcdPciESdhci
+Indicates, which Sdhci devices are used.
+All above PCD's correspond to hardware description in a dedicated structure:
+STATIC PCI_E_PLATFORM_DESC A70x0PlatDescTemplate
+in Platforms/Marvell/PciEmulation/PciEmulation.c file. It comprises device +count, base addresses, register region size and DMA-coherency type.
+Examples +-------- +Assuming we want to enable second XHCI port and one SDHCI port on Armada +70x0 board, following needs to be declared:
- gMarvellTokenSpaceGuid.PcdPciEXhci|{ 0x0 0x1 }
- gMarvellTokenSpaceGuid.PcdPciESdhci|{ 0x1 }
diff --git a/Platforms/Marvell/Marvell.dec b/Platforms/Marvell/Marvell.dec index db99230..f1d2def 100644 --- a/Platforms/Marvell/Marvell.dec +++ b/Platforms/Marvell/Marvell.dec @@ -209,6 +209,11 @@ gMarvellTokenSpaceGuid.PcdPp2XlgBaseAddress|0|UINT64|0x3000031 gMarvellTokenSpaceGuid.PcdPp2XlgDevSize|0|UINT32|0x3000032 +#PciEmulation
- gMarvellTokenSpaceGuid.PcdPciEXhci|{ 0x0 }|VOID*|0x3000033
- gMarvellTokenSpaceGuid.PcdPciEAhci|{ 0x0 }|VOID*|0x3000034
- gMarvellTokenSpaceGuid.PcdPciESdhci|{ 0x0 }|VOID*|0x3000035
#ResetLib gMarvellTokenSpaceGuid.PcdResetRegAddress|0|UINT64|0x40000050 gMarvellTokenSpaceGuid.PcdResetRegMask|0|UINT32|0x4000051 diff --git a/Platforms/Marvell/PciEmulation/PciEmulation.c b/Platforms/Marvell/PciEmulation/PciEmulation.c new file mode 100644 index 0000000..56e66f5 --- /dev/null +++ b/Platforms/Marvell/PciEmulation/PciEmulation.c @@ -0,0 +1,221 @@ +/******************************************************************************** +Copyright (C) 2016 Marvell International Ltd.
+Marvell BSD License Option
+If you received this File from Marvell, you may opt to use, redistribute and/or +modify this File under the following licensing terms. +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- Neither the name of Marvell nor the names of its contributors may be
- used to endorse or promote products derived from this software without
- specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*******************************************************************************/
+#include <PiDxe.h>
+#include <Library/DebugLib.h> +#include <Library/NonDiscoverableDeviceRegistrationLib.h> +#include <Library/UefiBootServicesTableLib.h>
+#include <Protocol/EmbeddedExternalDevice.h>
+typedef struct {
- // XHCI
- UINT8 XhciDevCount;
- UINTN XhciBaseAddresses[4];
- UINTN XhciMemSize[4];
- NON_DISCOVERABLE_DEVICE_DMA_TYPE XhciDmaType[4];
- // AHCI
- UINT8 AhciDevCount;
- UINTN AhciBaseAddresses[4];
- UINTN AhciMemSize[4];
- NON_DISCOVERABLE_DEVICE_DMA_TYPE AhciDmaType[4];
- // SDHCI
- UINT8 SdhciDevCount;
- UINTN SdhciBaseAddresses[4];
- UINTN SdhciMemSize[4];
- NON_DISCOVERABLE_DEVICE_DMA_TYPE SdhciDmaType[4];
+} PCI_E_PLATFORM_DESC;
(Most EDK2 sources use PCIE rather than PCI_E.)
+STATIC PCI_E_PLATFORM_DESC A70x0PlatDescTemplate = {
I think that should have an m-prefix?
- 2, // XHCI
- { 0xF2500000, 0xF2510000 },
- { SIZE_16KB, SIZE_16KB },
- { NonDiscoverableDeviceDmaTypeCoherent, NonDiscoverableDeviceDmaTypeCoherent },
- 1, // AHCI
- { 0xF2540000 },
- { SIZE_8KB },
- { NonDiscoverableDeviceDmaTypeCoherent },
- 1, // SDHCI
- { 0xF06E0000 },
- { SIZE_1KB },
- { NonDiscoverableDeviceDmaTypeCoherent }
+};
+STATIC UINT8 * CONST XhciDeviceTable = FixedPcdGetPtr (PcdPciEXhci); +STATIC UINT8 * CONST AhciDeviceTable = FixedPcdGetPtr (PcdPciEAhci); +STATIC UINT8 * CONST SdhciDeviceTable = FixedPcdGetPtr (PcdPciESdhci);
How about #define DEV_ENABLED(type, index) (type ## DeviceTable[index]) ...
+STATIC +EFI_STATUS +PciEmulationInitXhci (
- )
+{
- PCI_E_PLATFORM_DESC *Desc = &A70x0PlatDescTemplate;
- EFI_STATUS Status;
- UINT8 i;
- if (PcdGetSize (PcdPciEXhci) < Desc->XhciDevCount) {
- DEBUG((DEBUG_ERROR, "PciEmulation: Wrong PcdPciEXhci format\n"));
- return EFI_INVALID_PARAMETER;
- }
- for (i = 0; i < Desc->XhciDevCount; i++) {
- if (XhciDeviceTable[i] == 0) {
... if (DEV_ENABLED (Xhci, i)) { ?
And so on?
continue;
- }
- Status = RegisterNonDiscoverableMmioDevice (
NonDiscoverableDeviceTypeXhci,
Desc->XhciDmaType[i],
NULL,
NULL,
1,
Desc->XhciBaseAddresses[i], Desc->XhciMemSize[i]
);
- if (EFI_ERROR(Status)) {
DEBUG((DEBUG_ERROR, "PciEmulation: Cannot install Xhci device with ID=%d\n", i));
It's not really an ID. How about just "Cannot install Xhci device %d\n"? And same below.
return Status;
- }
- }
- return EFI_SUCCESS;
+}
+STATIC +EFI_STATUS +PciEmulationInitAhci (
- )
+{
- PCI_E_PLATFORM_DESC *Desc = &A70x0PlatDescTemplate;
- EFI_STATUS Status;
- UINT8 i;
- if (PcdGetSize (PcdPciEAhci) < Desc->AhciDevCount) {
- DEBUG((DEBUG_ERROR, "PciEmulation: Wrong PcdPciEAhci format\n"));
- return EFI_INVALID_PARAMETER;
- }
- for (i = 0; i < Desc->AhciDevCount; i++) {
- if (AhciDeviceTable[i] == 0) {
continue;
- }
- Status = RegisterNonDiscoverableMmioDevice (
NonDiscoverableDeviceTypeAhci,
Desc->AhciDmaType[i],
NULL,
NULL,
1,
Desc->AhciBaseAddresses[i], Desc->AhciMemSize[i]
);
- if (EFI_ERROR(Status)) {
DEBUG((DEBUG_ERROR, "PciEmulation: Cannot install Ahci device with ID=%d\n", i));
return Status;
- }
- }
- return EFI_SUCCESS;
+}
+STATIC +EFI_STATUS +PciEmulationInitSdhci (
- )
+{
- PCI_E_PLATFORM_DESC *Desc = &A70x0PlatDescTemplate;
- EFI_STATUS Status;
- UINT8 i;
- if (PcdGetSize (PcdPciESdhci) < Desc->SdhciDevCount) {
- DEBUG((DEBUG_ERROR, "PciEmulation: Wrong PcdPciESdhci format\n"));
- return EFI_INVALID_PARAMETER;
- }
- for (i = 0; i < Desc->SdhciDevCount; i++) {
- if (SdhciDeviceTable[i] == 0) {
continue;
- }
- Status = RegisterNonDiscoverableMmioDevice (
NonDiscoverableDeviceTypeSdhci,
Desc->SdhciDmaType[i],
NULL,
NULL,
1,
Desc->SdhciBaseAddresses[i], Desc->SdhciMemSize[i]
);
- if (EFI_ERROR(Status)) {
DEBUG((DEBUG_ERROR, "PciEmulation: Cannot install Sdhci device with ID=%d\n", i));
return Status;
- }
- }
- return EFI_SUCCESS;
+}
+// +// Below function is used to parse devices information from PCD strings. +// Once obtained, the resources are used for registration of +// NonDiscoverable devices. +// +EFI_STATUS +EFIAPI +PciEmulationEntryPoint (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
+{
- EFI_STATUS Status;
- Status = PciEmulationInitXhci();
- if (EFI_ERROR(Status)) {
- return Status;
- }
- Status = PciEmulationInitAhci();
- if (EFI_ERROR(Status)) {
- return Status;
- }
- Status = PciEmulationInitSdhci();
- if (EFI_ERROR(Status)) {
- return Status;
- }
- return EFI_SUCCESS;
+} diff --git a/Platforms/Marvell/PciEmulation/PciEmulation.inf b/Platforms/Marvell/PciEmulation/PciEmulation.inf new file mode 100644 index 0000000..5d569b9 --- /dev/null +++ b/Platforms/Marvell/PciEmulation/PciEmulation.inf @@ -0,0 +1,61 @@ +# Copyright (C) 2016 Marvell International Ltd. +# +# Marvell BSD License Option +# +# If you received this File from Marvell, you may opt to use, redistribute and/or +# modify this File under the following licensing terms. +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of Marvell nor the names of its contributors may be +# used to endorse or promote products derived from this software without +# specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#
+[Defines]
- INF_VERSION = 0x00010019
- BASE_NAME = PciEmulation
- FILE_GUID = 3dfa08da-923b-4841-9435-c77a604d7493
- MODULE_TYPE = DXE_DRIVER
- VERSION_STRING = 1.0
- ENTRY_POINT = PciEmulationEntryPoint
+[Sources.common]
- PciEmulation.c
+[Packages]
- EmbeddedPkg/EmbeddedPkg.dec
- MdeModulePkg/MdeModulePkg.dec
- MdePkg/MdePkg.dec
- OpenPlatformPkg/Platforms/Marvell/Marvell.dec
+[LibraryClasses]
- NonDiscoverableDeviceRegistrationLib
- UefiDriverEntryPoint
+[Pcd]
- gMarvellTokenSpaceGuid.PcdPciEXhci
- gMarvellTokenSpaceGuid.PcdPciEAhci
- gMarvellTokenSpaceGuid.PcdPciESdhci
+[Depex]
- TRUE
-- 1.8.3.1
From: Jan Dąbroś jsd@semihalf.com
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jan Dabros jsd@semihalf.com Signed-off-by: Marcin Wojtas mw@semihalf.com Reviewed-by: Ard Biesheuvel ard.biesheuvel@linaro.org Reviewed-by: Leif Lindholm leif.lindholm@linaro.org --- Platforms/Marvell/Armada/Armada.dsc.inc | 4 ++++ Platforms/Marvell/Armada/Armada70x0.fdf | 4 ++++ 2 files changed, 8 insertions(+)
diff --git a/Platforms/Marvell/Armada/Armada.dsc.inc b/Platforms/Marvell/Armada/Armada.dsc.inc index 76c5d6d..3ebee0d 100644 --- a/Platforms/Marvell/Armada/Armada.dsc.inc +++ b/Platforms/Marvell/Armada/Armada.dsc.inc @@ -170,6 +170,7 @@ SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf + NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf
[LibraryClasses.common.UEFI_APPLICATION] UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf @@ -417,6 +418,9 @@ EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
+ OpenPlatformPkg/Platforms/Marvell/PciEmulation/PciEmulation.inf + MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf + # Console packages MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf diff --git a/Platforms/Marvell/Armada/Armada70x0.fdf b/Platforms/Marvell/Armada/Armada70x0.fdf index 64c3440..2403b71 100644 --- a/Platforms/Marvell/Armada/Armada70x0.fdf +++ b/Platforms/Marvell/Armada/Armada70x0.fdf @@ -123,6 +123,10 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c INF OpenPlatformPkg/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.inf INF OpenPlatformPkg/Drivers/Net/Pp2Dxe/Pp2Dxe.inf
+ # PciEmulation + INF OpenPlatformPkg/Platforms/Marvell/PciEmulation/PciEmulation.inf + INF MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf + # Multiple Console IO support INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
From: Jan Dąbroś jsd@semihalf.com
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jan Dabros jsd@semihalf.com Signed-off-by: Marcin Wojtas mw@semihalf.com Reviewed-by: Ard Biesheuvel ard.biesheuvel@linaro.org Reviewed-by: Leif Lindholm leif.lindholm@linaro.org --- Platforms/Marvell/Armada/Armada.dsc.inc | 5 +++++ Platforms/Marvell/Armada/Armada70x0.fdf | 5 +++++ 2 files changed, 10 insertions(+)
diff --git a/Platforms/Marvell/Armada/Armada.dsc.inc b/Platforms/Marvell/Armada/Armada.dsc.inc index 3ebee0d..470cf81 100644 --- a/Platforms/Marvell/Armada/Armada.dsc.inc +++ b/Platforms/Marvell/Armada/Armada.dsc.inc @@ -421,6 +421,11 @@ OpenPlatformPkg/Platforms/Marvell/PciEmulation/PciEmulation.inf MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
+ # USB + MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf + MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf + MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf + # Console packages MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf diff --git a/Platforms/Marvell/Armada/Armada70x0.fdf b/Platforms/Marvell/Armada/Armada70x0.fdf index 2403b71..2c4f833 100644 --- a/Platforms/Marvell/Armada/Armada70x0.fdf +++ b/Platforms/Marvell/Armada/Armada70x0.fdf @@ -127,6 +127,11 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c INF OpenPlatformPkg/Platforms/Marvell/PciEmulation/PciEmulation.inf INF MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
+ # USB + INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf + INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf + INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf + # Multiple Console IO support INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
On Thu, Nov 17, 2016 at 05:33:06AM +0100, Marcin Wojtas wrote:
From: Jan Dąbroś jsd@semihalf.com
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jan Dabros jsd@semihalf.com Signed-off-by: Marcin Wojtas mw@semihalf.com Reviewed-by: Ard Biesheuvel ard.biesheuvel@linaro.org Reviewed-by: Leif Lindholm leif.lindholm@linaro.org
Platforms/Marvell/Armada/Armada.dsc.inc | 5 +++++ Platforms/Marvell/Armada/Armada70x0.fdf | 5 +++++ 2 files changed, 10 insertions(+)
diff --git a/Platforms/Marvell/Armada/Armada.dsc.inc b/Platforms/Marvell/Armada/Armada.dsc.inc index 3ebee0d..470cf81 100644 --- a/Platforms/Marvell/Armada/Armada.dsc.inc +++ b/Platforms/Marvell/Armada/Armada.dsc.inc @@ -421,6 +421,11 @@ OpenPlatformPkg/Platforms/Marvell/PciEmulation/PciEmulation.inf MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
- # USB
- MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
OK, so I do have one further comment here, although not actually for this patch.
If you want so support plug-in cards for the PCIE slot, you may also want to add Ehci/Uhci. But that should really be separate from this one.
Regards,
Leif
- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
- MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
- # Console packages MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
diff --git a/Platforms/Marvell/Armada/Armada70x0.fdf b/Platforms/Marvell/Armada/Armada70x0.fdf index 2403b71..2c4f833 100644 --- a/Platforms/Marvell/Armada/Armada70x0.fdf +++ b/Platforms/Marvell/Armada/Armada70x0.fdf @@ -127,6 +127,11 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c INF OpenPlatformPkg/Platforms/Marvell/PciEmulation/PciEmulation.inf INF MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
- # USB
- INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
- INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
- INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
- # Multiple Console IO support INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
-- 1.8.3.1
Hi Leif
2016-11-17 19:59 GMT+01:00 Leif Lindholm leif.lindholm@linaro.org:
On Thu, Nov 17, 2016 at 05:33:06AM +0100, Marcin Wojtas wrote:
From: Jan Dąbroś jsd@semihalf.com
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jan Dabros jsd@semihalf.com Signed-off-by: Marcin Wojtas mw@semihalf.com Reviewed-by: Ard Biesheuvel ard.biesheuvel@linaro.org Reviewed-by: Leif Lindholm leif.lindholm@linaro.org
Platforms/Marvell/Armada/Armada.dsc.inc | 5 +++++ Platforms/Marvell/Armada/Armada70x0.fdf | 5 +++++ 2 files changed, 10 insertions(+)
diff --git a/Platforms/Marvell/Armada/Armada.dsc.inc b/Platforms/Marvell/Armada/Armada.dsc.inc index 3ebee0d..470cf81 100644 --- a/Platforms/Marvell/Armada/Armada.dsc.inc +++ b/Platforms/Marvell/Armada/Armada.dsc.inc @@ -421,6 +421,11 @@ OpenPlatformPkg/Platforms/Marvell/PciEmulation/PciEmulation.inf MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
- # USB
- MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
OK, so I do have one further comment here, although not actually for this patch.
If you want so support plug-in cards for the PCIE slot, you may also want to add Ehci/Uhci. But that should really be separate from this one.
Not sure if there is a plan to add PCIe driver for this platform soon.
Best regards, Marcin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marcin Wojtas mw@semihalf.com --- Platforms/Marvell/Armada/Armada70x0.dsc | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/Platforms/Marvell/Armada/Armada70x0.dsc b/Platforms/Marvell/Armada/Armada70x0.dsc index 2f2b278..b1db8d2 100644 --- a/Platforms/Marvell/Armada/Armada70x0.dsc +++ b/Platforms/Marvell/Armada/Armada70x0.dsc @@ -139,6 +139,9 @@ gMarvellTokenSpaceGuid.PcdPp2XlgBaseAddress|0xf2130f00 gMarvellTokenSpaceGuid.PcdPp2XlgDevSize|0x1000
+ #PciEmulation + gMarvellTokenSpaceGuid.PcdPciEXhci|{ 0x1 0x1 } + #ResetLib gMarvellTokenSpaceGuid.PcdResetRegAddress|0xf06f0084 gMarvellTokenSpaceGuid.PcdResetRegMask|0x1
On Thu, Nov 17, 2016 at 05:33:07AM +0100, Marcin Wojtas wrote:
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marcin Wojtas mw@semihalf.com
Platforms/Marvell/Armada/Armada70x0.dsc | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/Platforms/Marvell/Armada/Armada70x0.dsc b/Platforms/Marvell/Armada/Armada70x0.dsc index 2f2b278..b1db8d2 100644 --- a/Platforms/Marvell/Armada/Armada70x0.dsc +++ b/Platforms/Marvell/Armada/Armada70x0.dsc @@ -139,6 +139,9 @@ gMarvellTokenSpaceGuid.PcdPp2XlgBaseAddress|0xf2130f00 gMarvellTokenSpaceGuid.PcdPp2XlgDevSize|0x1000
- #PciEmulation
- gMarvellTokenSpaceGuid.PcdPciEXhci|{ 0x1 0x1 }
Shouldn't there be a comma between those?
- #ResetLib gMarvellTokenSpaceGuid.PcdResetRegAddress|0xf06f0084 gMarvellTokenSpaceGuid.PcdResetRegMask|0x1
-- 1.8.3.1
2016-11-17 19:56 GMT+01:00 Leif Lindholm leif.lindholm@linaro.org:
On Thu, Nov 17, 2016 at 05:33:07AM +0100, Marcin Wojtas wrote:
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marcin Wojtas mw@semihalf.com
Platforms/Marvell/Armada/Armada70x0.dsc | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/Platforms/Marvell/Armada/Armada70x0.dsc b/Platforms/Marvell/Armada/Armada70x0.dsc index 2f2b278..b1db8d2 100644 --- a/Platforms/Marvell/Armada/Armada70x0.dsc +++ b/Platforms/Marvell/Armada/Armada70x0.dsc @@ -139,6 +139,9 @@ gMarvellTokenSpaceGuid.PcdPp2XlgBaseAddress|0xf2130f00 gMarvellTokenSpaceGuid.PcdPp2XlgDevSize|0x1000
- #PciEmulation
- gMarvellTokenSpaceGuid.PcdPciEXhci|{ 0x1 0x1 }
Shouldn't there be a comma between those?
Indeed, good catch - I let know on the IRC, that my local change got accidentally squashed, it's obviously a mistake.
From: Jan Dąbroś jsd@semihalf.com
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jan Dabros jsd@semihalf.com Signed-off-by: Marcin Wojtas mw@semihalf.com Reviewed-by: Ard Biesheuvel ard.biesheuvel@linaro.org Reviewed-by: Leif Lindholm leif.lindholm@linaro.org --- Platforms/Marvell/Armada/Armada.dsc.inc | 10 ++++++++++ Platforms/Marvell/Armada/Armada70x0.fdf | 9 +++++++++ 2 files changed, 19 insertions(+)
diff --git a/Platforms/Marvell/Armada/Armada.dsc.inc b/Platforms/Marvell/Armada/Armada.dsc.inc index 470cf81..0b1c50d 100644 --- a/Platforms/Marvell/Armada/Armada.dsc.inc +++ b/Platforms/Marvell/Armada/Armada.dsc.inc @@ -82,6 +82,7 @@ ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf + UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
# Serial port libraries SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf @@ -421,6 +422,15 @@ OpenPlatformPkg/Platforms/Marvell/PciEmulation/PciEmulation.inf MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
+ # SCSI + MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf + MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf + + # SATA + MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf + MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf + OvmfPkg/SataControllerDxe/SataControllerDxe.inf + # USB MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf diff --git a/Platforms/Marvell/Armada/Armada70x0.fdf b/Platforms/Marvell/Armada/Armada70x0.fdf index 2c4f833..b420153 100644 --- a/Platforms/Marvell/Armada/Armada70x0.fdf +++ b/Platforms/Marvell/Armada/Armada70x0.fdf @@ -127,6 +127,15 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c INF OpenPlatformPkg/Platforms/Marvell/PciEmulation/PciEmulation.inf INF MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
+ # SCSI + INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf + INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf + + # SATA + INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf + INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf + INF OvmfPkg/SataControllerDxe/SataControllerDxe.inf + # USB INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marcin Wojtas mw@semihalf.com --- Platforms/Marvell/Armada/Armada70x0.dsc | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/Platforms/Marvell/Armada/Armada70x0.dsc b/Platforms/Marvell/Armada/Armada70x0.dsc index b1db8d2..5808bce 100644 --- a/Platforms/Marvell/Armada/Armada70x0.dsc +++ b/Platforms/Marvell/Armada/Armada70x0.dsc @@ -141,7 +141,11 @@
#PciEmulation gMarvellTokenSpaceGuid.PcdPciEXhci|{ 0x1 0x1 } + gMarvellTokenSpaceGuid.PcdPciEAhci|{ 0x1 }
#ResetLib gMarvellTokenSpaceGuid.PcdResetRegAddress|0xf06f0084 gMarvellTokenSpaceGuid.PcdResetRegMask|0x1 + + #SATA + gMarvellTokenSpaceGuid.PcdSataBaseAddress|0xF2540000