dimm: use size to determine if DIMM is present and functional
Currently, we are using "NO DIMM" in dimmManufacturer to determine if
there is a DIMM sensor or not. However, it's "Unknown" in an AMD machine
we are testing.
Looking into SMBIOS spec (DSP0134_3.3.0), it looks like using size to
determine if DIMM is present and functional is a better option.
Tested:
Check an Intel CPU machine and the Present is true when DIMM is there
and false when it's not:
```
busctl introspect xyz.openbmc_project.Smbios.MDR_V2 \
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0 \
xyz.openbmc_project.Inventory.Item
NAME TYPE SIGNATURE RESULT/VALUE
FLAGS
.Present property b true
emits-change writable
.PrettyName property s ""
emits-change writable
busctl introspect xyz.openbmc_project.Smbios.MDR_V2 \
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm1 \
xyz.openbmc_project.Inventory.Item
NAME TYPE SIGNATURE RESULT/VALUE
FLAGS
.Present property b false
emits-change writable
.PrettyName property s ""
emits-change writable
```
Check an AMD machine and it works fine with a bad DIMM and a good DIMM:
```
busctl introspect
xyz.openbmc_project.Smbios.MDR_V2
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0
xyz.openbmc_project.Inventory.Item
NAME TYPE SIGNATURE RESULT/VALUE
FLAGS
.Present property b false
emits-change writable
.PrettyName property s ""
emits-change writable
busctl introspect
xyz.openbmc_project.Smbios.MDR_V2
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm1
xyz.openbmc_project.Inventory.Item
NAME TYPE SIGNATURE RESULT/VALUE
FLAGS
.Present property b true
emits-change writable
.PrettyName property s ""
emits-change writable
```
Change-Id: If6ea55f35b4af3225c4a07de481d930fa461b3e7
Signed-off-by: Tom Tung <shes050117@gmail.com>
1 file changed