Skip to content

Commit

Permalink
Publish BMC Status even on failure from PEI (#225)
Browse files Browse the repository at this point in the history
## Description

Removes the quick returns that cause the BMC Status HOB to not be
created during failures in PEI. This allows DXE and MM to check the
original init attempt status and fail out quickly if needed.

- [x] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

N/A

## Integration Instructions

N/A
  • Loading branch information
cfernald authored Mar 29, 2024
1 parent 15a5e96 commit 1d3e09e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
8 changes: 0 additions & 8 deletions IpmiFeaturePkg/GenericIpmi/Common/GenericIpmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@ typedef struct {
UINT8 ResponseData[MAX_TEMP_DATA - IPMI_RESPONSE_HEADER_SIZE];
} IPMI_RESPONSE;

//
// Structure to communicate BMC state from PEI to DXE.
//

typedef struct _IPMI_BMC_HOB {
BMC_STATUS BmcStatus;
} IPMI_BMC_HOB;

#pragma pack()

/**
Expand Down
2 changes: 0 additions & 2 deletions IpmiFeaturePkg/GenericIpmi/Common/IpmiInitialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ IpmiInitializeBmc (

if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to get device ID. %r\n", __FUNCTION__, Status));
return Status;
}

//
Expand All @@ -393,7 +392,6 @@ IpmiInitializeBmc (

if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to get self test results. %r\n", __FUNCTION__, Status));
return Status;
}
}

Expand Down
1 change: 0 additions & 1 deletion IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ PeimIpmiInterfaceInit (
Status = IpmiInitializeBmc (mIpmiInstance);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[IPMI] Failed to initialize BMC state. %r\n", Status));
return Status;
}

//
Expand Down
12 changes: 12 additions & 0 deletions IpmiFeaturePkg/Include/IpmiInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ typedef UINT32 BMC_STATUS;
#define BMC_UPDATE_IN_PROGRESS 3
#define BMC_NOTREADY 4

//
// Structure to communicate BMC state from PEI to DXE.
//

#pragma pack(1)

typedef struct _IPMI_BMC_HOB {
BMC_STATUS BmcStatus;
} IPMI_BMC_HOB;

#pragma pack()

//
// IPMI Function Prototypes
//
Expand Down

0 comments on commit 1d3e09e

Please sign in to comment.