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

MdeModulePkg: PeiMain: Add Delayed Dispatch PPI Implementation #6235

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

kuqin12
Copy link
Contributor

@kuqin12 kuqin12 commented Sep 24, 2024

Description

The Delayed Dispatch PPI is (re)defined in PI specification v1.8A. This PR is created to introduce the implementation in PEI core.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

This change was tested on proprietary physical platforms and QEMU Q35 based virtual platforms.

Integration Instructions

N/A

@kuqin12 kuqin12 force-pushed the Delayed_Dispatch_V4 branch 7 times, most recently from abb649f to be15d3d Compare September 27, 2024 05:34
@leiflindholm
Copy link
Member

Delayed dispatch of what? The PR title should give at least a basic hint of what the PR does.

@kuqin12 kuqin12 changed the title Introducing delayed dispatch Introducing Delayed Dispatch PPI Sep 27, 2024
@kuqin12 kuqin12 marked this pull request as ready for review September 27, 2024 16:02
@kuqin12 kuqin12 changed the title Introducing Delayed Dispatch PPI MdeModulePkg: PeiMain: Introducing Delayed Dispatch PPI Sep 27, 2024
@kuqin12
Copy link
Contributor Author

kuqin12 commented Sep 27, 2024

Delayed dispatch of what? The PR title should give at least a basic hint of what the PR does.

Added "PPI".

@kuqin12 kuqin12 changed the title MdeModulePkg: PeiMain: Introducing Delayed Dispatch PPI MdeModulePkg: PeiMain: Add Delayed Dispatch PPI Implementation Sep 27, 2024
@lgao4
Copy link
Contributor

lgao4 commented Sep 30, 2024

Is there any consumer code to use this new PPI?

@kuqin12
Copy link
Contributor Author

kuqin12 commented Oct 4, 2024

Is there any consumer code to use this new PPI?

There is currently no public consumers. But a few IBVs and our propreitary hardware platforms are using it to sequentially initialize hardware components.

@lgao4
Copy link
Contributor

lgao4 commented Oct 9, 2024

Is there any consumer code to use this new PPI?

There is currently no public consumers. But a few IBVs and our propreitary hardware platforms are using it to sequentially initialize hardware components.

This change is incompatible. I worry that this change will impact current project. Are your project updated to match this update?

@kuqin12
Copy link
Contributor Author

kuqin12 commented Oct 10, 2024

Is there any consumer code to use this new PPI?

There is currently no public consumers. But a few IBVs and our propreitary hardware platforms are using it to sequentially initialize hardware components.

This change is incompatible. I worry that this change will impact current project. Are your project updated to match this update?

@lgao4 The change will install a PPI. But if there is no consumer for the PPI to register delayed dispatch handler, the new logic will not engage because it will be an empty table to dispatch from. Is that your concern?

Per your question on updates, our project has this logic in place for a couple of years.

kuqin12 and others added 3 commits October 15, 2024 10:04
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4496

PI spec defined the `Register` function input argument `Delay` as output.
However, this parameter should be used to define the minmal time delay
the callback should fire. Thus it should be an input parameter.

This change fixed the argument type.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>

Co-authored-by: Mike Turner <mikeyt@pobox.com>
Co-authored-by: Sachin Ganesh <sachinganesh@ami.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
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 <jian.j.wang@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Debkumar De <debkumar.de@intel.com>
Cc: Catharine West <catharine.west@intel.com>

Co-authored-by: Mike Turner <mikeyt@pobox.com>
Co-authored-by: Sachin Ganesh <sachinganesh@ami.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4496

This change adds a check for PEI dispatcher to continue dispatching when
there are still pending delayed dispatch requests, to be compatible with
newly integrated Delayed Dispatcher PPI interface.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Debkumar De <debkumar.de@intel.com>
Cc: Catharine West <catharine.west@intel.com>

Co-authored-by: John Schock <joschock@microsoft.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
@lgao4 lgao4 added the push Auto push patch series in PR if all checks pass label Oct 17, 2024
@mergify mergify bot merged commit 79598f3 into tianocore:master Oct 17, 2024
126 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants