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

Redfish schema version forward compatibility support #97

Merged

Conversation

nicklela
Copy link
Contributor

Description

Problem statement

In current EFI_REST_JSON_STRUCTURE_PROTOCOL design, there is one-to-one mapping between Redfish schema version and Redfish feature driver. When BMC supports new Redfish schema version, the corresponding BIOS firmware update is required to include new feature driver. Otherwise, Redfish feature driver cannot find correct schema version support and entire UEFI Redfish function is failing. This creates trouble for firmware release management because BMC firmware and BIOS firmware are coupled together. And there is no guarantee that user will always update both two firmware together.

Discussion

To decouple BMC firmware and BIOS firmware, we need a way to support newer Redfish schema version by using existing Redfish feature drivers. Redfish schema supports backward compatibility where deprecated attributes still stay in newer schema version (with "deprecated" and "versionDeprecated" presented). So, In theory, Redfish feature driver in old schema version can support newer schema version without problem.

Solution

EdkIIRedfishResourceConfigLib is used to find correct schema version of feature driver. When there is no matched driver can be found in system, it tries to find "best match" schema version of feature driver. The rule is:

  • Schema name must be the same
  • When schema version of feature driver is smaller than requested schema version, this feature driver is selected.

After "best match" feature driver is found, feature driver will update schema version in JSON context so EFI_REST_JSON_STRUCTURE_PROTOCOL can work. A PCD "PcdRedfishCompatibleSchemaSupport" is introduced to turn of compatibility support when user wants "perfect match" schema version support in system.

How This Was Tested

  • Build pass on RedfishClientPkg
  • Tested on server platform

@nicklela
Copy link
Contributor Author

@changab @igorkulchytskyy This is big change. I would suggest you to review them by the commit order.

@nicklela
Copy link
Contributor Author

nicklela commented Sep 1, 2024

@igorkulchytskyy may I have your review to this change? Thanks!

Add the ability to support newer schema version with current Redfish
feature drivers. PcdRedfishCompatibleSchemaSupport is introduced to
enable this function in Redfish drivers. When PCD is enabled, Redfish
driver will try its best to handle resource with newer schema version.
With this ability, BIOS does not have dependency to BMC firmware.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
implement compatible schema support to computer system driver.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
implement compatible schema support to bios driver.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
implement compatible schema support to boot options driver.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
implement compatible schema support to secure boot driver.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
implement compatible schema support to memory driver.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
@nicklela nicklela force-pushed the schema-version-forward-compatibility branch from cff8cdd to 32b976e Compare September 4, 2024 06:12
@nicklela nicklela merged commit 0610c20 into tianocore:main Sep 4, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants