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
--
1.8.3.1
Hi,
On top of latest NonDiscoverable PciEmulation support I submit the
last significant part of the platform support, which is SD/MMC driver.
It is based on SDHCI, but requires a lot of quirks, not supported
in EDK2. This is why SdMmcPciHcDxe driver had to be imported and modified.
Details can be found in commit logs and comments inside code.
Due to some reasons operation with DMA enabled didn't succeed, hence the
PassThru had to be reworked in order to support PIO mode.
Code is also available in the github:
https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/opp…
We are looking forward to any comments or remarks.
Best regards,
Marcin
Jan Dąbroś (3):
Drivers/SdMmc: Import SdMmcPciHcDxe driver
Drivers/SdMmc: Adjust SdMmcPciHcDxe to fulfill Xenon controller
demands
Platforms/Marvell: Enable SD/MMC stack for Armada70x0 platforms
Marcin Wojtas (1):
Platforms/Marvell: Enable SD/MMC for Armada70x0 board
Drivers/SdMmc/MvSdMmcPciHcDxe.c | 1780 +++++++++++++++++++++++++++++++
Drivers/SdMmc/MvSdMmcPciHcDxe.inf | 75 ++
Drivers/SdMmc/XenonSdhci.c | 661 ++++++++++++
Drivers/SdMmc/XenonSdhci.h | 278 +++++
Platforms/Marvell/Armada/Armada.dsc.inc | 5 +
Platforms/Marvell/Armada/Armada70x0.dsc | 1 +
Platforms/Marvell/Armada/Armada70x0.fdf | 7 +-
7 files changed, 2806 insertions(+), 1 deletion(-)
create mode 100755 Drivers/SdMmc/MvSdMmcPciHcDxe.c
create mode 100644 Drivers/SdMmc/MvSdMmcPciHcDxe.inf
create mode 100755 Drivers/SdMmc/XenonSdhci.c
create mode 100644 Drivers/SdMmc/XenonSdhci.h
--
1.8.3.1
From: Evan Lloyd <evan.lloyd(a)arm.com>
The aim of this patch set is to fix the GTDT description of the WatchDog
interrupt mode.
An extra patch is included that merely tidies the code format before the
real fix is applied.
The resultant code is available for examination at:
https://github.com/EvanLloyd/OpenPlatformPkg/tree/645_gtdt_v1
Evan Lloyd (1):
Platforms/Arm/Juno: Tidy GTDT code before change.
Girish Pathak (1):
Platforms/ARM/Juno: Fix Watchdog Timer interrupt mode
Platforms/ARM/Juno/AcpiTables/Gtdt.aslc | 116 ++++++++++----------
1 file changed, 61 insertions(+), 55 deletions(-)
--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
The SiI isn't an AHCI compatible adapter so it implements the EFI ATA
pass-through protocol directly. This works for fixed hard drives, but
not ATAPI attached devices (CDROM, DVDROM, TAPE, etc).
This patch adds read only ATAPI support via the EFI SCSI pass-through
protocol, allowing boot from attached CD/DVD. This patch also cleans
up, and tweaks recovery paths/etc in the original driver. When
combined with the ARM/PCI dma lib changes this allows us to relax the
IO alignment requirement that caused grub failures.
Finally, the OpenPlatformPkg/Juno must be updated, with another patch
to avoid build breaks now that the SiI has a dependency on the SCSI
libraries.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeremy Linton <jeremy.linton(a)arm.com>
Jeremy Linton (7):
MdePkg IndustryStandard/Scsi.h: Add sense code macro
EmbeddedPkg: SiI3132: Add ScsiProtocol callbacks
EmbeddedPkg: SiI3132: Add SCSI protocol support to header
EmbeddedPkg: SiI3132: Break out FIS command submission
EmbeddedPkg: SiI3132: Cleanup device node creation
EmbeddedPkg: SiI3132: Enable SCSI pass-through protocol
EmbeddedPkg: SiI3132: Correct the IoAlign
EmbeddedPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c | 48 ++-
EmbeddedPkg/Drivers/SataSiI3132Dxe/SataSiI3132.h | 89 ++++-
.../Drivers/SataSiI3132Dxe/SataSiI3132Dxe.inf | 2 +
.../Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c | 270 ++++++++------
.../Drivers/SataSiI3132Dxe/SiI3132ScsiPassThru.c | 401 +++++++++++++++++++++
MdePkg/Include/IndustryStandard/Scsi.h | 2 +
OpenPlatformPkg | 2 +-
7 files changed, 688 insertions(+), 126 deletions(-)
create mode 100644 EmbeddedPkg/Drivers/SataSiI3132Dxe/SiI3132ScsiPassThru.c
--
2.5.5
Hi,
I send v3 of PciEmulation, which base on NonDiscoverablePciDeviceDxe driver:
[PATCH v2 0/5] MdeModulePkg: add support for non-discoverable devices
Code is also available in the github:
https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/opp…
According to review comments, PCD usage is improved, as well as redundant
includes or packages were removed.
We still do not have boards with new SATA IP, but if this version of
PciEmulation is accepted, let's keep it in hand until
NonDiscoverablePciDeviceDxe gets merged or sort out some solution in the
end of November.
I'm looking forward to your review.
Best regards,
Marcin
Changelog
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ś (4):
Platforms/Marvell: Enable PciEmulation driver for Armada70x0 platform
Platforms/Marvell: Enable USB stack for Armada70x0 platform
Platforms/Marvell: Enable two xHCI ports for Armada70x0 board
Platforms/Marvell: Enable SATA stack for Armada70x0 platform
Marcin Wojtas (2):
Platforms/Marvell: Add PciEmulation driver
Platforms/Marvell: Enable SATA port for Armada70x0 board
.../Marvell/PortingGuide/PciEmulation.txt | 46 ++++++++
Platforms/Marvell/Armada/Armada.dsc.inc | 19 ++++
Platforms/Marvell/Armada/Armada70x0.dsc | 10 ++
Platforms/Marvell/Armada/Armada70x0.fdf | 18 ++++
Platforms/Marvell/Marvell.dec | 6 ++
Platforms/Marvell/PciEmulation/PciEmulation.c | 119 +++++++++++++++++++++
Platforms/Marvell/PciEmulation/PciEmulation.inf | 46 ++++++++
7 files changed, 264 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
--
1.8.3.1
Hi folks,
We are still using PrePi on some of our platforms and the code is still
running on Flash at this stage. We found there is global data write in
ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S. The change was
introduced by this commit: 5dbacdb21b59748e885c2eccae370b81271ab795:
+*mSystemMemoryEnd: .8byte 0*^M
ASM_PFX(_ModuleEntryPoint):
// Do early platform specific actions
@@ -40,12 +42,23 @@ _SetSVCMode:
// Check if we can install the stack at the top of the System Memory
or if we need
// to install the stacks at the bottom of the Firmware Device (case
the FD is located
// at the top of the DRAM)
-_SetupStackPosition:
- // Compute Top of System Memory
- LoadConstantToReg (FixedPcdGet64 (PcdSystemMemoryBase), x1)
- LoadConstantToReg (FixedPcdGet64 (PcdSystemMemorySize), x2)
+_SystemMemoryEndInit:^M
+ ldr x1, mSystemMemoryEnd^M
+^M
+ // Is mSystemMemoryEnd initialized?^M
+ cmp x1, #0^M
+ bne _SetupStackPosition^M
+^M
+ LoadConstantToReg (FixedPcdGet32(PcdSystemMemoryBase), x1)^M
+ LoadConstantToReg (FixedPcdGet32(PcdSystemMemorySize), x2)^M
sub x2, x2, #1
- add x1, x1, x2 // x1 = SystemMemoryTop = PcdSystemMemoryBase +
PcdSystemMemorySize
+ add x1, x1, x2^M
+ // Update the global variable^M
+ *adr x2, mSystemMemoryEnd*^M
+ *str x1, [x2]*^M
I think direct write to flash should be forbidden. This change may work
well for platforms which use ATF and load PrePi into memory, but not for
other platforms.
Please let me know your comments about this.
Thanks and regards,
Heyi
Hi,
I send v2 of PciEmulation + USB + SATA support. The changes from v1 are
significant. The driver was adjusted to cooperate with
NonDiscoverablePciDeviceDxe driver, based on:
[PATCH v2 0/5] MdeModulePkg: add support for non-discoverable devices
Debug showed that the above patchset had to be modified in a minor way
in order to allow XHCI and SD/MMC driver (will be sent later) to operate
properly:
---
a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
+++
b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
@@ -942,7 +942,7 @@ InitializePciIoProtocol (
Dev->ConfigSpace.Hdr.ClassCode[1] = PCI_CLASS_SERIAL_USB;
Dev->ConfigSpace.Hdr.ClassCode[2] = PCI_CLASS_SERIAL;
Dev->BarIndex = 0;
- Dev->BarSize = SIZE_2KB;
+ Dev->BarSize = SIZE_16KB;
break;
case NonDiscoverableDeviceTypeAhci:
@@ -958,7 +958,7 @@ InitializePciIoProtocol (
Dev->ConfigSpace.Hdr.ClassCode[1] = PCI_SUBCLASS_SD_HOST_CONTROLLER;
Dev->ConfigSpace.Hdr.ClassCode[2] = PCI_CLASS_SYSTEM_PERIPHERAL;
Dev->BarIndex = 0;
- Dev->BarSize = 0x100;
+ Dev->BarSize = 0x300;
break;
I let know about above on EDK2 mailing lists.
As a result the submitted code is greatly simplified and it allows for very
flexible adding new devices (currently AHCI, XHCI, SDHCI) - only via PCD,
without need of touching the driver.
NOTE: AHCI wasn't tested yet, I'm waiting for the board with the silicon
revision, which is supposed to comprise quirkless AHCI IP (it should arrive
in coming days).
Please let me know your opinion. Despite NonDiscoverablePciDeviceDxe is not
yet in the tree, I'm looking forward to your review and remarks, so that
we would be ready on OPP side for this to happen.
Best regards,
Marcin
Jan Dąbroś (4):
Platforms/Marvell: Enable PciEmulation driver for Armada70x0 platform
Platforms/Marvell: Enable USB stack for Armada70x0 platform
Platforms/Marvell: Enable two xHCI ports for Armada70x0 board
Platforms/Marvell: Enable SATA stack for Armada70x0 platform
Marcin Wojtas (2):
Platforms/Marvell: Add PciEmulation driver
Platforms/Marvell: Enable SATA port for Armada70x0 board
.../Marvell/PortingGuide/PciEmulation.txt | 46 +++++++++
Platforms/Marvell/Armada/Armada.dsc.inc | 19 ++++
Platforms/Marvell/Armada/Armada70x0.dsc | 10 ++
Platforms/Marvell/Armada/Armada70x0.fdf | 18 ++++
Platforms/Marvell/Marvell.dec | 6 ++
Platforms/Marvell/PciEmulation/PciEmulation.c | 112 +++++++++++++++++++++
Platforms/Marvell/PciEmulation/PciEmulation.inf | 60 +++++++++++
7 files changed, 271 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
--
1.8.3.1