History log of /openbmc/estoraged/include/ (Results 1 – 25 of 46)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
da5aa61418-Dec-2025 Willy Tu <wltu@google.com>

enable BKOPS to manual mode

Check if the BKOPS is supported before enabling it and setting to manual
mode.

Tested:
Before
```
$ mmc extcsd read /dev/mmcblk0 | grep BKOPS
Background operations suppo

enable BKOPS to manual mode

Check if the BKOPS is supported before enabling it and setting to manual
mode.

Tested:
Before
```
$ mmc extcsd read /dev/mmcblk0 | grep BKOPS
Background operations support [BKOPS_SUPPORT: 0x01]
Background operations status [BKOPS_STATUS: 0x00]
Enable background operations handshake [BKOPS_EN]: 0x00
```

After
```
eStoraged[29228]: BKOPS is supported for /dev/mmcblk0
eStoraged[29228]: Successfully enable BKOPS for /dev/mmcblk0
```

```sh
$ mmc extcsd read /dev/mmcblk0 | grep BKOPS
Background operations support [BKOPS_SUPPORT: 0x01]
Background operations status [BKOPS_STATUS: 0x00]
Enable background operations handshake [BKOPS_EN]: 0x01
```

Change-Id: Id2f80310b4f420192205aebdbc7726bfaac0dc15
Signed-off-by: Willy Tu <wltu@google.com>

show more ...

530ce1e816-Dec-2025 Rom Lemarchand <romlem@google.com>

Add support for trim commands

Trim commands help with flash lifespan and performance:
- Explicitly discard blocks when formatting the filesystem
- Add support for discard commands to get passed thro

Add support for trim commands

Trim commands help with flash lifespan and performance:
- Explicitly discard blocks when formatting the filesystem
- Add support for discard commands to get passed through the
device-mapper

Change-Id: Ie3a3ba86757806935fb2863adf092449139941d2
Signed-off-by: Rom Lemarchand <romlem@google.com>

show more ...

1d6665fc04-Dec-2025 John Wedig <johnwedig@google.com>

Run fsck before mounting filesystem

Running fsck should help correct any filesystem errors and make mounting
more reliable. For example, filesystem errors might occur when there's a
power loss while

Run fsck before mounting filesystem

Running fsck should help correct any filesystem errors and make mounting
more reliable. For example, filesystem errors might occur when there's a
power loss while writes are in flight.

Tested:
Below is some example output from eStoraged with fsck.
```
root@wodp1-nfd02:~# systemctl status -l xyz.openbmc_project.eStoraged
● xyz.openbmc_project.eStoraged.service - Storage management daemon for an encrypted storage device
Loaded: loaded (/usr/lib/systemd/system/xyz.openbmc_project.eStoraged.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-12-04 16:38:57 PST; 23min ago
Invocation: ea8275ce96d74cce8036596450060255
Main PID: 812 (eStoraged)
Tasks: 1 (limit: 1965)
Memory: 4.3M
CPU: 5.247s
CGroup: /system.slice/xyz.openbmc_project.eStoraged.service
└─812 /usr/bin/eStoraged

Dec 04 16:38:57 wodp1-nfd02.prod.google.com systemd[1]: Started Storage management daemon for an encrypted storage device.
Dec 04 16:39:10 wodp1-nfd02.prod.google.com eStoraged[812]: Storage management service is running
Dec 04 16:39:24 wodp1-nfd02.prod.google.com eStoraged[812]: Created eStoraged object for path /xyz/openbmc_project/inventory/system/board/eMMC/emmc
Dec 04 16:39:45 wodp1-nfd02.prod.google.com eStoraged[812]: Starting unlock
Dec 04 16:39:45 wodp1-nfd02.prod.google.com eStoraged[812]: Activating LUKS dev /dev/mmcblk0
Dec 04 16:39:48 wodp1-nfd02.prod.google.com eStoraged[812]: Successfully activated LUKS dev /dev/mmcblk0
Dec 04 16:39:48 wodp1-nfd02.prod.google.com eStoraged[3049]: fsck from util-linux 2.39.3
Dec 04 16:39:49 wodp1-nfd02.prod.google.com eStoraged[3074]: /dev/mapper/luks-mmcblk0: recovering journal
Dec 04 16:39:49 wodp1-nfd02.prod.google.com eStoraged[3074]: /dev/mapper/luks-mmcblk0: clean, 34/954720 files, 98720/3812864 blocks
Dec 04 16:39:49 wodp1-nfd02.prod.google.com eStoraged[812]: Successfully mounted filesystem at /mnt/luks-mmcblk0_fs
```

Change-Id: Ie333a7fd9c8af2fe6e07ad52507249f42ca0e8e8
Signed-off-by: John Wedig <johnwedig@google.com>

show more ...

75a21ff208-May-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat with clang-20

Copy the latest format file from the docs repository and apply using
clang-format-20.

See I1818407fdd8ab2ca11a939ffebd5f3e5445403c3 for c

clang-format: update latest spec and reformat with clang-20

Copy the latest format file from the docs repository and apply using
clang-format-20.

See I1818407fdd8ab2ca11a939ffebd5f3e5445403c3 for clang-20 enablement.

Change-Id: I8c092b5399d495b8ca0958390fade19388320d58
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

c0f8548603-Mar-2025 Patrick Williams <patrick@stwcx.xyz>

fix struct and variable case styles

Fix the following clang-tidy warnings:

```
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/include/sanitize.hpp:41:37: error: invalid case style for str

fix struct and variable case styles

Fix the following clang-tidy warnings:

```
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/include/sanitize.hpp:41:37: error: invalid case style for struct 'mmc_io_multi_cmd_erase' [readability-identifier-naming,-warnings-as-errors]
41 | struct mmc_io_multi_cmd_erase data) = 0;
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:48:30: error: invalid case style for parameter 'cipher_mode' [readability-identifier-naming,-warnings-as-errors]
48 | const char* cipher_mode, const char* uuid,
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:49:30: error: invalid case style for parameter 'volume_key' [readability-identifier-naming,-warnings-as-errors]
49 | const char* volume_key, size_t volume_key_size, void* params),
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:49:49: error: invalid case style for parameter 'volume_key_size' [readability-identifier-naming,-warnings-as-errors]
49 | const char* volume_key, size_t volume_key_size, void* params),
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:55:25: error: invalid case style for parameter 'passphrase_size' [readability-identifier-naming,-warnings-as-errors]
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:59:56: error: invalid case style for parameter 'requested_type' [readability-identifier-naming,-warnings-as-errors]
59 | (struct crypt_device * cd, const char* requested_type,
```

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib4c685db2037514b0517e42369b1d66b49b00e03

show more ...

9c2e836201-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

meson: reformat with meson formatter

Apply the `meson format` results.

Change-Id: I4cc78e59d8341dd5ea54ee2793afdab179b259e8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

15b63e1216-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I07372e75f12f406bd0555dd27e249bc7dd0958d4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

d4554f2a17-Jun-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://githu

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

Change-Id: I153217f4ae8454e3546a59da9fcfe3f83fd04b39
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...

3cf9e80630-Apr-2024 John Wedig <johnwedig@google.com>

Add retries when getting dbus properties

We have found that the dbus requests to Entity Manager sometimes time
out at startup, when getting the dbus properties from the Entity Manager
config object.

Add retries when getting dbus properties

We have found that the dbus requests to Entity Manager sometimes time
out at startup, when getting the dbus properties from the Entity Manager
config object. This commit adds retries, similar to how dbus-sensors
will retry these requests, if needed.

Tested:
Observed the dbus request to Entity Manager get retried on a machine,
and then it succeeded on the second attempt.

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: I924703e9be0879489477cc31644ef280429c347b

show more ...

c0d66eb726-Feb-2024 John Wedig <johnwedig@google.com>

Populate Protocol property in Item.Drive interface

By populating this property, bmcweb can populate the "Protocol"
property in the Drive schema.

Tested:
$ busctl get-property xyz.openbmc_project.eS

Populate Protocol property in Item.Drive interface

By populating this property, bmcweb can populate the "Protocol"
property in the Drive schema.

Tested:
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Drive Protocol
s "xyz.openbmc_project.Inventory.Item.Drive.DriveProtocol.eMMC"

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: I2bd19190c445ce57f3d867ffbb437c1a4a370b51

show more ...

d7be42bd19-Jan-2024 John Wedig <johnwedig@google.com>

Populate the Type property in Item.Drive interface

By populating this property, bmcweb can populate the "MediaType"
property in the Drive schema.

Tested:
$ busctl get-property xyz.openbmc_project.e

Populate the Type property in Item.Drive interface

By populating this property, bmcweb can populate the "MediaType"
property in the Drive schema.

Tested:
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Drive Type
s "xyz.openbmc_project.Inventory.Item.Drive.DriveType.SSD"

$ curl http://localhost:80/redfish/v1/Chassis/DCSCM/Drives/mmcblk0
{
...
"MediaType": "SSD",
...
}

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: I2cb6c7d3ec3b49e8d666da940d873f1117a0aa85

show more ...

043af59f23-Nov-2023 Tom Tung <shes050117@gmail.com>

Get eraseMaxGeometry and eraseMinGeometry from dbus

Also, make findDevice return output parameters based on RVO.

With the change like in EntityManager JSON:
```
{
"Name": "example_emmc",
"T

Get eraseMaxGeometry and eraseMinGeometry from dbus

Also, make findDevice return output parameters based on RVO.

With the change like in EntityManager JSON:
```
{
"Name": "example_emmc",
"Type": "EmmcDevice",
"LocationCode": "location"
"EraseMaxGeometry": 10000000000,
"EraseMinGeometry": 5000000000,
}
```
and geometry values will be set to estoraged.

Tested:
- unit test pass:
```
5/7 util_test OK 0.05s
```

Change-Id: Ia8499af2168c7e740558978273fc80456eb29282
Signed-off-by: Tom Tung <shes050117@gmail.com>

show more ...

1982505726-May-2023 Rahul Kapoor <rahulkpr@google.com>

Add support for LocationCode

LocationCode is needed to populate ServiceLabel by BMCWeb for Redfish
resource associated with eStorage.
LocationCode is derived from config object exported by Entity Ma

Add support for LocationCode

LocationCode is needed to populate ServiceLabel by BMCWeb for Redfish
resource associated with eStorage.
LocationCode is derived from config object exported by Entity Manager
in the the following interface:
"xyz.openbmc_project.Configuration.EmmcDevice

To surface LocationCode, the "Exposes" entry in board's Entity Manager
config can add "LocationCode" property as follows:
{
"Name": "example_emmc",
"Type": "EmmcDevice",
"LocationCode": "U1000"
}

Here the LocationCode is the silk screen label.

Tested:

busctl introspect xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Decorator.LocationCode

NAME TYPE SIGNATURE RESULT/VALUE FLAGS
.LocationCode property s "U1000" emits-change

wget -qO- localhost:80/redfish/v1/Chassis/DCSCM/Drives/mmcblk0
{
"@odata.id": "/redfish/v1/Chassis/DCSCM/Drives/mmcblk0",
"@odata.type": "#Drive.v1_7_0.Drive",
"Id": "mmcblk0",
"Links": {
"Chassis": {
"@odata.id": "/redfish/v1/Chassis/DCSCM"
}
},
"Name": "mmcblk0",
"PhysicalLocation": {
"PartLocation": {
"LocationType": "Embedded",
"ServiceLabel": "U1000"
},
"PartLocationContext": "DC_SCM"
},
"PredictedMediaLifeLeftPercent": 100,
"Status": {
"State": "Enabled"
}
}

Change-Id: Ibf53ede5ee65787f9cef53d4bad4cb8fccba3606
Signed-off-by: Rahul Kapoor <rahulkpr@google.com>

show more ...

04c28fad10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Ia968a74764d3bda33160a8a9890629ed3cc94d0e
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

2443a02117-Mar-2023 John Wedig <johnwedig@google.com>

Improve accuracy of 'Locked' property

The 'Locked' property in the volume interface is supposed to indicate
whether the LUKS volume is currently activated, but this property is
often inaccurate beca

Improve accuracy of 'Locked' property

The 'Locked' property in the volume interface is supposed to indicate
whether the LUKS volume is currently activated, but this property is
often inaccurate because it always defaults to false upon startup
(i.e. unlocked). However, the LUKS volume is usually locked at startup.
So, client daemons can get confused when looking at the Locked
property.

This commit reworks the functionality for the 'Locked' property, so that
it checks whether the mapped virtual crypt device exists, e.g. whether
/dev/mapper/<luks_device> exists. This way, the Locked property should
better reflect the actual state.

The one caveat to keep in mind is that 'Locked' will be True even if the
device isn't formatted as a LUKS volume. If client daemons need to know
whether it's already formatted, we may want to add another property to
the Volume interface for that purpose. But in the meantime, eStoraged
already exports an EncryptionStatus property as part of the Drive
interface. So, the information is already available, if needed.

Tested:
Checked 'Locked' property at startup
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Locked
b true
Formatted the LUKS volume, then checked 'Locked' property again
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \
xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \
--timeout=60
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Locked
b false
Restarted eStoraged and checked 'Locked' again.
$ systemctl restart xyz.openbmc_project.eStoraged
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Locked
b false
Locked the LUKS volume, and checked 'Locked' again.
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Lock
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Locked
b true
Restarted eStoraged, and checked 'Locked' again.
$ systemctl restart xyz.openbmc_project.eStoraged
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Locked
b true

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: I5cd6bac4b4426c0e2579c3fc8cf7a27b4f2ccc08

show more ...

61cf426017-Mar-2023 John Wedig <johnwedig@google.com>

Fix build warnings

This commit fixes some build warnings in CI caused by unused variables
and an invalid move assignment operator, since a member variable is of
reference type.

Signed-off-by: John

Fix build warnings

This commit fixes some build warnings in CI caused by unused variables
and an invalid move assignment operator, since a member variable is of
reference type.

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: I2b813ef017e47f2d35666063435a52638b74d156

show more ...

8d5a3a0729-Sep-2022 John Wedig <johnwedig@google.com>

Implement the changePassword method

With this commit, it is now possible to change the password for the
LUKS-encrypted volume, using the changePassword D-Bus method for
eStoraged.

Tested:
$ busctl

Implement the changePassword method

With this commit, it is now possible to change the password for the
LUKS-encrypted volume, using the changePassword D-Bus method for
eStoraged.

Tested:
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \
xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \
--timeout=60
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume ChangePassword \
ayay 3 1 2 3 3 4 5 6
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Lock
Attempted to unlock using the old password. It failed as expected.
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3
Unlocked with the new password
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 4 5 6

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: If1395fb04f51b1fb1a3d26731422d21476205207

show more ...

b483830822-Jul-2022 John Wedig <johnwedig@google.com>

Export the part number and serial number

This commit exposes the eMMC's part name and serial number over the
appropriate D-Bus interface, so that it can be exposed over Redfish in
bmcweb.

Tested:
$

Export the part number and serial number

This commit exposes the eMMC's part name and serial number over the
appropriate D-Bus interface, so that it can be exposed over Redfish in
bmcweb.

Tested:
$ busctl introspect xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0
...
xyz.openbmc_project.Inventory.Decorator.Asset interface - - -
.PartNumber property s "ABCDEF" emits-change
.SerialNumber property s "123456abcd" emits-change
...
$ wget -qO- http://localhost:80/redfish/v1/Chassis/DC_SCM/Drives/mmcblk0
{
"@odata.id": "/redfish/v1/Chassis/DC_SCM/Drives/mmcblk0",
"@odata.type": "#Drive.v1_7_0.Drive",
"CapacityBytes": 15634268160,
"Id": "mmcblk0",
"Links": {
"Chassis": {
"@odata.id": "/redfish/v1/Chassis/DC_SCM"
}
},
"Name": "Name",
"PartNumber": "ABCDEF",
"PhysicalLocation": {
"PartLocation": {
"LocationType": "Embedded"
}
},
"SerialNumber": "123456abcd",
"Status": {
"State": "Enabled"
}
}

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: I1d17f08b99907620b5f2c73fdaeacc84950ce64e

show more ...

4979641522-Jun-2022 John Edward Broadbent <jebr@google.com>

Update location interface

Before LocationCode was being set, but the bmcweb code used
LocationType. This change makes eStorageD use LocationType,
and not LocationCode.

Tested:

$ busctl introspect

Update location interface

Before LocationCode was being set, but the bmcweb code used
LocationType. This change makes eStorageD use LocationType,
and not LocationCode.

Tested:

$ busctl introspect xyz.openbmc_project.eStoraged /xyz/openbmc_project/inventory/storage/mmcblk0
NAME TYPE
...
xyz.openbmc_project.Inventory.Connector.Embedded interface
...

Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: I3e077559fa00cccd8e0d4580fafadf4a2cdb40fd

show more ...

6771c69122-Jun-2022 John Edward Broadbent <jebr@google.com>

Update initial values for new CI

Tested: code builds, and passes unit test

Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: Ib9080fc5b1aa1353a985f700d65e7a9694c07634

740e94bd10-Jun-2022 John Edward Broadbent <jebr@google.com>

Add location interface

Tested:
$busctl introspect xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0
...
xyz.openbmc_project.Inventory.Decorator.LocationCode interface
.

Add location interface

Tested:
$busctl introspect xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0
...
xyz.openbmc_project.Inventory.Decorator.LocationCode interface
.LocationCode property s "Embedded" emits-change
...

Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: Ib1c2177541de193c5930238958201ad26b38e7d2

show more ...

91c1ec1b20-May-2022 John Edward Broadbent <jebr@google.com>

Add DriveEncryptionState property

Tested:
Verify the property is as expected (Encrypted). Then wipe the disk, and
re-check the value to verify it is as expected (unknown).

$ busctl get-property xyz

Add DriveEncryptionState property

Tested:
Verify the property is as expected (Encrypted). Then wipe the disk, and
re-check the value to verify it is as expected (unknown).

$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Drive EncryptionStatus s \
"xyz.openbmc_project.Inventory.Item.Drive.DriveEncryptionState.Encrypted"

$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Erase s \
xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VendorSanitize

$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Drive EncryptionStatus s \
"xyz.openbmc_project.Inventory.Item.Drive.DriveEncryptionState.Unknown"

Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: I4abba7a1e7f047c481aaf4938b2b1e2b7d7ec6be

show more ...

6c0d8ce122-Apr-2022 John Wedig <johnwedig@google.com>

Add association between chassis and drive

This commit adds an association between the storage device ("drive") and
the associated chassis. Specifically, the new association is the
following:
["cha

Add association between chassis and drive

This commit adds an association between the storage device ("drive") and
the associated chassis. Specifically, the new association is the
following:
["chassis", "drive", <chassis_path>]

This association will be used in bmcweb to add Redfish links between
drive and chassis.

Tested:
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Association.Definitions Associations
$ busctl get-property xyz.openbmc_project.ObjectMapper \
/xyz/openbmc_project/inventory/system/board/dcscm/drive \
xyz.openbmc_project.Association endpoints
$ busctl get-property xyz.openbmc_project.ObjectMapper \
/xyz/openbmc_project/inventory/storage/mmcblk0/chassis \
xyz.openbmc_project.Association endpoints

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: Ie21725e9ceb5134ac94854dcb06f3b86a48eeabd

show more ...

d32b966713-Apr-2022 John Wedig <johnwedig@google.com>

Initial integration with Entity Manager

This commit changes eStoraged so that it doesn't take a specific device
as an argument. Instead, it looks for a config object from Entity
Manager and creates

Initial integration with Entity Manager

This commit changes eStoraged so that it doesn't take a specific device
as an argument. Instead, it looks for a config object from Entity
Manager and creates a D-Bus object corresponding to the config object.

The config objects need to expose the following interface:
"xyz.openbmc_project.Configuration.EmmcDevice"

To support more types of storage devices in the future, we can introduce
a new interface for each one.

In addition, eStoraged currently only supports 1 eMMC device. If we want
to support more than one in the future, we will need to add more
information to the Entity Manager config, to distinguish between them.

Assuming the eMMC is located on a FRU-detectable board, an "Exposes"
entry can be added to that board's Entity Manager config, for example:
{
"Name": "example_emmc",
"Type": "EmmcDevice"
}

Doing so will tell Entity Manager to create a config object with the
EmmcDevice interface mentioned above. Then, eStoraged will find the
config object with that interface and create its own D-Bus object that
can be used to manage the eMMC.

Tested:
Updated the Entity Manager config (as described above), started
eStoraged, then tested most of its methods and properties using busctl.
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \
xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \
--timeout=60
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Lock
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Locked
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Drive Capacity
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Erase s \
xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VerifyGeometry
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Erase s \
xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalOverWrite \
--timeout=1200
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Erase s \
xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalVerify \
--timeout=1200

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: If137d02e185c366f4a1437076512b4883ba6d595

show more ...

b2c86be315-Apr-2022 John Edward Broadbent <jebr@google.com>

Change ownership of handle to eStorageD object

Clients used to create both the CryptHandle and the eStorageD objects
using the same information. Then the client would pass the CryptHandle
into eStor

Change ownership of handle to eStorageD object

Clients used to create both the CryptHandle and the eStorageD objects
using the same information. Then the client would pass the CryptHandle
into eStorageD methods in order to perform crypto methods. This change
creates the CryptHandle closer to where it is used. This makes the code
simpler and easier to understand.

Tested:
busctl call xyz.openbmc_project.eStoraged.mmcblk0 \
> /xyz/openbmc_project/inventory/storage/mmcblk0 \
> xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \
> xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \
> --timeout=60

Change-Id: I276e97146f4498191eb19512bc244a1e8d9cd2cb
Signed-off-by: John Edward Broadbent <jebr@google.com>

show more ...

12