Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

platform_manager: add DARWIN48V platform support #260

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

adamcalabrigo
Copy link
Contributor

@adamcalabrigo adamcalabrigo commented Oct 8, 2024

Description

Adds initial platform_manager support for DARWIN48V platform. Note that this depends on the changes in #257.

Test Plan

FBOSS OSS build passes with CentOS 9 and Linux kernel 6.4.

Verified on DARWIN48V hardware.

The platform_manager service loads correctly:

# systemctl status platform_manager
● platform_manager.service - FBOSS Platform Manager
     Loaded: loaded (/etc/systemd/system/platform_manager.service; enabled; preset: disabled)
     Active: active (running) since Tue 2024-10-08 00:39:22 UTC; 1h 36min ago
    Process: 4744 ExecStartPre=/bin/bash -c [[ -f /opt/fboss/share/platform_configs/platform_manager.json ]] (code=exited, status=0/SUCCESS)
   Main PID: 4745 (platform_manage)
      Tasks: 32 (limit: 200901)
     Memory: 4.8M
        CPU: 1.263s
     CGroup: /system.slice/platform_manager.service
             └─4745 /opt/fboss/bin/platform_manager -config-file /opt/fboss/share/platform_configs/platform_manager.json -noenable_pkg_mgmnt --run_once=false -reload_kmods=true

Device drivers are loaded correctly:

platform_manager[4745]: I1008 00:39:13.172131  4745 PlatformNameLib.cpp:50] Getting platform name from bios using dmedicode ...
platform_manager[4745]: I1008 00:39:13.176679  4745 PlatformNameLib.cpp:58] Platform name inferred from bios: DARWIN48V
platform_manager[4745]: I1008 00:39:13.176695  4745 PlatformNameLib.cpp:60] Platform name mapped: DARWIN48V
platform_manager[4745]: I1008 00:39:13.191271  4745 ConfigLib.cpp:48] Using config file: /opt/fboss/share/platform_configs/platform_manager.json
platform_manager[4745]: I1008 00:39:13.191517  4745 ConfigValidator.cpp:247] Validating the config
platform_manager[4745]: I1008 00:39:13.191532  4745 ConfigValidator.cpp:270] Validating SlotTypeConfig for Slot FAN_SLOT...
platform_manager[4745]: I1008 00:39:13.191537  4745 ConfigValidator.cpp:270] Validating SlotTypeConfig for Slot PSU_SLOT...
platform_manager[4745]: I1008 00:39:13.191542  4745 ConfigValidator.cpp:270] Validating SlotTypeConfig for Slot RACKMON_SLOT...
platform_manager[4745]: I1008 00:39:13.191599  4745 ConfigValidator.cpp:270] Validating SlotTypeConfig for Slot SMB_SLOT...
platform_manager[4745]: I1008 00:39:13.191607  4745 ConfigValidator.cpp:278] Validating PmUnitConfig for PmUnit FAN in Slot FAN_SLOT...
platform_manager[4745]: I1008 00:39:13.191612  4745 ConfigValidator.cpp:278] Validating PmUnitConfig for PmUnit PSU in Slot PSU_SLOT...
platform_manager[4745]: I1008 00:39:13.191632  4745 ConfigValidator.cpp:278] Validating PmUnitConfig for PmUnit RACKMON in Slot RACKMON_SLOT...
platform_manager[4745]: I1008 00:39:13.191663  4745 ConfigValidator.cpp:278] Validating PmUnitConfig for PmUnit SMB in Slot SMB_SLOT...
platform_manager[4745]: I1008 00:39:13.191844  4745 PkgManager.cpp:133] Loading 1 upstream kernel modules
platform_manager[4745]: I1008 00:39:13.191868  4745 PkgManager.cpp:251] Running command (modprobe i2c-i801)
platform_manager[4745]: I1008 00:39:13.195616  4745 PkgManager.cpp:103] Unloading 8 kernel modules
platform_manager[4745]: I1008 00:39:13.195632  4745 PkgManager.cpp:235] Running command (modprobe --remove scd)
platform_manager[4745]: I1008 00:39:13.198867  4745 PkgManager.cpp:235] Running command (modprobe --remove scd-leds)
platform_manager[4745]: I1008 00:39:13.202218  4745 PkgManager.cpp:235] Running command (modprobe --remove scd-smbus)
platform_manager[4745]: I1008 00:39:13.205467  4745 PkgManager.cpp:235] Running command (modprobe --remove scd-spi)
platform_manager[4745]: I1008 00:39:13.208951  4745 PkgManager.cpp:235] Running command (modprobe --remove rook-fan-cpld)
platform_manager[4745]: I1008 00:39:13.212357  4745 PkgManager.cpp:235] Running command (modprobe --remove blackhawk-cpld)
platform_manager[4745]: I1008 00:39:13.215636  4745 PkgManager.cpp:235] Running command (modprobe --remove aslg4f4527)
platform_manager[4745]: I1008 00:39:13.219003  4745 PkgManager.cpp:235] Running command (modprobe --remove bp4a_lm90)
platform_manager[4745]: I1008 00:39:13.222334  4745 PkgManager.cpp:109] Unloading 1 shared kernel modules
platform_manager[4745]: I1008 00:39:13.222348  4745 PkgManager.cpp:235] Running command (modprobe --remove scd)
platform_manager[4745]: I1008 00:39:13.225586  4745 PkgManager.cpp:119] Loading 1 shared kernel modules
platform_manager[4745]: I1008 00:39:13.225606  4745 PkgManager.cpp:251] Running command (modprobe scd)
platform_manager[4745]: I1008 00:39:13.229639  4745 PkgManager.cpp:125] Loading 8 kernel modules
platform_manager[4745]: I1008 00:39:13.229663  4745 PkgManager.cpp:251] Running command (modprobe scd)
platform_manager[4745]: I1008 00:39:13.233338  4745 PkgManager.cpp:251] Running command (modprobe scd-leds)
platform_manager[4745]: I1008 00:39:13.238973  4745 PkgManager.cpp:251] Running command (modprobe scd-smbus)
platform_manager[4745]: I1008 00:39:13.242845  4745 PkgManager.cpp:251] Running command (modprobe scd-spi)
platform_manager[4745]: I1008 00:39:13.246577  4745 PkgManager.cpp:251] Running command (modprobe rook-fan-cpld)
platform_manager[4745]: I1008 00:39:13.250410  4745 PkgManager.cpp:251] Running command (modprobe blackhawk-cpld)
platform_manager[4745]: I1008 00:39:13.254255  4745 PkgManager.cpp:251] Running command (modprobe aslg4f4527)
platform_manager[4745]: I1008 00:39:13.258023  4745 PkgManager.cpp:251] Running command (modprobe bp4a_lm90)

