0
  1. I have not found the meaning of "Address" in NVME1000 config since it will use 0x6a anyway, at least to what I have seen. Can you tell me what is it for?
  2. I'm really new to OpenBMC and don't get much of the mechanism of the code, please help to remedy my understanding if it's not correct. Any advice from you will be appreciated a lot. Thank you.

Edited

I realize that when 1 of the NVME is not present, all of them will fails. I think the failed one affects the stream for reading or the response stream (respStream) although each nvme has a separate request stream (reqStream). I don't know why they interfere each other, but I see that when the resp size from smbus is < 0, they still write them to the stream without resizing the resp vector like when the size is normal, I add the resp.resize(len) here (https://github.com/openbmc/dbus-sensors/blob/ce6bcdfc28f60173093087050a43adbc586fd6fa/src/NVMeBasicContext.cpp#L153), it works, and we can do hot plug. Is that because I did not use FRU probe for the NVMEs....?

Chau Lnt
  • 1
  • 2
  • nvme data is pcie, but sensors use a separate i2c connection which has a bus number and address. The values depend on the design of your board. – stark Jun 15 '22 at 12:40
  • yes thank you @stark, it's a side question I want to clarify because I see they set 0x63 in the code, and it seems that nowhere uses the "Address" value. I wonder if it really takes effect. Do you have any idea about my 1. question? – Chau Lnt Jun 15 '22 at 14:33

2 Answers2

0

I wonder if NVMeSensor only support nvme with a fru and we have to have a single json file for each just like NVMEP4000.json.

The "Probe" field in entity-manager configuration json is used for probe rules for the device. FRU is just one way. For example, if you know the exact i2c bus and address, you can use something like

xyz.openbmc_project.Inventory.Decorator.I2CDevice({'Bus': 4, 'Address': 60})
^                                                   ^     ^ 
DBus Interface                                      |     Value
                                                    Property

And "Probe" can be an array with AND OR operators. Like this example.

What should I do when I want to config all the nvme inside the EM config of the board?.

I think adding all 4 NVME1000 blocks to your board json will do this, as long as they have different names and bus-address configuration.

I have not found the meaning of "Address" in NVME1000 config since it will use 0x6a anyway, at least to what I have seen. Can you tell me what is it for?

On Intel P4000 series SSDs, 0x53 (What in nvme_p4000.json) is the 7bit address of the FRU eeprom, while 0x6a is the 7bit address for NVM Express Basic Management Command (Appendix A of NVMe-MI 1.2b Specification). These addresses are only documented in the product spec that not generally available :(

KagurazakaKotori
  • 562
  • 4
  • 14
  • Thank you for your clean explanation. NVMEs like of SAMSUNG don't have a FRU, putting all NVME configs inside the baseboard config is my temporary solution but I don't know if it is qualified to upstream, since the community seems to use NVMe FRU to probe the config. And I'm using EntityManager mux for the muxes in the BP, without NVME fru, it's hard to get the bus number to NVME config b/c we can only know the symlink to the i2cbus of the muxes's channels (what the EntityManager mux does). Do you have any idea? – Chau Lnt Jun 23 '22 at 03:01
0
  • Putting all nvme configs inside the baseboard EM config is OK. There are hotplug issues with dbus-sensors nvmesensor, so when one of my configured nvme is not present, all the others will fail. I only plugged 1 nvme to one of the 4 slots so it causes the problem. I was told they are checking on this, but I'm doing the trick I put in the Edit section of my question.
  • They hardcode 0x6A for i2c address in nvmesensor code, the reason is as @KagurazakaKotori said.
Chau Lnt
  • 1
  • 2