| commit | 7267c21d36a0dfce37f4821e9cd0994156ae3ba7 | [log] [tgz] |
|---|---|---|
| author | Sui Chen <suichen@google.com> | Tue May 17 14:49:28 2022 -0700 |
| committer | Ed Tanous <ed@tanous.net> | Fri Jun 10 04:15:15 2022 +0000 |
| tree | 6e2f28c77dfc2708c9f3705c345ef4d5eaed453e | |
| parent | 593f6449a6afa130a28c4cc9a55fb857e019917e [diff] |
memory: Precisely match DIMM ID
Currently, getDimmData uses std::string::find to determine if a DBus
path contains a dimmId. The result is if we have the following paths:
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm1
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm10
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm11
...
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm19
They will all be considered to match dimmId "dimm1" with string::find.
This change switches to sdbusplus::message::object_path::filename(), so
partial matches may be prevented.
This change also considers partition data and works for partitions.
Tested:
1. No new Redfish Validator errors
2. In my mock environment
URL: /redfish/v1/Systems/system/Memory/dimm0
{
"@odata.id": "/redfish/v1/Systems/system/Memory/dimm0",
"@odata.type": "#Memory.v1_11_0.Memory",
"AllowedSpeedsMHz": [],
"BaseModuleType": "RDIMM",
"BusWidthBits": 0,
"CapacityMiB": 1024,
"DataWidthBits": 0,
"ErrorCorrection": "NoECC",
"FirmwareRevision": "0",
"Id": "dimm0",
"Name": "DIMM Slot",
"OperatingSpeedMhz": 0,
"RankCount": 0,
"Regions": [
{
"MemoryClassification": "Volatile",
"OffsetMiB": 0,
"PassphraseEnabled": false,
"RegionId": "",
"SizeMiB": 1024
}
],
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
}
Signed-off-by: Sui Chen <suichen@google.com>
Change-Id: I122774be1f81da6e5c3a833b83d2bd81b437c298
This component attempts to be a "do everything" embedded webserver for openbmc.
At this time, the webserver implements a few interfaces:
BMCWeb is configured by setting -D flags that correspond to options in bmcweb/meson_options.txt and then compiling. For example, meson <builddir> -Dkvm=disabled ... followed by ninja in build directory. The option names become C++ preprocessor symbols that control which code is compiled into the program.
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C buildir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in bmcweb/subprojects.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage
When BMCWeb starts running, it reads persistent configuration data (such as UUID and session data) from a local file. If this is not usable, it generates a new configuration.
When BMCWeb SSL support is enabled and a usable certificate is not found, it will generate a self-sign a certificate before launching the server. The keys are generated by the secp384r1 algorithm. The certificate
C=US, O=OpenBMC, CN=testhost,SHA-256 algorithm.