跳至主要内容

BMC 名詞表

彙整知識庫中所有 BMC / OpenBMC 筆記出現過的名詞。BMC 文章都集中在 BMC/ 資料夾,文章清單直接走側邊欄即可(這類不另做索引),本表用於從名詞反查回原始筆記


一、OpenBMC 架構與建置

專案與發行版

名詞說明出處
BMC (Baseboard Management Controller)主機板上獨立於 Host CPU 的管理控制器。通常是一顆 ARM SoC 跑嵌入式 Linux,即使 Host 關機仍持續運作bootupopenbmc_boot_flow
OpenBMCLinux Foundation 主導的開源 BMC 韌體專案,廣泛用於 ASPEED AST2500/AST2600、Nuvoton NPCM 等管理晶片openbmc_boot_flowopenbmc
Canopy (Canopy OpenBMC)建立在 OpenBMC upstream 之上的企業級發行版,由 BlindSpot Software GmbH 維護。類比關係:Linux Kernel → Ubuntu,OpenBMC → Canopyopenbmc_canopybmc
upstream-firstCanopy 的核心策略:每週 rebase OpenBMC 最新版本,而非長年維護分叉。好處是不脫節、bug 可回饋社群openbmc_canopybmc
Hardware CI每個 commit 都真的 build firmware、flash 到實體機(如 Coffee Lake + AST2600)開機並測 IPMI / Redfish / Sensor / GPIO,而不只跑 bitbake 與 unit testopenbmc_canopybmc
LTS (Long Term Support)Canopy 的長期維護版本(如 2026.06、2028.06),提供 security patch 與 bug fix,不像 upstream 只是不斷往前openbmc_canopybmc

D-Bus

