Provides the UEFI variable directory path and the logging level that the UEFI library uses in the other functions.
Only the Linux version of the library uses the path input, and it is ignored in the Windows version of the library.
You must call this function before using the other APIs provided by this library.
Linux absolute path to the UEFI variables directory. For Linux, if the value is NULL, the default UEFI path of /sys/firmware/efi/efivars/ is used. For Windows, this parameter is ignored.
logLevel [In]
Set the logging level. Logging messages default to stdout. You can create an auxiliary logging function and link with the MP UEFI Library to change the output location. .
Returns the type of data structure in the SgxRegistrationServerRequest UEFI variable.
Currently, the library only supports platform manifest and add package structures.
Returns the contents of the SgxRegistrationServerRequest UEFI variable.
It also returns the required size of the request structure in the parameter request_size if you pass in NULL for the request parameter.
Holds the request buffer to be populated. When this value is NULL but request_size is not NULL, the API will return the size of the request in the SgxRegistrationServerRequest UEFI variable in request_size.
request_size [In/Out]
If request is not NULL, it contains the size in bytes of buffer pointed to by request. Upon a successful execution, the API sets it to the number of bytes written to request.
If request is NULL or the inputted request_size is too small to contain the request (return value is MP_USER_INSUFFICIENT_MEM), the API sets it to the number of bytes required to contain the request data.
Successfully read the contents of the SgxRegistrationServerRequest UEFI variable if request is not NULL or request_size contains the required buffer size when request is NULL.
The Registration Service may generate responses to the data provided in the SgxRegistrationServerRequest UEFI variable.
This API allows software to provide those server responses to BIOS via the SgxRegistrationServerResponse UEFI variable.
Currently, only the Add Package (Replace Package) boot flow generates a response data from the Registration Service.
This API reads data from the SgxRegistrationPackageInfo UEFI variable.
Currently, BIOS uses this variable to provide software with the key blobs generated for each CPU package.
The platform owner needs to enable a BIOS configuration (SGX Package Info In-band Access)
before it provides this information.
This data is not provided to the software by default.
Holds the package info buffer to be populated. When this value is NULL but blobs_size is not NULL, the API returns the size of the data in the SgxRegistrationPackageInfo UEFI variable in blobs_size.
blobs_size [In/Out]
If blobs is not NULL, it contains the size in bytes of the buffer pointed to by blobs. Upon a successful execution, the API sets it to the number of bytes written to the blobs buffer.
If blobs is NULL or the inputted blobs_size is too small to contain the package info data (return value is MP_USER_INSUFFICIENT_MEM), the API sets it to the number of bytes required to contain the package info data.
Successfully read the contents of the SgxRegistrationPackageInfo UEFI variable if blobs is not NULL or blobs_size contains the required buffer size when blobs is NULL.
MP_INVALID_PARAMETER
The parameter blobs_size is NULL.
MP_UEFI_INTERNAL_ERROR
The request structure header in the SgxRegistrationPackageInfo UEFI variable has an invalid version or invalid size.
This API allows to write to the SgxRegistrationStatus UEFI variable.
This variable can only be written under certain circumstances.
See the definition of SgxRegistrationStatus UEFI variable for more information.
You can use this API to modify the registration and package info complete bits.
It also allows to set an error code that any SW encountered during processing the data provided by BIOS or the registration service infrastructure.
This API overwrites the contents of the UEFI variable.
This API reads the SgxRegistrationConfiguration UEFI variable.
This variable contains the information that the software uses for contacting the registration infrastructure services.
If both server_id and server_id_size are not NULL, it contains the size in bytes of the buffer pointed to by server_id. Upon a successful execution, the API sets it to the number of bytes written to the server_id buffer. If the inputted server_id_size not NULL but the number of bytes is too small to contain the server_id (return value is MP_USER_INSUFFICIENT_MEM), the API sets it to the number of bytes required to contain the server id data.
If server_id is NULL and server_id_size is not NULL, the API sets it to the number of bytes required to contain the server id data.
If server_id_size is NULL, no server_id information is returned.
This API allows software to modify the registration authority service information in the SgxRegistrationConfiguration UEFI variable.
This includes the registration authority service URL and the SgxRegistrationServerInfo.
This UEFI variable is only writable when SGX is disabled.
It first reads the UEFI variable then modifies the contents and writes it back.
The URL is optional and keeps the existing value, but the server_id is not optional.