summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
diff options
context:
space:
mode:
authoryhsu3 <yhsu3@lenovo.com>2024-09-08 17:45:54 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-09-11 16:36:03 +0000
commit589304e67fbfcbb7c250d1a3031ef23c4fb8a41b (patch)
tree797b9ab8058d96db931b3eb900e4ff333f521dc0 /NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
parent58b4bf7b7e526cec295bfbc6caa4a5cf223a1c53 (diff)
downloadedk2-589304e67fbfcbb7c250d1a3031ef23c4fb8a41b.tar.gz
edk2-589304e67fbfcbb7c250d1a3031ef23c4fb8a41b.tar.bz2
edk2-589304e67fbfcbb7c250d1a3031ef23c4fb8a41b.zip
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>
Diffstat (limited to 'NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c')
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
index f22a151e25..0af791dc5f 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
@@ -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;
}