名詞說明出處
D-BusOpenBMC 的服務溝通核心。所有服務(bmcweb、ipmid、entity-manager、sensor、logging)都掛在同一條 message bus 上互相取用資料dbusopenbmc_boot_flow
dbus-broker / dbus-daemon實際承載 message bus 的程式openbmc_boot_flow
object / interface / property / signalD-Bus 的四個基本概念:物件路徑、介面、屬性、訊號dbus
busctl查詢/操作 D-Bus 的命令列工具dbus
busctl tree列出某個 service 底下的物件樹(如 busctl tree xyz.openbmc_project.HwmonTempSensordbusopenbmc_boot_flow
busctl introspect檢視某物件提供哪些 interface / property / methoddbus
busctl call / busctl get-property呼叫 method/讀取屬性值dbusopenbmc_boot_flow
phosphor-dbus-interfacesOpenBMC 標準 D-Bus 介面定義的集中處openbmcai_bmc
xyz.openbmc_project.*OpenBMC D-Bus 命名空間。大小寫敏感,AI 產生的 code 常拼錯ai_bmc

服務

名詞說明出處
bmcweb實作 Redfish server 與 Web UI 的服務,把 D-Bus 上的資料對映成 Redfish 資源(HTTP/HTTPS)redfishopenbmc_boot_flow
entity-manager「描述硬體並動態探測」的服務。用 JSON 描述一塊板子有哪些 sensor/fan/FRU/電源,開機時依偵測結果決定啟用哪些設定entity_manager
ExposesEntity Manager JSON 中描述「該板提供哪些 sensor/裝置」的欄位entity_manager
ProbeEntity Manager 的探測條件,常用 FRU EEPROM 內容(如 PRODUCT_PRODUCT_NAME)比對,命中才套用該設定entity_manager
xyz.openbmc_project.Configuration.*探測成功後 Entity Manager 放上 D-Bus 的設定物件,供 dbus-sensors、phosphor-pid-control 等訂閱entity_manager
dbus-sensors訂閱 Entity Manager 設定、動態建立 sensor 的服務群entity_managersensor_porting
Entity Manager 的價值同一份 image 支援多種板型;新增硬體多半只要加 JSON,不必改 C++entity_manager

Yocto 建置

名詞說明出處
Yocto ProjectOpenBMC 用來產生 BMC firmware image 的嵌入式 Linux build 框架。不是發行版,而是「幫你組出自己發行版」的工具鏈yocto
bitbakebuild 引擎,解析 recipe、處理相依、跑各 task(fetch / compile / install / package)yocto
recipe (.bb)描述單一軟體怎麼抓原始碼、編譯、安裝yoctoopenbmc
.bbappend覆寫/擴充既有 recipe(常搭配 FILESEXTRAPATHS:prependSRC_URI += "file://xxx.patch" 打 patch)yoctoai_bmc
layer (meta-*)一組 recipe 與設定的集合,可疊加。OpenBMC 有 meta-phosphor、各廠 meta-<vendor> / meta-<board>yoctoopenbmc
image recipe定義最終要放進 rootfs 的套件集合yocto
machine / distro conf選硬體與發行版設定yocto
bitbake obmc-phosphor-imageOpenBMC 標準 image 的建置指令(前置 . setup <machine>)。產物在 tmp/deploy/images/<machine>/yocto
Buildroot另一套嵌入式建置系統,同樣往下產出 kernel / u-boot / driver / device tree。改 driver 通常只會動到 DriverDevice Tree 兩塊BMC/device_driver/_index.mdporting_pmbus_driver

Gerrit Workflow

名詞說明出處
GerritOpenBMC 上游採用的 code review 系統。與 GitHub PR 不同:以「每個 commit = 一個可審查的 change」為單位git
git review推送 change 到 Gerrit 的核心工具git
Change-Idcommit message 尾端由 commit-msg hook 產生的識別碼,同一個 change 的多次修訂共用它git
修訂既有 change改完後 git commit --amendgit review,會變成同一 change 的新 patch set,而不是新 changegit
Code-Review +2 / Verified +1Gerrit 的 review 分數。+2 才可合併,Verified +1 多由 CI 給git
Signed-off-by (DCO)每個 commit 都必須有,用 git commit -s 加上git

二、管理介面(IPMI / Redfish / SSE / SOL)

IPMI

名詞說明出處
IPMI傳統的伺服器管理協定,二進位格式、難擴充,正逐步被 Redfish 取代ipmiredfish
ipmidOpenBMC 處理 IPMI 協定的服務(KCS / LAN channel)openbmc_boot_flow
SDR (Sensor Data Record)IPMI 的感測器描述紀錄ipmiopenbmc_boot_flow
SEL (System Event Log)IPMI 的系統事件紀錄ipmisel_logger
FRU (Field Replaceable Unit)可現場更換的單元(主機板、電源、風扇背板)。每片板子放一顆 EEPROM,以 IPMI Platform Management FRU Information 格式存製造商、產品名、序號、part numberfruipmi
IPMI raw command直接送原始 byte 的指令,如 ipmitool raw 0x04 0x2d 0x01ipmiai_bmc
KCSKeyboard Controller Style,Host 與 BMC 間的 IPMI 傳輸介面之一。ipmid 無回應時常見原因就是 KCS 驅動問題openbmc_boot_flowmctp
IPMI LAN channel經網路下 IPMI 指令的通道,也可用來設定網路(相容舊工具)networkopenbmc_boot_flow

Redfish

名詞說明出處
RedfishDMTF 定義的 RESTful 管理介面標準,用 HTTPS + JSON 管理伺服器硬體,目標是取代 IPMI。資源導向、標準動詞 GET/POST/PATCH/DELETEredfish
/redfish/v1/根資源,透過 hyperlink 逐層瀏覽redfish
/redfish/v1/Systems主機資源:電源狀態、開關機、boot overrideredfish
/redfish/v1/Chassis機殼、感測器、電源/散熱redfish
/redfish/v1/ManagersBMC 本身。NTP 設定在 Managers/bmc/NetworkProtocolredfishntp
LogService / UpdateService / EventService / AccountServiceRedfish 常見的其他資源集合redfish
ComputerSystem.ResetRedfish 的開關機動作:POST /redfish/v1/Systems/system/Actions/ComputerSystem.Resetopenbmc_boot_flow

EventService 與 SSE

名詞說明出處
EventServiceRedfish 的事件訂閱機制,讓管理端不必一直輪詢(polling),改由 BMC 主動推送。資源根 /redfish/v1/EventServiceevent_service
SubscriptionPOSTEventService/Subscriptions 建立訂閱,帶 Destination(接收 URL)、EventTypes / RegistryPrefixes / ResourceTypes 過濾條件、Protocolevent_service
Push(webhook)遞送方式之一:BMC 主動 POST 到訂閱時登記的目標 URL。需要一個可被 BMC 連到的 URLevent_servicesse
SSE (Server-Sent Events)基於 HTTP 的單向串流(server → client)。client 開長連線,事件即時串流下來,免預先註冊 webhook destinationsseevent_service
text/event-streamSSE 的 MIME 型別。資料格式為 data: ... 後接空行,可帶 event:id:sse
SSE vs WebSocketSSE 較簡單(免自訂協定、瀏覽器可自動重連),但只能單向sse
Message RegistryRedfish 事件訊息的定義來源,OpenBMC 事件多半由 phosphor-logging 的 log 對映而來event_service

SOL(Serial over LAN)

名詞說明出處
SOL (Serial over LAN)把 host 序列埠資料轉封包、經網路傳送、再還原成串列資料,讓管理者不必實體接 serial cable 就能看 BIOS/POST 與 consolesolserial_over_lan
RMCP+Remote Management Control Protocol Plus。SOL 走 IPMI v2.0 的 RMCP+,相較舊版 RMCP 支援加密與更強的 session 驗證(RAKP 金鑰交換)solserial_over_lan
UDP port 623IPMI over LAN / RMCP+ 使用的連接埠solserial_over_lan
SOL 封包內容Payload Type = SerialOverLanSequence NumberData(真實串列字元)、ACK/NACKserial_over_lan
ipmitool sol activate / deactivate / info啟用/關閉/查詢 SOL session(需 -I lanplus 指定 IPMI v2.0 / RMCP+)solserial_over_lan
~.離開 SOL session 的預設跳脫序列sol
obmc-consoleOpenBMC 的 SOL console 轉發服務openbmc_boot_flow
Console RedirectionBIOS 設定,允許把畫面輸出轉導到串列埠serial_over_lan
Redfish ConsoleService現代 BMC 用 Redfish(如 WebSocket 串流)取代 IPMI SOL 的作法serial_over_lan

三、硬體存取與匯流排

I2C / SMBus

名詞說明出處
I2CBMC 存取板上晶片(sensor、EEPROM、CPLD、retimer)最主要的匯流排hardware
SMBus基於 I2C 的系統管理匯流排協定hardwareBMC/device_driver/_index.md
i2cdetect掃描 bus 上有哪些位址有裝置,也可用來查是否有 driver 佔用hardwarepmbus
UU vs 位址數字i2cdetect 輸出中:印出位址數字(如 63)代表 no device driver;印 UU 代表目前有 driver 佔用BMC/device_driver/_index.md
i2cget / i2cset / i2ctransfer直接對 I2C 裝置讀寫。-y 不詢問直接執行、-f 強制存取(即使已被 driver 佔用)hardwarefru
i2cget -fy 7 0x63 0x8c w讀 bus 7、位址 0x63、command 0x8c 的 word——驗證 driver 讀值最快的方式porting_pmbus_driver
13-0048sysfs 上 I2C 裝置的命名:bus 13 上位址 0x48 的裝置,路徑 /sys/bus/i2c/devices/13-0048fru
/sys/class/i2c-devI2C 在檔案系統上的介面路徑hardware
i2c topology / address table看 schematic 時要確認的兩件事:bus 怎麼接、每顆裝置的位址。schematic 的 bus 編號從 1 開始數schemanticporting_pmbus_driver
i2c-muxI2C 多工器,用來把一條 bus 擴展成多條子 bushotplug
i2c-hotplug在可熱插拔裝置(模組、cable card、riser)出現/消失時動態建立或移除 I2C bus 與 device node,不需重開機。由 presence GPIO 或 interrupt 觸發。重點是拔除時要乾淨移除,避免殘留 stale 的 /sys/bus/i2c/devices/...hotplug

PMBus

名詞說明出處
PMBus (Power Management Bus)建立在 SMBus 上的電源管理協定,用來讀電壓、電流、功率等pmbusBMC/device_driver/_index.md
PMBus 讀寫原語read byte / read word / write byte / write wordpmbus
PMBus 資料格式linear(m=1)與 direct 兩種。格式定義在 pmbus.hpmbusporting_pmbus_driver
Linear11浮點編碼格式:N = 高 5 bit 有號整數、Y = 低 11 bit 有號整數,實際值 = Y 乘以 2 的 N 次方BMC/device_driver/_index.mdai_bmc
direct format 的 m / b / Rdirect 格式需依公式填入三個係數:X = (1/m) * (Y * 10^(-R) - b),程式中設定 info->m[...]info->b[...]info->R[...]porting_pmbus_driver
pmbus_driver_infodriver 的核心結構。.pages 指定裝置支援幾個 page、.format[PSC_VOLTAGE_IN] 指定資料格式、.func[0] 用 functionality bitmask 啟用支援的 PMBus 指令porting_pmbus_driver
pmbus_do_probe(client, info)probe 流程的第二步:填完 pmbus_driver_info 後呼叫它交給 PMBus coreporting_pmbus_driver
pmbus_read_word_data()送 PMBus 指令讀取指定 register 的 16-bit word。另有 pmbus_read_byte_data()pmbus_write_word_data()porting_pmbus_driverBMC/device_driver/_index.md
.read_word_datadriver 的 word 讀取 handler,負責讀出 sensor 值porting_pmbus_driver
PMBUS_READ_VIN 等常數PMBus register 常數,定義在 pmbus.hporting_pmbus_driver
VIN / VOUT / POUT / IOUT 對照function bitmask PMBUS_HAVE_VIN → reg PMBUS_READ_VIN → sysfs in1;VOUT → in2;POUT → power2;IOUT → curr2porting_pmbus_driver
P = I * V 驗證porting 完成後,用輸入輸出值是否滿足此式、且落在 schematic 標示的範圍內來驗證porting_pmbus_driverpmbus
呼叫鏈user space(如 sensors)→ PMBus core → driver 的 read_word_data → 底層 I2C 送 command code → 取得 wordBMC/device_driver/_index.md

Device Driver 與 Device Tree

名詞說明出處
probedriver 與裝置配對成功時被呼叫的初始化函式,porting 的核心工作之一pmbusBMC/device_driver/_index.md
Kconfig定義 config 選項讓 kernel 能在 menuconfig 中辨識並啟用 driver。位置 linux/drivers/hwmon/pmbus/Kconfigporting_pmbus_driverBMC/device_driver/_index.md
defconfig預設設定檔(<linux>/arch/arm/configs/aspeed_<project>_defconfig)。y = 編進 kernel、m = 編成模組porting_pmbus_driver
Makefile 一行obj-$(CONFIG_SENSORS_XXX) += xxx.o,告訴編譯器 .config 有這個選項時要 buildporting_pmbus_driver
MODULE_DEVICE_TABLE(i2c, ...)宣告 driver 支援的 i2c device id 表porting_pmbus_driver
i2c_driver 結構.driver.name.of_match_table.probe_new.remove.id_table,最後用 module_i2c_driver() 註冊porting_pmbus_driver
dts / dtsi / dtb / dtcDevice Tree 的原始檔/可被 include 的片段/編譯後的 binary/編譯器device_tree
compatibledevice node 與 driver 配對的字串(如 "mps,mpc42013"),搭配 reg 指定 I2C 位址device_treeporting_pmbus_driverhwmon
binding yamldriver 的 device tree 文件,位置 linux/Documentation/devicetree/bindings/hwmon/...,用 $id / $schema / properties 描述device_treeporting_pmbus_driver
phandleDevice Tree 中指向另一個 node 的參照device_tree
device tree 階層.dts 逐層 include .dtsi,如 aspeed-<project>-<board>-evt.dts...-ast2600-<board>.dtsi...-swb.dtsi...-swb-i2c.dtsi。插入 node 前要先找對層級porting_pmbus_driver
i2c alias<board>-i2c-aliases.dtsi 中用 alias 為 bus 取固定編號,避免編號浮動BMC/device_driver/_index.md
linux-aspeedYocto 建置樹中 kernel 原始碼的位置(build/workspace/sources/linux-aspeeddevice_tree

GPIO / 中斷 / 其他匯流排

名詞說明出處
GPIO 工具組gpiodetect(列 controller)、gpioinfo(列 line)、gpioset / gpioget(寫/讀)。sysfs 路徑 /sys/class/gpiohardware
GPIO hog在 device tree 中宣告某支 GPIO 於開機時就被 kernel 佔用並設成固定狀態,不需 driver 或 user space 介入。常用於 enable、reset、power-good selecthog
gpio-hog 屬性標示該子節點是一個 hog;方向用 output-high / output-low / inputline-name 命名hog
hog 的取捨kernel 在 probe gpio controller 時就套用,早於大部分服務;但被 hog 的 pin 之後不能再被別的 driver/user space 請求。要動態控制就別用 hoghog
devmem直接讀寫實體記憶體位址(暫存器)的工具hardware
ADC類比數位轉換,BMC 用來讀電壓(AST2600 上的驅動為 aspeed-adchardwareopenbmc_boot_flow
SPI(single / dual / quad / octal)序列周邊介面,依資料線數量分級。BMC 的 U-Boot / kernel / rootfs 都放在 SPI Flash 上hardware
SCM / DCSCI板卡/模組類別代號hardware
IRQ (Interrupt Request)硬體通知 CPU 有事件發生,CPU 暫停當前工作轉去執行 irq handler,不必忙碌輪詢即可即時反應interrupt
/proc/interrupts觀察每個 IRQ 編號、各 CPU 上的觸發次數、中斷控制器與裝置名稱。watch -n1 cat /proc/interrupts 可看哪個中斷正頻繁觸發interrupt
top half硬體中斷 handler,在 interrupt context 執行:必須極短、不可睡眠,通常只做硬體 ack 與記錄interrupt
bottom half延後處理機制:softirq、tasklet、workqueue(其中 workqueue 跑在 process context,可睡眠interrupt
request_irq()driver 註冊中斷 handler。handler 回傳 IRQ_HANDLED(已處理)或 IRQ_NONE(非本裝置,用於共享 IRQ)interrupt

EEPROM / FRU 讀取

名詞說明出處
EEPROM存放 FRU 資訊的非揮發記憶體,掛在 I2C bus 上fruhardware
at24常見的 EEPROM kernel driver,綁定後會產生 eeprom sysfs 節點,可 hexdump -C eeprom 直接 dumpfru
i2ctransfer -y -f 13 w2@0x48 0x00 0x00 r128無 driver 時直接讀 EEPROM:對 bus 13、位址 0x48 先寫 2-byte 內部位址(word address),再連讀 128 bytesfru
Common HeaderFRU dump 開頭的區塊,內含指向 Chassis / Board / Product Info 各區塊的 offsetfru
ipmitool fru / frutool把 FRU raw bytes 解析成人類可讀欄位fru

板上元件

名詞說明出處
CPLDComplex Programmable Logic Device,板上可程式邏輯裝置,容量介於 GAL 與 FPGA 之間。非揮發(開機即運作,不需外部載入 bitstream)cpld
Power sequencingCPLD 的主要用途:依正確順序與時序拉起各組電源 rail,等 power-good 才進下一步。是開機流程中電源時序的關鍵一環cpld
Glue logic(膠合邏輯)把各晶片間零散的訊號整合、解碼cpld
presence / strap 讀取CPLD 彙整板上偵測訊號給 BMCcpld
in-system programmingCPLD firmware 可更新,BMC 有時負責在板上更新cpld
Retimer主動元件,把衰減的 PCIe 訊號重新取樣、重建(re-clock),恢復乾淨眼圖、延長可用走線距離。常見於 PCIe Gen4/Gen5 跨 riser、cable、backplane 的長通道retimer
redriver vs retimerredriver 只做類比等化/放大(不重生時脈);retimer 有 CDR,會完整重建訊號,等於一個新的訊號起點retimer
eye marginretimer 的訊號品質狀態,通常透過 I2C/SMBus 由 BMC 存取retimer
retimer 韌體更新BMC 常透過 I2C 或 PLDM (Type 5, firmware update) 更新並回報版本。通常需在特定 power state 下進行,避免影響鏈路retimer
tmp75常見的 I2C 溫度感測晶片,看 datasheet 與 address table 時的典型例子schemanticspechwmon
block diagram讀 spec / datasheet 時的入口,先看方塊圖再查暫存器spec

MCTP / PLDM

名詞說明出處
MCTPManagement Component Transport Protocol,DMTF 定義的傳輸協定,讓平台管理元件(BMC、NIC、SSD、retimer、GPU)在各種實體匯流排上交換管理訊息mctp
PMCIPlatform Management Communications Infrastructure,MCTP 所屬的 DMTF 標準家族mctp
EID (Endpoint ID)MCTP 的端點識別碼。MCTP 提供與底層匯流排無關的定址與封包傳送層mctp
bindingMCTP 可跑的實體層:SMBus/I2C、PCIe VDM、USB、Serial、KCSmctp
PLDMPlatform Level Data Model,跑在 MCTP 上的訊息類型,涵蓋 sensor、FRU、firmware updatemctpretimer
NC-SI over MCTP / SPDMMCTP 承載的其他訊息類型(SPDM 用於安全驗證)mctp
libmctp / mctpd / pldmdOpenBMC 中 MCTP 的函式庫與 daemon,負責建立端點、路由封包;pldmd 提供 PLDM over MCTP 支援mctpopenbmc_boot_flow

四、感測與熱控

hwmon 與 sensor

名詞說明出處
hwmonLinux 的 hardware monitoring 子系統,用統一介面把溫度、電壓、電流、風扇轉速、功率暴露到 user spacehwmonsensor_porting
/sys/class/hwmon/hwmonN/hwmon 的 sysfs 節點位置hwmon
temp1_input / in0_input / fan1_input / curr1_input / power1_inputhwmon 的命名慣例,值多為毫度/毫伏/毫安hwmonBMC/device_driver/_index.md
*_max / *_crit / *_label提供門檻與名稱的 hwmon 屬性hwmon
找 driver 落在哪個 hwmon逐一 cat /sys/class/hwmon/hwmon*/name 比對——hwmon 編號會浮動,不能寫死porting_pmbus_driver
driver define感測晶片(tmp75、adm1275、pmbus 裝置)的 kernel driver 註冊成 hwmon device,並定義提供哪些 channel/屬性hwmon
phosphor-hwmon讀 hwmon sysfs,把讀值轉成 D-Bus 上的 xyz.openbmc_project.Sensor.Valuehwmonopenbmc_boot_flow
xyz.openbmc_project.Sensor.Value感測器讀值在 D-Bus 上的標準介面,供 Redfish / IPMI / 風扇控制取用hwmonopenbmc_boot_flow
phosphor-sensor-svcs感測器讀值服務(溫度、電壓、風扇轉速)openbmc_boot_flow
sensor porting 的四個環節hwmon → dbus-sensors → entity manager → fru devicesensor_porting
感測器偵測流程Device Tree / JSON 設定 → Entity Manager → D-Bus 物件建立 → phosphor-hwmon 讀 /sys/class/hwmon/hwmon*/ → 數值更新至 D-Bus → bmcweb(Redfish Sensors)與 ipmid(IPMI SDR)取用openbmc_boot_flow

熱控

名詞說明出處
Thermal Management讀溫度感測器、依策略調整風扇轉速,在「不過熱」與「不吵/省電」之間取平衡thermal
thermal zone一個散熱分區,把一組熱源 sensor 與負責散熱的風扇綁在一起thermal
thermal margin vs absolute控制常用「距離上限還有多少度」而非絕對溫度,便於跨不同元件統一調控thermal
failsafesensor 失聯/逾時時,風扇拉到安全高轉速thermalpid_control
phosphor-pid-controlOpenBMC 的風扇/散熱閉迴路控制 daemon,依感測器讀值動態調整風扇 PWM,避免過熱也避免全速空轉pid_control
PID zone一個散熱分區,包含一組輸入 sensor 與輸出風扇pid_control
thermal PIDtemp -> margin/setpoint:讀溫度算出目標pid_control
fan PIDfan -> pwm:以風扇轉速(RPM)為回授做閉迴路pid_control
Stepwise查表式的非 PID 控制方式pid_controlthermal
PID 參數proportionalCoeff(P)、integralCoeff(I)、derivativeCoeff(D)、setpointsamplePeriodpid_control
設定來源的演進傳統用 /etc/phosphor-pid-control/config.json;現多改由 Entity Manager 產生的 D-Bus 設定動態載入(config type:PidPid.ZoneStepwiseFanpid_controlthermal
phosphor-fan-presence風扇存在偵測與轉速控制服務openbmc_boot_flow
pwm-fankernel 的風扇控制驅動openbmc_boot_flow
Linux thermal frameworkkernel 自己的散熱框架:/sys/class/thermal/thermal_zoneN/、trip point、cooling device。視平台是否採用thermal
Redfish Chassis/.../Thermal對外呈現溫度與風扇狀態的資源(新版為 ThermalSubsystemthermal

五、事件與 Log

名詞說明出處
Event LogOpenBMC 的事件/錯誤紀錄機制,把硬體與系統事件記成結構化 log,供本機除錯與遠端(Redfish)查詢event_log
phosphor-logging核心服務,提供建立與儲存 log 的 D-Bus 介面(xyz.openbmc_project.Loggingevent_logopenbmc
log entry 欄位SeverityMessage、時間戳、AdditionalData(key=value 附加資訊)event_log
lg2 / elog開發者用來產生 log 的 APIevent_log
callout嚴重事件可帶的附加資訊,指出故障零件event_log
/xyz/openbmc_project/logging/entry/*D-Bus 上的 log entry 路徑,可用 busctl 查詢event_log
Redfish LogService對外讀取事件的介面:/redfish/v1/Systems/system/LogServices/EventLog/Entriesevent_log
phosphor-log-manager系統事件記錄服務(SEL / Event Log)openbmc_boot_flow
phosphor-sel-logger專責產生並維護 IPMI SEL 的服務:監聽 D-Bus 事件(sensor threshold 觸發等),寫成 IPMI SEL entry(含 sensor type、event data、時間戳)sel_logger
ipmitool sel list / sel clear查詢/清除 SEL 的傳統工具指令sel_logger
/xyz/openbmc_project/Logging/IPMID-Bus 上 SEL entry 的相關路徑sel_logger
sel-logger vs phosphor-loggingphosphor-logging 是通用的 OpenBMC event/error log;sel-logger 專責產生「IPMI 相容」的 SEL 格式sel_logger
journal / journaldsystemd 的底層 daemon log,用 journalctl 查看event_logsystemd

六、開機流程

階段

階段說明出處
Boot ROM(Chip ROM)SoC 內建不可修改的程式碼,CPU Reset 後從固定位址開始執行(AST2600 的 reset vector 為 0x00000000)。初始化最基本時鐘與 SRAM、決定 boot source、把 U-Boot SPL 複製到內部 SRAMopenbmc_boot_flowbootup
U-Boot SPL (Secondary Program Loader)SoC 剛上電時只有內部 SRAM(64KB ~ 256KB)容不下完整 U-Boot,因此先跑輕量 SPL:初始化 DRAM Controller(DDR4 training),把 U-Boot Proper 載入 DRAMopenbmc_boot_flow
U-Boot Proper初始化周邊(NCSI/RGMII 網路、USB、I2C、SPI、GPIO)、讀環境變數、從 SPI Flash 讀 FIT Image、傳 DTB 給 kernel、設 kernel cmdline。可透過序列埠中斷進入 console 手動下指令openbmc_boot_flowbootup
Linux Kernel解壓縮 zImage → 讀 DTB 識別硬體 → 初始化驅動 → 從 MTD 掛載 SquashFS rootfs → 執行 /sbin/initopenbmc_boot_flowbootup
rootfs掛載根檔案系統後執行 init(OpenBMC 用 systemd),啟動 Redfish、IPMI、感測器監控等服務,BMC 正式可運作bootup

相關名詞

名詞說明出處
BMC boot vs Host boot兩條相互獨立的路徑。BMC 在 Host 開機前數秒到數十秒先完成啟動,之後持續運行等待 power on 指令openbmc_boot_flow
+5VSB(Standby Power)主機板插上 AC 後 ATX 輸出的待機電壓。BMC 先上電,Host CPU 仍 Power Offopenbmc_boot_flow
SCU (System Control Unit)ASPEED 的暫存器區,決定 Boot Strap(開機引腳配置),可設定從 SPI / UART / eMMC 開機openbmc_boot_flow
zImage壓縮過的 ARM Linux kernel image,前段的解壓縮 stub 會先把自己解開再啟動真正的 kernelbootupopenbmc_boot_flow
uImage含 u-boot header 的 kernel imagebootupopenbmc_boot_flow
FIT Image (Flattened Image Tree)把 kernel + DTB + initramfs 打包成一個檔,OpenBMC 的標準作法openbmc_boot_flowbootup
bootcmd / bootargsU-Boot 環境變數。典型 flashbootsf probe && sf read ... && bootm ${loadaddr}openbmc_boot_flow
kernel cmdlineconsole=ttyS4,115200n8(UART console)、rootfstype=squashfsroot=/dev/mtdblock4rwopenbmc_boot_flow
Flash layout(典型)SPI Flash(通常 128MB)依序放:U-Boot SPL(~64KB)→ U-Boot Proper(~512KB)→ U-Boot Env(~64KB)→ Linux Kernel FIT Image(~8MB)→ RootFS(剩餘空間)openbmc_boot_flow
Dual Flash / Dual Image (A/B)Flash A 正常使用、Flash B 備援,供 OTA 更新或 Flash A 損壞時切換(fail-safe)。U-Boot 讀 GPIO 或環境變數決定從哪個 image 開機openbmc_boot_flowbootup
SquashFS / UBIFS / OverlayFSrootfs 以 SquashFS(唯讀,在 Flash 上) 搭配 UBIFS / tmpfs(可讀寫層),透過 OverlayFS 對上層呈現統一可讀寫視圖。因此韌體更新不影響使用者設定工廠重置 = 清除可讀寫層openbmc_boot_flow
initramfs開機時的暫時根檔案系統(OpenBMC 中為可選)openbmc_boot_flow
ASPEED AST2500 / AST2600最常見的 BMC SoC。AST2500 為 ARM Cortex-A7、AST2600 為 Cortex-A7 雙核,OpenBMC 主線 kernel 6.xopenbmc_boot_flowbootup
Nuvoton NPCM750 / NPCM845另一系列 BMC SoC,分別為 Cortex-A9 / Cortex-A35openbmc_boot_flow
aspeed-i2c / aspeed-adc / aspeed-vuartAST 平台的 kernel 驅動:I2C bus、電壓感測器、Virtual UART(SOL 用)openbmc_boot_flow
phosphor-state-manager管理 Host 電源狀態的服務。Redfish/IPMI 的開機請求最後會由它去控制 GPIO 的 PWRON#(電源按鈕訊號)openbmc_boot_flow
Power Restore PolicyAlwaysOff(BMC 就緒後 Host 保持關機)/AlwaysOn(自動開啟 Host)/LastState(恢復斷電前狀態)openbmc_boot_flow

systemd

名詞說明出處
systemd (PID 1)OpenBMC 的 init 系統,管理所有服務的啟動順序與相依關係systemdopenbmc_boot_flow
service / targetsystemd 的兩個基本單位:服務本身/同步點(一組服務的集合)systemd
unit 檔案位置/etc/systemd/(設定)與 /lib/systemd/system/(系統 service 檔案)systemdopenbmc_boot_flow
標準 target 順序sysinit.targetbasic.targetnetwork.targetmulti-user.target(bmcweb、ipmid、phosphor-log-manager、entity-manager、phosphor-fan-presence…)openbmc_boot_flow
OpenBMC 特有 targetobmc-standby.target(BMC 就緒、Host 仍關機)、obmc-chassis-on@0.target(Host 開機中)、obmc-host-on@0.targetobmc-host-off@0.targetopenbmc_boot_flow

Flash 燒錄

名詞說明出處
MTD (Memory Technology Device)Linux 的 flash 裝置抽象層,rootfs 從 /dev/mtdblockN 掛載flashopenbmc_boot_flow
flashcp / flash_erase / nand write / dd更新 BMC flash 的常用工具flash
dd 拼 image依 offset 把 u-boot(seek=65536)、uImage(seek=524288)、dtb(seek=12689408)分別寫進同一個 image 檔(conv=notrunc bs=1porting_pmbus_driver
上板燒錄scp image 到 BMC 的 /var/,再 dd if=... of=/dev/mtdblock0 bs=64k seek=0rebootporting_pmbus_driver

七、系統服務與網路

名詞說明出處
phosphor-networkdOpenBMC 的網路管理服務(daemon 名 xyz.openbmc_project.Network),負責 IP、DNS、hostname、VLAN、NTP 設定,並透過 D-Bus 曝露給 Redfish / IPMInetwork
systemd-networkd底層實際管理 .network 設定的服務network
/xyz/openbmc_project/network/<interface>網路設定的 D-Bus 物件路徑network
Redfish EthernetInterfaces對外讀寫網路設定的資源(static / DHCP IPv4、IPv6、gateway、DNS、hostname、MAC、VLAN)network
NTP與外部時間伺服器對時。BMC 常無 RTC 電池或會漂移,NTP 對 event log、SEL、憑證有效期的時間戳一致性很重要ntp
systemd-timesyncd輕量 SNTP client,底層負責向 NTP server 對時ntp
phosphor-time-managerOpenBMC 的時間管理服務,D-Bus 介面為 xyz.openbmc_project.Time.*ntp
TimeSyncMethod時間模式:NTP(由 NTP server 決定,timesyncd 生效)/Manual(手動設定,停用 NTP)ntp
Redfish Managers/bmc/NetworkProtocol設定 NTP server 與 NTP 開關的資源ntp

八、除錯與測試

除錯

名詞說明出處
BMC 除錯的限制資源有限(記憶體小、無 GUI),因此靠遠端 gdbserver 動態除錯與事後 coredump 分析debug
gdbserverBMC 端只跑輕量的 gdbserver(gdbserver :2345 /usr/bin/my-daemongdbserver :2345 --attach <pid>),完整 gdb 跑在開發主機上debug
cross gdb + target remote開發主機用對應 target 的 cross gdb(如 arm-linux-gnueabi-gdb)連線:target remote <bmc-ip>:2345debug
coredump analysiscrash 時保留 core 檔,事後 gdb /path/to/binary /path/to/corebt 印 backtrace 找 crash 位置。需先 ulimit -c unlimiteddebug
debug symbol / strip分析時務必用帶 debug symbol 的未 strip 版本 binary,backtrace 才能對應到原始碼行號debug
systemd-coredump / coredumpctlOpenBMC 多以 systemd-coredump 收集 core,用 coredumpctl list / coredumpctl gdb 取用debug
dmesg查 kernel log,如 dmesg | grep -i "i2c|aspeed|sensor"BMC/device_driver/_index.mdopenbmc_boot_flow
journalctljournalctl -b(本次開機所有 log)、-u bmcweb(特定服務)、-f(即時追蹤)openbmc_boot_flowsystemd
systemctl list-units --failed列出啟動失敗的服務。也可用 systemctl list-units "phosphor*" "obmc*" "bmcweb*" 看 OpenBMC 服務群openbmc_boot_flow

常見開機失敗原因

現象可能原因出處
U-Boot 無輸出SPI Flash 損壞、Boot ROM 無法讀取 SPLopenbmc_boot_flow
Kernel panicDTB 錯誤、RootFS 損壞、MTD partition 錯誤openbmc_boot_flow
bmcweb 無法連線網路設定錯誤、憑證問題、服務啟動失敗openbmc_boot_flow
感測器無數據entity-manager 設定檔錯誤、I2C 裝置無回應openbmc_boot_flow
IPMI 無回應ipmid 服務崩潰、KCS 驅動問題openbmc_boot_flow

測試

名詞說明出處
test plan(測試計畫)測試前先定義測試範圍、對象版本、測試環境(硬體平台、連線方式)、通過標準與各項 test case。讓測試有依據且可重複testing
functional testing(功能測試)依 test plan 逐項驗證:IPMI/Redfish 指令回應、感測器讀值、遠端開關機/SOL/韌體更新流程。偏重「行為是否符合預期輸出」,而非內部實作testing
report(測試報告)彙整每個 test case 的 pass/fail、實際結果、log 與環境資訊,作為版本是否可釋出的判斷依據testing
stress / regression / recovery test完整驗證常再加上:長時間穩定度、回歸測試、斷電/更新失敗還原testing
Robot Framework (robot)OpenBMC 上撰寫自動化測試腳本的工具testing

AI 輔助開發

名詞說明出處
適合用 AI 的場景查 IPMI / PMBus spec、寫 driver 骨架(probe / Kconfig / Makefile 模板)、解讀 dmesg / journalctl 錯誤、理解 Yocto recipe、寫 D-Bus interface、產 Redfish 測試腳本ai_bmc
AI 產出必須驗證的三處①Kernel API 版本差異大(OpenBMC 常用 5.15 / 6.1)②PMBus 的 page / phase 參數容易出錯,務必對照 datasheet ③xyz.openbmc_project.* 大小寫敏感,AI 常拼錯ai_bmc

九、資料中心與叢集

名詞說明出處
cluster(叢集)資料中心的組織單位,透過高速網路把大量伺服器組成一個運算/儲存整體data_center
headnode(管理/登入節點)又稱 management node 或 login node。負責使用者登入、作業排程、監控與部署,是進入叢集的入口,通常不跑重負載運算data_center
compute node(運算節點)實際執行運算的主力機器,數量最多。通常無狀態(stateless),由 headnode 統一開機與派工data_center
storage node(儲存節點)提供共享儲存,常搭配分散式/平行檔案系統(Ceph、Lustre、NFS),讓各 compute node 共用同一份資料data_center
job schedulerheadnode 上的作業排程器,如 Slurm、PBSdata_center
out-of-band 管理每個節點內建 BMC,透過獨立的管理網路(IPMI/Redfish)遠端開關機、監控感測器、更新韌體,不必實體接觸機器data_center