Skip to content

[SONiC BMC] Get the BMC eeprom from Redis - #747

Open
benle7 wants to merge 1 commit into
sonic-net:masterfrom
benle7:sonic_bmc_redis
Open

[SONiC BMC] Get the BMC eeprom from Redis#747
benle7 wants to merge 1 commit into
sonic-net:masterfrom
benle7:sonic_bmc_redis

Conversation

@benle7

@benle7 benle7 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Dependent on: sonic-net/sonic-buildimage#29206

Description

Extend BMCBase to support SONiC-on-BMC (DEVICE_METADATA|bmc os = sonic) on Switch-Host:

  • When BMC OS is sonic, get_eeprom() reads Model, PartNumber, and SerialNumber from the
    BMC remote STATE_DB (EEPROM_INFO TLV keys 0x210x23) via daemon_base.db_connect_remote().
  • Redfish session-managed APIs (with_session_management) reject calls when BMC OS is sonic.
  • OpenBMC path (os = openbmc, default) is unchanged.

Motivation and Context

Switch-Host must talk to both OpenBMC peers (Redfish) and SONiC-on-BMC peers (Redis over the
USB/BMC link). After CONFIG_DB exposes the BMC OS type, the platform code
needs a shared implementation in sonic-platform-common so vendor BMC classes can serve EEPROM
without Redfish on SONiC BMC.

How Has This Been Tested?

pytest tests/bmc_base_test.py -k "eeprom" -v
show platform bmc eeprom

Additional Information (Optional)

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

#### Description

Extend `BMCBase` to support SONiC-on-BMC (`DEVICE_METADATA|bmc os = sonic`) on Switch-Host:

- When BMC OS is `sonic`, `get_eeprom()` reads Model, PartNumber, and SerialNumber from the
  BMC remote STATE_DB (`EEPROM_INFO` TLV keys `0x21`–`0x23`) via `daemon_base.db_connect_remote()`.
- Redfish session-managed APIs (`with_session_management`) reject calls when BMC OS is `sonic`.
- OpenBMC path (`os = openbmc`, default) is unchanged.

#### Motivation and Context

Switch-Host must talk to both OpenBMC peers (Redfish) and SONiC-on-BMC peers (Redis over the
USB/BMC link). After CONFIG_DB exposes the BMC OS type, the platform code
needs a shared implementation in `sonic-platform-common` so vendor BMC classes can serve EEPROM
without Redfish on SONiC BMC.

#### How Has This Been Tested?

```bash
pytest tests/bmc_base_test.py -k "eeprom" -v
show platform bmc eeprom
```

#### Additional Information (Optional)

Signed-off-by: Ben Levi <belevi@nvidia.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants