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

[Design] feature driver OEM or hook support for customized attributes #24

Open
nicklela opened this issue May 30, 2023 · 3 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@nicklela
Copy link
Contributor

A way of giving platform to customize attributes or support OEM attributes.

Some idea:

  • Library hook
  • Override protocol/callback

Discussion about data structure:

  • Use Json C structure
    • The driver or library will have schema dependency
    • platform can only add customization to what schema provided.
  • JSON string/object.
    • The function can be coded in single driver / library but platform has to manipulate JSON on their own.
    • Give full freedom for platform to add anything they like. (e.g. some additional control field that BMC requested)

For example (protocol + JSON object version):

EFI_STAUTS 
(EFIAPI *FEATURE_DRIVER_OVERRIDE) (
 IN       PROTOCOL       *This,
 IN       CHAR8          *Uri,
 IN       CHAR8          *Schema,
 IN OUT EDKII_JSON_VALUE *Json
);

typedef struct _FEATURE_DRIVER_OVERRIDE_PROTOCOL {
  UINT64                   Revision;
  FEATURE_DRIVER_OVERRIDE  OverrideCallback;
} FEATURE_DRIVER_OVERRIDE_PROTOCOL;
@nicklela nicklela added the enhancement New feature or request label May 30, 2023
@nicklela nicklela self-assigned this May 30, 2023
@nicklela
Copy link
Contributor Author

EFI_STAUTS 
(EFIAPI *EDKII_REDFISH_RESOURCE_ADDENDUM_PROVISIONING) (
 IN       PROTOCOL                *This,
 IN       CHAR8                      *Uri,
 IN       CHAR8                      *Schema,
 IN OUT EDKII_JSON_VALUE *Json
);

EFI_STAUTS 
(EFIAPI *EDKII_REDFISH_RESOURCE_ADDENDUM_OEM) (
 IN       PROTOCOL                *This,
 IN       CHAR8                      *Uri,
 IN       CHAR8                      *Schema,
 OUT    EDKII_JSON_VALUE  *Json
);

EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL {
  UINT64                                        Revision;
  EDKII_REDFISH_RESOURCE_ADDENDUM_OEM           OemCallback;
  EDKII_REDFISH_RESOURCE_ADDENDUM_PROVISIONING  ProvisioningCallback;
}

Example:

Schema
{
"Attributes": {
}
}

Provisioning BIOS -> USB over lan -> BMC HTTP PUT /redfish/v1/Systems/sys/Bios
{
"control-sku-guid": "aaa-dd-cc",
"Attributes": {
"processornum": {
"value": 16,
"readonly": true,
},
}
}

USER GET /redfish/v1/Systems/sys/Bios
Redfish
{
"Attributes": {
"processornum": 16
}
}

@nicklela
Copy link
Contributor Author

We need ADDENDUM protocol because there is some data that is required by BMC but the data is came from BIOS. We create this protocol to provide the data for BMC implementation. We can also define addendum items in UEFI specification.

@nicklela
Copy link
Contributor Author

Code review here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant