Skip to content

[Nexthop][PlatformManager][M4062NHP] Support AMD CPU i2c buses C and D#1330

Closed
anna-nexthop wants to merge 2 commits into
facebook:mainfrom
nexthop-ai:anna-nexthop.amd-cpu-i2c-cd
Closed

[Nexthop][PlatformManager][M4062NHP] Support AMD CPU i2c buses C and D#1330
anna-nexthop wants to merge 2 commits into
facebook:mainfrom
nexthop-ai:anna-nexthop.amd-cpu-i2c-cd

Conversation

@anna-nexthop

Copy link
Copy Markdown
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

Map the AMD i2c controllers I2CC and I2CD to CPU_BUS@2 and CPU_BUS@3 in I2cExplorer (index-aligned to the AMD i2c[N] controllers; the legacy I2CA/I2CB mapping is unchanged), and widen ConfigValidator to accept CPU_BUS@0 through CPU_BUS@3 in i2cAdaptersFromCpu. This lets a platform_manager.json model devices on the third and fourth CPU-direct i2c buses.

Test Plan

Running the config_validator_test which now verifies CPU_BUS@[0-3] are valid while anything past that index is invalid.

@3)

**Pre-submission checklist**
- [x] I've ran the linters locally and fixed lint errors related to the
files I modified in this PR. You can install the linters by running `pip
install -r requirements-dev.txt && pre-commit install`
- [x] `pre-commit run`

Map the AMD i2c controllers I2CC and I2CD to CPU_BUS@2 and CPU_BUS@3 in
I2cExplorer (index-aligned to the AMD i2c[N] controllers; the legacy I2CA/I2CB
mapping is unchanged), and widen ConfigValidator to accept CPU_BUS@0 through
CPU_BUS@3 in i2cAdaptersFromCpu. This lets a platform_manager.json model devices
on the third and fourth CPU-direct i2c buses.

Running the config_validator_test which now verifies CPU_BUS@[0-3] are valid
while anything past that index is invalid.
@meta-cla meta-cla Bot added the CLA Signed label Jun 24, 2026
@anna-nexthop anna-nexthop marked this pull request as ready for review June 24, 2026 20:27
@anna-nexthop anna-nexthop requested a review from a team as a code owner June 24, 2026 20:27
@anna-nexthop anna-nexthop changed the title [Nexthop][PlatformManager] Support AMD CPU i2c buses C and D Jun 29, 2026
@meta-codesync

meta-codesync Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@somasun has imported this pull request. If you are a Meta employee, you can view this in D110123451.

Comment thread fboss/platform/platform_manager/I2cExplorer.cpp
Comment thread fboss/platform/platform_manager/I2cExplorer.cpp
Comment thread fboss/platform/platform_manager/ConfigValidator.cpp
Follow-up to address review feedback on expanding CPU bus usage:

- Update PlatformConfig.i2cAdaptersFromCpu Thrift docs to describe the
  full AMD virtual CPU bus mapping, consistent with kAmdAcpiPathToBusIndex
  in I2cExplorer (CPU_BUS@0..3 -> I2CB/I2CA/I2CC/I2CD).
- Add an explicit runtime check in I2cExplorer::resolveIntelCpuBusNums so
  that Intel platforms fail gracefully with a clear message when
  i2cAdaptersFromCpu is anything other than a single CPU_BUS@0 entry.
- Add IntelCpuBusConfigValidation unit test covering the invalid Intel
  virtual CPU bus configurations.
@facebook-github-tools

Copy link
Copy Markdown

@anna-nexthop has updated the pull request. You must reimport the pull request before landing.

@anna-nexthop anna-nexthop requested a review from somasun June 30, 2026 14:53
@meta-codesync meta-codesync Bot closed this in 4ea8fda Jun 30, 2026
@meta-codesync meta-codesync Bot added the Merged label Jun 30, 2026
@meta-codesync

meta-codesync Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@somasun merged this pull request in 4ea8fda.

@rabbit-nexthop rabbit-nexthop deleted the anna-nexthop.amd-cpu-i2c-cd branch July 1, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment