aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristophe Lombard <clombard@linux.ibm.com>2023-08-29 11:23:54 +0200
committerReza Arbab <arbab@linux.ibm.com>2023-09-12 14:22:11 -0500
commite172f39a881f8096c3a4f0924e43a55336873871 (patch)
treec25738993842da03abc793f4951e7bc56a4329bd /include
parent49059a6e457325d3f9926f6f15446d772ab88d6a (diff)
downloadskiboot-e172f39a881f8096c3a4f0924e43a55336873871.zip
skiboot-e172f39a881f8096c3a4f0924e43a55336873871.tar.gz
skiboot-e172f39a881f8096c3a4f0924e43a55336873871.tar.bz2
core/pldm: Register PLDM as a blocklevel device
In the same way that ipmi-hiomap implements the PNOR access control protocol, this patch allows to "virtualize" the content of a BMC flash based on lid files. Previously, flash PNOR partitions were viewed this way: partitionXX=NAME, start address, end address, flags The content of each partition is now stored in a lid file. In order to continue to use the libflash library, we manually fill in the contents of a fake flash header when accessing offset 0. This reproduces the behavior via ipmi-hiomap of reading the flash header on the BMC. For the reading and writing of BMC lids files, we convert the virtual addresses of these 'fake' partitions by identifying: lid id. Signed-off-by: Christophe Lombard <clombard@linux.ibm.com> Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/pldm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/pldm.h b/include/pldm.h
index 9c5369e..8622453 100644
--- a/include/pldm.h
+++ b/include/pldm.h
@@ -43,4 +43,9 @@ int pldm_fru_dt_add_bmc_version(void);
*/
int pldm_lid_files_init(struct blocklevel_device **bl);
+/**
+ * Remove lid ids data
+ */
+bool pldm_lid_files_exit(struct blocklevel_device *bl);
+
#endif /* __PLDM_H__ */