Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BmcAcpiSwChildPolicyProtocol and RedirFruProtocol definition #200

Merged
merged 4 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions IpmiFeaturePkg/Include/Protocol/BmcAcpiSwChildPolicy.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/** @file
This protocol produces BmcAcpiSwChildPolicy Protocol.

Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent

**/

#ifndef BMC_ACPI_SW_CHILD_POLICY_H_
#define BMC_ACPI_SW_CHILD_POLICY_H_

typedef struct _EFI_BMC_ACPI_SW_CHILD_POLICY_PROTOCOL EFI_BMC_ACPI_SW_CHILD_POLICY_PROTOCOL;

#define EFI_BMC_ACPI_SW_CHILD_POLICY_PROTOCOL_GUID \
{ 0x89843c0b, 0x5701, 0x4ff6, 0xa4, 0x73, 0x65, 0x75, 0x99, 0x04, 0xf7, 0x35 }

typedef
EFI_STATUS
(EFIAPI *EFI_SET_ACPI_POWER_STATE_IN_BMC)(
IN EFI_BMC_ACPI_SW_CHILD_POLICY_PROTOCOL *This,
IN UINT8 PowerState,
IN UINT8 DeviceState
);

struct _EFI_BMC_ACPI_SW_CHILD_POLICY_PROTOCOL {
EFI_SET_ACPI_POWER_STATE_IN_BMC SetACPIPowerStateInBMC;
};

extern EFI_GUID gEfiBmcAcpiSwChildPolicyProtocolGuid;

#endif
99 changes: 99 additions & 0 deletions IpmiFeaturePkg/Include/Protocol/GenericElog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/** @file
This code abstracts the generic ELOG Protocol.

Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent

**/

#ifndef GENERIC_ELOG_H_
#define GENERIC_ELOG_H_

#include "ServerManagement.h"

#define EFI_SM_ELOG_PROTOCOL_GUID \
{ \
0x59d02fcd, 0x9233, 0x4d34, 0xbc, 0xfe, 0x87, 0xca, 0x81, 0xd3, 0xdd, 0xa7 \
}

#define EFI_SM_ELOG_REDIR_PROTOCOL_GUID \
{ \
0x16d11030, 0x71ba, 0x4e5e, 0xa9, 0xf9, 0xb4, 0x75, 0xa5, 0x49, 0x4, 0x8a \
}

//
// Common Defines
//
#ifndef _EFI_SM_ELOG_TYPE
#define _EFI_SM_ELOG_TYPE
typedef enum {
EfiElogSmSMBIOS,
EfiElogSmIPMI,
EfiElogSmMachineCritical,
EfiElogSmASF,
EfiElogSmOEM,
EfiSmElogMax
} EFI_SM_ELOG_TYPE;
#endif

typedef struct _EFI_SM_ELOG_PROTOCOL EFI_SM_ELOG_PROTOCOL;

typedef struct _EFI_SM_ELOG_PROTOCOL EFI_SM_ELOG_REDIR_PROTOCOL;

//
// Generic ELOG Function Prototypes
//
typedef
EFI_STATUS
(EFIAPI *EFI_SET_ELOG_DATA)(
IN EFI_SM_ELOG_PROTOCOL *This,
IN UINT8 *ElogData,
IN EFI_SM_ELOG_TYPE DataType,
IN BOOLEAN AlertEvent,
IN UINTN DataSize,
OUT UINT64 *RecordId
);

typedef
EFI_STATUS
(EFIAPI *EFI_GET_ELOG_DATA)(
IN EFI_SM_ELOG_PROTOCOL *This,
IN OUT UINT8 *ElogData,
IN EFI_SM_ELOG_TYPE DataType,
IN OUT UINTN *DataSize,
IN OUT UINT64 *RecordId
);

typedef
EFI_STATUS
(EFIAPI *EFI_ERASE_ELOG_DATA)(
IN EFI_SM_ELOG_PROTOCOL *This,
IN EFI_SM_ELOG_TYPE DataType,
IN OUT UINT64 *RecordId
);

typedef
EFI_STATUS
(EFIAPI *EFI_ACTIVATE_ELOG)(
IN EFI_SM_ELOG_PROTOCOL *This,
IN EFI_SM_ELOG_TYPE DataType,
IN BOOLEAN *EnableElog,
OUT BOOLEAN *ElogStatus
);

//
// IPMI TRANSPORT PROTOCOL
//
struct _EFI_SM_ELOG_PROTOCOL {
EFI_SET_ELOG_DATA SetEventLogData;
EFI_GET_ELOG_DATA GetEventLogData;
EFI_ERASE_ELOG_DATA EraseEventlogData;
EFI_ACTIVATE_ELOG ActivateEventLog;
};

