smbios-mdr:Add support to toggle pcieslot presence
In the current state, the PCIeslot presence is always hardcoded to
`true`, since the PCIeSlots are always embedded on the board. But the
slot presence is not really useful. Since we are already getting the
current usage of the slot in the SMBIOS Type 9 structure we could use
the "Available"/"Occupied" status in the current usage field to
indicate the drive presence.
Modify the slot presence code to only mark "true" if the current usage
of the slot is "Occupied" & make it "false" if it is anything other
than that.
Tested By:
1. Enabled the meson option via the meta-ibm layer by adding
PACKAGECONFIG:append = "slot-drive-presence"
2. Post the SMBIOS transfer, could see the presence of the slot being
toggled with respect to the current occupancy of the slot.
Change-Id: I57e6f48dc501e7e1625a5389ea1e989c5e585824
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
diff --git a/meson.options b/meson.options
index 935670d..b7f5265 100644
--- a/meson.options
+++ b/meson.options
@@ -29,6 +29,13 @@
)
option(
+ 'slot-drive-presence',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Sets drive presence on slot objects'
+)
+
+option(
'cpuinfo-peci',
type: 'feature',
value: 'enabled',