More Information:
The BeepDebugFeaturePkg include some useful beep debug libraries, such as get beep value from status code and beep.
This is an important capability in firmware development to get and analyze the early error when there is not serial port.
It provide a library BeepStatusCodeHandlerLib used by edk2 StatusCodeHandler.efi, used to do beep if needed.
It also provide a library of BeepMap lib, it map the status code to beep value.
A library of Beep lib is needed by platform, and this pkg has a Null implementation.
In the library contstructor function, BeepStatusCodeHandlerLib register the call back function for ReportStatusCode.
When called, it call GetBeepFromStatusCode() in BeepMapLib to get beep value from status code, and call Beep() in BeepLib to beep.
BeepStatusCodeHandlerLib include 3 libraries for PEI, RuntimeDxe, SMM:
* PeiBeepStatusCodeHandlerLib
* RuntimeDxeBeepStatusCodeHandlerLib
* SmmBeepStatusCodeHandlerLib
Linked with StatusCodeHandler.efi, and make sure put the StatusCodeHandler.efi after the ReportStatusCodeRouter.efi.
This library register the call back function for ReportStatusCode, and get beep valude from status code, and do beep.
This library provide a function to get beep value from status code.
In PeiBeepStatusCodeHandlerLib:
EFI_STATUS
EFIAPI
BeepStatusCodeReportWorker (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_STATUS_CODE_TYPE CodeType,
IN EFI_STATUS_CODE_VALUE Value,
IN UINT32 Instance,
IN CONST EFI_GUID *CallerId,
IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
)
In RuntimeDxeBeepStatusCodeHandlerLib:
EFI_STATUS
EFIAPI
BeepStatusCodeReportWorker (
IN EFI_STATUS_CODE_TYPE CodeType,
IN EFI_STATUS_CODE_VALUE Value,
IN UINT32 Instance,
IN EFI_GUID *CallerId,
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
)
In SmmBeepStatusCodeHandlerLib:
EFI_STATUS
EFIAPI
BeepStatusCodeReportWorker (
IN EFI_STATUS_CODE_TYPE CodeType,
IN EFI_STATUS_CODE_VALUE Value,
IN UINT32 Instance,
IN EFI_GUID *CallerId,
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
)
In BeepMapLib:
UINT32
EFIAPI
GetBeepValueFromStatusCode (
IN EFI_STATUS_CODE_TYPE CodeType,
IN EFI_STATUS_CODE_VALUE Value
)
In BeepLib:
VOID
EFIAPI
Beep (
IN UINT32 Value
)
Status Code (ReportStatusCode) -> Beep Value (GetBeepValueFromStatusCode).
ReportStatusCode() -> BeepStatusCodeReportWorker() -> GetBeepValueFromStatusCode() -> Beep()
There is not special build flows.
Verify the post code shown is correct.
N/A