Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cherry-Pick] MdeModulePkg\Bus\Spi #845

Closed

Conversation

apop5
Copy link
Contributor

@apop5 apop5 commented May 10, 2024

Description

Cherry-picks to introduce the Spi bus drivers into MdeModulePkg.

Needed to support a silicon platform.

For each item, place an "x" in between [ and ] if true. Example: [x].
(you can also check items in the GitHub UI)

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

N/A

Integration Instructions

N/A

@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label May 10, 2024
@apop5 apop5 requested review from makubacki and kuqin12 May 10, 2024 01:35
@codecov-commenter
Copy link

codecov-commenter commented May 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 2383 lines in your changes are missing coverage. Please review.

Project coverage is 0.92%. Comparing base (c22fcdd) to head (422abea).

Files Patch % Lines
...us/Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdp.c 0.00% 926 Missing ⚠️
...dulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlash.c 0.00% 640 Missing ⚠️
MdeModulePkg/Bus/Spi/SpiBus/SpiBus.c 0.00% 182 Missing ⚠️
...Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdpDxe.c 0.00% 143 Missing ⚠️
MdeModulePkg/Bus/Spi/SpiBus/SpiBusDxe.c 0.00% 122 Missing ⚠️
...Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdpSmm.c 0.00% 120 Missing ⚠️
MdeModulePkg/Bus/Spi/SpiBus/SpiBusSmm.c 0.00% 98 Missing ⚠️
MdeModulePkg/Bus/Spi/SpiHc/SpiHcDxe.c 0.00% 54 Missing ⚠️
MdeModulePkg/Bus/Spi/SpiHc/SpiHcSmm.c 0.00% 41 Missing ⚠️
...aseSpiHcPlatformLibNull/BaseSpiHcPlatformLibNull.c 0.00% 36 Missing ⚠️
... and 1 more
Additional details and impacted files
@@                Coverage Diff                 @@
##           release/202311     #845      +/-   ##
==================================================
- Coverage            1.22%    0.92%   -0.30%     
==================================================
  Files                1303     1314      +11     
  Lines              335685   336616     +931     
  Branches             3183     3000     -183     
==================================================
- Hits                 4118     3124     -994     
- Misses             331491   333022    +1531     
- Partials               76      470     +394     
Flag Coverage Δ
MdePkg 3.24% <ø> (-2.13%) ⬇️
NetworkPkg 0.00% <ø> (ø)
PolicyServicePkg 28.75% <ø> (-1.66%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@apop5 apop5 force-pushed the personal/apop5/cherrypickspibus branch from a4e5840 to 1d514a2 Compare May 10, 2024 02:44
@apop5 apop5 marked this pull request as draft May 10, 2024 03:33
changab and others added 8 commits May 10, 2024 16:05
…r files

BZ#: 4471
Update definitions according to PI spec 1.8 errata A

Signed-off-by: Abner Chang <[email protected]>
Cc: Michael D Kinney <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Zhiguang Liu <[email protected]>
Cc: Abdul Lateef Attar <[email protected]>
Cc: Brit Chesley <[email protected]>
Reviewed-by: Abdul Lateef Attar <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
BZ#: 4472
Add definition of JEDEC Serial Flash Discoverable Parameters
(SFDP) specification.
https://www.jedec.org/standards-documents/docs/jesd216b

Signed-off-by: Abner Chang <[email protected]>
Cc: Michael D Kinney <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Zhiguang Liu <[email protected]>
Cc: Abdul Lateef Attar <[email protected]>
Cc: Brit Chesley <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Reviewed-by: Abdul Lateef Attar <[email protected]>
…SFDP driver

BZ#: 4473

Signed-off-by: Abner Chang <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Jian J Wang <[email protected]>
Cc: Abdul Lateef Attar <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Reviewed-by: Abdul Lateef Attar <[email protected]>
…SFDP

BZ#: 4471
SPI NOR Flash JEDEC Serial Flash Discoverable Driver
implementation.

Signed-off-by: Abner Chang <[email protected]>
Cc: Hao A Wu <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Abdul Lateef Attar <[email protected]>
Cc: Brit Chesley <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
BZ#: 4471
SPI NOR Flash JEDEC Serial Flash Discoverable Driver
implementation.

Signed-off-by: Abner Chang <[email protected]>
Cc: Jian J Wang <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Abdul Lateef Attar <[email protected]>
Cc: Brit Chesley <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Added SpiBus DXE and SMM drivers. This code translates SPI requests from
the application layer into SPI Bus transactions on the SPI host
controller. The code is responsible for checking if the transaction is
valid, then setting up the SPI clock and chip select properly before
passing the bus transaction to the host controller.

Platform Initialization Spec 1.7 volume 5 section 18.1.6

Bugzilla #4753

Cc: Abner Chang <[email protected]>
Cc: Abdul Lateef Attar <[email protected]>
Signed-off-by: Brit Chesley <[email protected]>
Reviewed-by: Abner Chang <[email protected]>
Added SpiHc DXE and SMM drivers. This code receives bus transactions
from the SpiBus layer and passes them onto the SpiHcPlatformLib

Platform Initialization Spec 1.7 volume 5 section 18.1.7

Bugzilla #4753

Cc: Abner Chang <[email protected]>
Cc: Abdul Lateef Attar <[email protected]>
Signed-off-by: Brit Chesley <[email protected]>
Reviewed-by: Abner Chang <[email protected]>
…ance

Adding NULL SpiHcPlatformLib instance. This library is responsible for
handling the low level details of the SPI host controller. Since this is
platform specific this library will be dependent on OEM SPI
implementation. The SPI host controller layer will utilize this library
for SPI bus transactions.

Bugzilla #4753

Cc: Liming Gao <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Abner Chang <[email protected]>
Cc: Abdul Lateef Attar <[email protected]>
Signed-off-by: Brit Chesley <[email protected]>
Acked-by: Abner Chang <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
@apop5 apop5 force-pushed the personal/apop5/cherrypickspibus branch from 1d514a2 to 0276b22 Compare May 13, 2024 18:48
@apop5 apop5 marked this pull request as ready for review May 13, 2024 19:00
BritChesley and others added 3 commits May 13, 2024 13:51
Including the SpiBus drivers in MdeModulePkg.dsc

Platform Initialization spec 1.7 volume 5 section 18.1.6

Bugzilla #4753

Cc: Liming Gao <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Abner Chang <[email protected]>
Cc: Abdul Lateef Attar <[email protected]>
Signed-off-by: Brit Chesley <[email protected]>
Acked-by: Abner Chang <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Cc: Abner Chang <[email protected]>
Cc: Abdul Lateef Attar <[email protected]>
Signed-off-by: Brit Chesley <[email protected]>
Reviewed-by: Abner Chang <[email protected]>
Including the SpiHc drivers in MdeModulePkg.dsc

Bugzilla #4753

Cc: Liming Gao <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Abner Chang <[email protected]>
Cc: Abdul Lateef Attar <[email protected]>
Signed-off-by: Brit Chesley <[email protected]>
Acked-by: Abner Chang <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Copy link

This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the state:stale Has not been updated in a long time label Jul 12, 2024
Copy link

This pull request has been automatically been closed because it did not have any activity in 60 days and no follow up within 7 days after being marked stale. Thank you for your contributions.

@github-actions github-actions bot closed this Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact state:stale Has not been updated in a long time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants