[Skiboot] [PATCH V2 06/15] core/pldm: Find PDR record by record handle
Christophe Lombard
clombard at linux.vnet.ibm.com
Fri Apr 29 19:47:35 AEST 2022
Add a wrapper for the libpldm api: pldm_pdr_find_record()
Signed-off-by: Christophe Lombard <clombard at linux.vnet.ibm.com>
---
core/pldm/pldm-platform-requests.c | 22 ++++++++++++++++++++++
core/pldm/pldm.h | 4 ++++
2 files changed, 26 insertions(+)
diff --git a/core/pldm/pldm-platform-requests.c b/core/pldm/pldm-platform-requests.c
index c3baad54..a84712d0 100644
--- a/core/pldm/pldm-platform-requests.c
+++ b/core/pldm/pldm-platform-requests.c
@@ -32,6 +32,28 @@ static void pdr_init_complete(bool success)
pdr_ready = true;
}
+/*
+ * Find PDR record by record handle.
+ */
+int pldm_platform_pdr_find_record(uint32_t record_handle,
+ uint8_t **pdr_data,
+ uint32_t *pdr_data_size,
+ uint32_t *next_record_handle)
+{
+ const pldm_pdr_record *pdr_record;
+
+ pdr_record = pldm_pdr_find_record(repo,
+ record_handle,
+ pdr_data,
+ pdr_data_size,
+ next_record_handle);
+
+ if (!pdr_record)
+ return OPAL_PARAMETER;
+
+ return OPAL_SUCCESS;
+}
+
/*
* Search the matching record and return the effecter id.
* PDR type = PLDM_STATE_EFFECTER_PDR
diff --git a/core/pldm/pldm.h b/core/pldm/pldm.h
index 938a554c..bc399271 100644
--- a/core/pldm/pldm.h
+++ b/core/pldm/pldm.h
@@ -80,6 +80,10 @@ int pldm_bios_init(void);
int pldm_base_get_tid_req(void);
+int pldm_platform_pdr_find_record(uint32_t record_handle,
+ uint8_t **pdr_data,
+ uint32_t *pdr_data_size,
+ uint32_t *next_record_handle);
int plmd_platform_reload_pdrs(void);
int pldm_platform_init(void);
void pldm_platform_exit(void);
--
2.35.1
More information about the Skiboot
mailing list