Note that platform_manager reports one error while reading the firmware version of one CPLD: this is because the CPLD symlink is mapped to /run/devmap/cplds/ for compatibility with existing DARWIN udev rules:

platform_manager[4745]: I1008 00:39:22.590662  4745 PlatformExplorer.cpp:733] Reporting firmware version for BLACKHAWK_CPLD - version string:13.7 ODS value:13007
platform_manager[4745]: I1008 00:39:22.590759  4745 PlatformExplorer.cpp:733] Reporting firmware version for FAN_CPLD - version string:4.0 ODS value:4000
platform_manager[4745]: E1008 00:39:22.590822  4745 PlatformFsUtils.cpp:128] Received error code 2 from reading from path /run/devmap/cplds/ROOK_CPU_CPLD/cpld_ver: No such file or dir>
platform_manager[4745]: E1008 00:39:22.590833  4745 PlatformExplorer.cpp:123] Failed to open firmware version file /run/devmap/cplds/ROOK_CPU_CPLD/cpld_ver: No such file or directory
platform_manager[4745]: E1008 00:39:22.590853  4745 PlatformFsUtils.cpp:128] Received error code 2 from reading from path /run/devmap/cplds/ROOK_CPU_CPLD/cpld_sub_ver: No such file or>
platform_manager[4745]: E1008 00:39:22.590863  4745 PlatformExplorer.cpp:123] Failed to open firmware version file /run/devmap/cplds/ROOK_CPU_CPLD/cpld_sub_ver: No such file or direct>
platform_manager[4745]: I1008 00:39:22.590872  4745 PlatformExplorer.cpp:733] Reporting firmware version for ROOK_CPU_CPLD - version string:0.0 ODS value:0
platform_manager[4745]: I1008 00:39:22.590973  4745 PlatformExplorer.cpp:733] Reporting firmware version for SCD_FPGA - version string:14.6 ODS value:14006

@facebook-github-bot
Copy link
Contributor

@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@adamcalabrigo has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@adamcalabrigo has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@adamcalabrigo has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@somasun
Copy link
Contributor

somasun commented Nov 15, 2024

Note that platform_manager reports one error while reading the firmware version of one CPLD: this is because the CPLD symlink is mapped to /run/devmap/cplds/ for compatibility with existing DARWIN udev rules

Could ROOK_CPU_CPLD be put under /run/devmap/fpgas? Would the firmware reporting be accurate in that case? Am I overlooking any other issue?

Comment on lines +318 to +321
"pluggedInSlotType": "FAN_SLOT",
"i2cDeviceConfigs": [],
"outgoingSlotConfigs": {},
"pciDeviceConfigs": []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there no devices on the FAN PmUnit/FRU ?

"pmUnitName": "SMB"
},
"FAN_SLOT": {
"numOutgoingI2cBuses": 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the fans have any presence detection and/or IDPROM ?

Comment on lines +25 to +26
"numOutgoingI2cBuses": 1,
"pmUnitName": "PSU"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the PSUs have any presence detection and/or IDPROM ?

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

Successfully merging this pull request may close these issues.

3 participants