mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 21:54:27 +02:00
Support Report Status Code in the UefiPxe driver.
Report PXE error status via Status Code, with this design, it will be flexible to register a status code handler via gEfiRscHandlerProtocolGuid to output the customized error code to other telemetry service. The subclass code is `EFI_IO_BUS_IP_NETWORK` Signed-off-by: Ethan Hsu <Eathonhsu@gmail.com>
This commit is contained in:
parent
58b4bf7b7e
commit
589304e67f
@ -1268,5 +1268,12 @@ ON_EXIT:
|
||||
AsciiPrint ("\n PXE-E99: Unexpected network error.\n");
|
||||
}
|
||||
|
||||
REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
|
||||
EFI_ERROR_CODE,
|
||||
(EFI_STATUS_CODE_VALUE)(EFI_IO_BUS_IP_NETWORK | EFI_OEM_SPECIFIC | ((EFI_STATUS_CODE_VALUE)(Status & 0x1F))),
|
||||
(VOID *)&(PxeBcMode->UsingIpv6),
|
||||
sizeof (PxeBcMode->UsingIpv6)
|
||||
);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -72,6 +72,13 @@ EfiPxeBcStart (
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
|
||||
EFI_PROGRESS_CODE,
|
||||
EFI_IO_BUS_IP_NETWORK | EFI_IOB_PC_RECONFIG,
|
||||
(VOID *)&(Mode->UsingIpv6),
|
||||
sizeof (Mode->UsingIpv6)
|
||||
);
|
||||
|
||||
if (Mode->UsingIpv6) {
|
||||
AsciiPrint ("\n>>Start PXE over IPv6");
|
||||
//
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <Library/DpcLib.h>
|
||||
#include <Library/DevicePathLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/ReportStatusCodeLib.h>
|
||||
|
||||
typedef struct _PXEBC_PRIVATE_DATA PXEBC_PRIVATE_DATA;
|
||||
typedef struct _PXEBC_PRIVATE_PROTOCOL PXEBC_PRIVATE_PROTOCOL;
|
||||
|
@ -62,6 +62,7 @@
|
||||
DpcLib
|
||||
DevicePathLib
|
||||
PcdLib
|
||||
ReportStatusCodeLib
|
||||
|
||||
[Protocols]
|
||||
## TO_START
|
||||
|
Loading…
x
Reference in New Issue
Block a user