Newer
Older
**Warning: A known issue on FVP RDV3R1 model, PoC demo not avaiable at this moment. Will fix in next release of FVP RDV3R1 model.**
This repository provides scripts and documentation for reproducing a proof of concept utilising OpenBMC and Arm FVP platform to run IPMI and PLDM/MCTP communication.
These scripts have been tested with Ubuntu 22.04 Jammy (LTS) and details instructions to build and run OpenBMC and Arm FVP platform.
The demo uses two separate software stacks to verify the communication channels. In this example, RD-V3-R1 acts as our Reference Platform and Base-FVP as the BMC.
And we will showcase below communication channels.
* IPMI Communication
* PLDM/MCTP Communication (Sensor Reading and CPER Event)
* Redfish Communication
Host machine recommended hardware configuration:
* 500GB SSD drive
* 64GB RAM
Two communication channels, In-Band and Side-Band interface, between OpenBMC and FVP RDV3R1 and both channels communication are over the serial interface as listed below.
* In-band communication uses the IPMI over Serial protocol between the Application Processors (AP) and the BMC. Currently, this method is only supported by edk2 and isn’t available under a Linux OS.
* Side-Band Communication uses the PLDM and MCTP over Serial protocol between the Management Control Processor (MCP) and the BMC.
AP debug console
|
+--------------------------+ +-------------------------+
| Base FVP | | Neoverse RD-V3-R1 FVP |
| | | |
| | | ______________ |
| | | | | |
| /dev/ttyAMA2 |--------- IPMI over UART ---------|----| AP | |
| | | |______________| |
| | | |
| | | |
| | PLDM over | |
| | MCTP over +-------+ +-------+
Redfish--| /dev/ttyAMA1 |-------------- UART --------------| MCP | | SCP |
+--------------------------+ (terminal_1) (terminal_0) +-------+---------+-------+
| | |
FVP debug console | debug console
(terminal_0) | (terminal_uart_scp)
debug console
(terminal_uart_mcp)
Run the "build.sh" scripts with parameter to automatically fetch the sources and then build the images for FVP RDV3R1 and OpenBMC.
Need to run "./build.sh setup" to fetch the source code first, then to run "./build.sh build" to build the images.
Setup and build PLDM Sensor and Event PoC on Arm FVP
parameters:
setup Download the required source code and apply the patch sets
build Build the required image for Arm FVP
clean Remove the source code
```
```bash
ubuntu-user:~$ ./build.sh setup
ubuntu-user:~$ ./build.sh build
```
**Note:** If you run into out-of-memory errors, you can restrict the number of build threads by adding the following settings to `./openbmc/build/fvp/local.conf`:
```
BB_NUMBER_THREADS = "16"
PARALLEL_MAKE = "-j16"
```
Execute the `run.sh` script with the full path of FVP model to launch the OpenBMC and FVP RDV3R1 demo.
This will open several console windows including the OpenBMC FVP console, the terminal_uart_mcp console, and the terminal_uart_ns_uart0 (AP) console.
Once everything is up and running, you’ll see the message `MCTP discovery success` that indicates you’re ready to start testing the communication channels.
To exit the PoC demo by pressing Ctrl+c to exit the PoC demo.
If you encounter the message `MCTP discovery failed`, then log into the OpenBMC console and run `systemctl restart mctp-local` to retry the MCTP discovery process.
```bash
ubuntu-user:~$ ./run.sh
Usage: ./run.sh [-m <fvp_model_path>] [-h]
-m FVP_MODEL
-h show this help
```
```bash
ubuntu-user:~$ ./run.sh -m /home/workstation/FVP_RD_V3_R1/models/Linux64_GCC-9.3/FVP_RD_V3_R1
```
Find more detial for manually setup
* https://github.com/openbmc/openbmc/blob/master/meta-evb/meta-evb-arm/meta-evb-fvp-base/README.md
* https://neoverse-reference-design.docs.arm.com/en/latest/features/bmc.html
**Note:**
- There are two terminal_uart_mcp windows available. Use the one repeatedly prints the PLDM/MCTP logs.
- OpenBMC default username is `root` and password is `0penBmc`.
### SSH
SSH server runs in OpenBMC is port number 4222. To SSH into the OpenBMC, executing below command on the Ubuntu terminal.
```bash
ubuntu-user:~$ ssh -p 4222 root@localhost
```
### Redfish APIs
HTTPs server runs in OpenBMC is port number 4223. To access Redfish APIs, executing below command on the Ubuntu machine terminal.
```bash
ubuntu-user:~$ curl -k -u root:0penBmc -X GET https://127.0.0.1:4223/redfish/v1/
```
### IPMI Functionality
#### Sample EDK2 DXE driver
A sample dxe driver is included in the edk2-platforms to demonstrate the usage of IPMI in an edk2 driver. It gets the IP address and Subnet mask from the BMC and prints the below log during the boot.
```
Loading driver at 0x000F2135000 EntryPoint=0x000F2137134 IpmiSerialDxe.efi
Device ID Response : CC 0, Device ID 0, Revision 0
BMC IP : 172.20.51.1
BMC IP Subnet Mask: 255.255.255.0
```
### IPMI Commandline Application
A sample commandline app named ipmiutil is ported from Ampere’s implementation. It can be used to send any IPMI raw command to the BMC. It is executed from the UEFI shell.
To enter into UEFI shell, Below is a sample IPMI command executed in the UEFI shell.
```
Shell> ipmiutil -r 0x6 0x46 0x1
72 6F 6F 74 00 00 00 00 00 00 00 00 00 00 00 00 C1
```
### PLDM Functionality
#### PLDM Daemon
Log in to the OpenBMC terminal with username `root` and password `0penBmc`, then run the command below to list all sensors that PLDM can access:
```bash
root@fvp:~# busctl tree xyz.openbmc_project.PLDM
`- /xyz
`- /xyz/openbmc_project
|- /xyz/openbmc_project/inventory
| `- /xyz/openbmc_project/inventory/system
| `- /xyz/openbmc_project/inventory/system/board
| `- /xyz/openbmc_project/inventory/system/board/SatMC
| `- /xyz/openbmc_project/inventory/system/board/SatMC/SatMC_CoreTemp
|- /xyz/openbmc_project/pldm
|- /xyz/openbmc_project/sensors
| `- /xyz/openbmc_project/sensors/temperature
| `- /xyz/openbmc_project/sensors/temperature/SatMC_CoreTemp
`- /xyz/openbmc_project/software
```
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
**Note:** If you didn't see any detected sensor, then run `systemctl restart mctp-local` to restart the MCTP discovery process.
#### PLDM Sensor Reading
A sample temperature sensor is implemented in the MCP firmware.
When PLDM initializes between the platform and the BMC, the sensor’s PDR (Platform Descriptor Record) is sent to the BMC, which then polls the sensor reading at the interval specified in `update_interval`.
The sensor value will increment everytime the BMC polls for the sensor value.
To retrieve the sensor reading with Redfish APIs, use the following Redfish command:
```
ubuntu-user:~$ curl -k -u root:0penBmc -X GET https://localhost:4223/redfish/v1/Chassis/SatMC/Sensors/temperature_SatMC_CoreTemp
{
"@odata.id": "/redfish/v1/Chassis/SatMC/Sensors/temperature_SatMC_CoreTemp",
"@odata.type": "#Sensor.v1_2_0.Sensor",
"Id": "temperature_SatMC_CoreTemp",
"Name": "SatMC CoreTemp",
"Reading": 17.0,
"ReadingRangeMax": 255.0,
"ReadingRangeMin": 0.0,
"ReadingType": "Temperature",
"ReadingUnits": "Cel",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}
```
#### PLDM CPER Event
A sample CPER record can be sent from the MCP firmware to the BMC.
To do this, execute the below command in the MCP terminal window terminal_uart_mcp that repeatedly prints the PLDM/MCTP logs.
**Note:** To enter MCP Debug Prompt by pressing Ctrl+e on MCP debug console. To exit MCP Debug Prompt by pressing Ctrl+c on MCP debug console.
```
[CLI_DEBUGGER_MODULE] Entering CLI
> pldm cper
[PLDM FW] Send Platform Event Message - CPER ...
>
```
To retrieve the CPER event information and download CPER event logs with Redfish APIs, use the following Redfish command:
```
ubuntu-user:~$ curl -k -u root:0penBmc -X GET https://localhost:4223/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/1
{
"@odata.id": "/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/1",
"@odata.type": "#LogEntry.v1_11_0.LogEntry",
"AdditionalDataSizeBytes": 104,
"AdditionalDataURI": "/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/1/attachment",
"Created": "2024-12-20T00:46:04.280600+00:00",
"DiagnosticDataType": "CPER",
"EntryType": "Event",
"Id": "1",
"Name": "FaultLog Dump Entry"
}
```
```
ubuntu-user:~$ curl -k -u root:0penBmc -X GET https://localhost:4223/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/1/attachment | base64 -d | hexdump -C
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 140 100 140 0 0 208 0 --:--:-- --:--:-- --:--:-- 208
00000000 48 00 00 00 20 00 00 00 00 01 00 00 00 00 00 00 |H... ...........|
00000010 16 3d 9e e1 11 bc e4 11 9c aa c2 05 1d 5d 46 b0 |.=...........]F.|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 00 00 00 00 00 00 02 02 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 00 00 00 78 56 34 12 cd ab ba dc |........xV4.....|
00000060 01 02 03 04 05 06 07 08 |........|
00000068
```
## Referece
* Neoverse Reference SW : https://neoverse-reference-design.docs.arm.com/en/latest/features/bmc.html
* OpenBMC FVP Base : https://github.com/openbmc/openbmc/blob/master/meta-evb/meta-evb-arm/meta-evb-fvp-base/README.md