extern EFI_GUID gEfiGenericElogProtocolGuid;
extern EFI_GUID gEfiRedirElogProtocolGuid;
extern EFI_GUID gSmmGenericElogProtocolGuid;
extern EFI_GUID gSmmRedirElogProtocolGuid;

#endif
81 changes: 81 additions & 0 deletions IpmiFeaturePkg/Include/Protocol/RedirFru.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/** @file
This code abstracts the generic FRU Protocol.

Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent

**/

#ifndef REDIR_FRU_H_
#define REDIR_FRU_H_

typedef struct _EFI_SM_FRU_REDIR_PROTOCOL EFI_SM_FRU_REDIR_PROTOCOL;

#define EFI_SM_FRU_REDIR_PROTOCOL_GUID \
{ \
0x28638cfa, 0xea88, 0x456c, 0x92, 0xa5, 0xf2, 0x49, 0xca, 0x48, 0x85, 0x35 \
}

// {41F49AE4-7FB0-4c54-994E-EA199171B0AC}
#define EFI_PRE_FRU_SMBIOS_DATA_GUID \
{ \
0x41f49ae4, 0x7fb0, 0x4c54, 0x99, 0x4e, 0xea, 0x19, 0x91, 0x71, 0xb0, 0xac \
}

#define EFI_SM_FRU_REDIR_SIGNATURE SIGNATURE_32 ('f', 'r', 'r', 'x')

//
// Redir FRU Function Prototypes
//
typedef
EFI_STATUS
(EFIAPI *EFI_GET_FRU_REDIR_INFO)(
IN EFI_SM_FRU_REDIR_PROTOCOL *This,
IN UINTN FruSlotNumber,
OUT EFI_GUID *FruFormatGuid,
OUT UINTN *DataAccessGranularity,
OUT CHAR16 **FruInformationString
);

typedef
EFI_STATUS
(EFIAPI *EFI_GET_FRU_SLOT_INFO)(
IN EFI_SM_FRU_REDIR_PROTOCOL *This,
OUT EFI_GUID *FruTypeGuid,
OUT UINTN *StartFruSlotNumber,
OUT UINTN *NumSlots
);

typedef
EFI_STATUS
(EFIAPI *EFI_GET_FRU_REDIR_DATA)(
IN EFI_SM_FRU_REDIR_PROTOCOL *This,
IN UINTN FruSlotNumber,
IN UINTN FruDataOffset,
IN UINTN FruDataSize,
IN UINT8 *FruData
);

typedef
EFI_STATUS
(EFIAPI *EFI_SET_FRU_REDIR_DATA)(
IN EFI_SM_FRU_REDIR_PROTOCOL *This,
IN UINTN FruSlotNumber,
IN UINTN FruDataOffset,
IN UINTN FruDataSize,
IN UINT8 *FruData
);

//
// REDIR FRU PROTOCOL
//
struct _EFI_SM_FRU_REDIR_PROTOCOL {
EFI_GET_FRU_REDIR_INFO GetFruRedirInfo;
EFI_GET_FRU_SLOT_INFO GetFruSlotInfo;
EFI_GET_FRU_REDIR_DATA GetFruRedirData;
EFI_SET_FRU_REDIR_DATA SetFruRedirData;
};

extern EFI_GUID gEfiRedirFruProtocolGuid;

#endif
2 changes: 2 additions & 0 deletions IpmiFeaturePkg/IpmiFeaturePkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
gIpmiTransportProtocolGuid = {0x6bb945e8, 0x3743, 0x433e, {0xb9, 0x0e, 0x29, 0xb3, 0x0d, 0x5d, 0xc6, 0x30}}
gSmmIpmiTransportProtocolGuid = {0x8bb070f1, 0xa8f3, 0x471d, {0x86, 0x16, 0x77, 0x4b, 0xa3, 0xf4, 0x30, 0xa0}}
gEfiVideoPrintProtocolGuid = {0x3dbf3e06, 0x9d0c, 0x40d3, {0xb2, 0x17, 0x45, 0x5f, 0x33, 0x9e, 0x29, 0x09}}
gEfiBmcAcpiSwChildPolicyProtocolGuid = { 0x89843c0b, 0x5701, 0x4ff6, { 0xa4, 0x73, 0x65, 0x75, 0x99, 0x04, 0xf7, 0x35 } }
gEfiRedirFruProtocolGuid = { 0x28638cfa, 0xea88, 0x456c, { 0x92, 0xa5, 0xf2, 0x49, 0xca, 0x48, 0x85, 0x35 } }

[PcdsFeatureFlag]
gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable|FALSE|BOOLEAN|0xA0000001
Expand Down