History log of /openbmc/hiomapd/vpnor/ (Results 1 – 25 of 63)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
2be4563d20-Nov-2024 Ninad Palsule <ninad@linux.ibm.com>

vpnor: Fix SEGV fault in vpnor

Table object may throw error hence initialize table pointer to null so
that vpnor_free() doesn't free the junk pointer.
In vpnor_free() do not free table pointer if it

vpnor: Fix SEGV fault in vpnor

Table object may throw error hence initialize table pointer to null so
that vpnor_free() doesn't free the junk pointer.
In vpnor_free() do not free table pointer if its null.

Added testcase to make sure the issue is fixed.
```
PASS: vpnor/test/toc_missing_file_reset
```

Change-Id: Ic6f4a7d163cf786d71b810190ab6ede0cd3a0717
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>

show more ...

b8d89b7723-Oct-2024 Ninad Palsule <ninad@linux.ibm.com>

vpnor: Improve error logging

We are seeing lot of crashes in the mboxd so hardening error logging to
figure out failure cases.
- Add missing error logs.
- Differentiate similar errors.

Change-Id: I

vpnor: Improve error logging

We are seeing lot of crashes in the mboxd so hardening error logging to
figure out failure cases.
- Add missing error logs.
- Differentiate similar errors.

Change-Id: If56f77aed1d1d07cca1d108bc943bddc7216e579
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>

show more ...

81365bf825-Oct-2024 Ninad Palsule <ninad@linux.ibm.com>

Fixed format errors in the build

Change-Id: I5c274fa52abef0634fc80037d192b269959a757a
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>

8207751128-Nov-2023 Adriana Kobylak <anoo@us.ibm.com>

vpnor: Look for files in rw directory first

IBM systems running PLDM create lid files for the host content instead
of PNOR partition files:
```
https://github.com/openbmc/pldm/blob/master/oem/ibm/co

vpnor: Look for files in rw directory first

IBM systems running PLDM create lid files for the host content instead
of PNOR partition files:
```
https://github.com/openbmc/pldm/blob/master/oem/ibm/configurations/fileTable.json
```

In order to continue to support mboxd (hiomapd), symlinks with the PNOR
partition file names are created to point to the lid files:
https://gerrit.openbmc.org/c/openbmc/openpower-pnor-code-mgmt/+/45249

Since these symlinks are created at runtime, they can only be created in
the read-write directory.
Update the mboxd (hiomapd) code to look at the rw directory first, since
in general the code searches in patch directories first to allow
overrides. Then if the partition files are not found default to the
read-only directory.

The symlinks are created prior to mboxd starting via a Before dependency
in the openpower service file:
```
https://github.com/openbmc/openpower-pnor-code-mgmt/blob/master/mmc/openpower-update-bios-attr-table.service#L6
```

Tested: Verified mboxd started successfully in a p10bmc and witherspoon
system.

Change-Id: I281cd41591ab55cd1b3de474ad25c5992ea2d498
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...

68a24c9e25-Jul-2023 Patrick Williams <patrick@stwcx.xyz>

resolve stricter warnings

In order to convert this repository to Meson, we need to make it
compile under `warning_level=3`. Fix a number of warning classes
across the repository or disable them.

S

resolve stricter warnings

In order to convert this repository to Meson, we need to make it
compile under `warning_level=3`. Fix a number of warning classes
across the repository or disable them.

Some fixes are:

* Add missing header files.
* Fully initialize structs as necessary.
* Add `__attribute__((unused))` on parameters as necessary.
* Fix comparisons between signed and unsigned.
* Fix printf specifiers as necessary.
* Avoid case-fallthrough.
* Remove if conditions which are always true.

Some warnings would require extensive code changes, due to their
pervasive use, and so are disabled at a per-file level:
* `-Wpointer-arith`
* `-Wunused-result`

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

show more ...

6a51e5f408-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

prettier: re-format

Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML
files to have consistent formatting for these file types. Re-run the
formatter on the whole repository.

prettier: re-format

Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML
files to have consistent formatting for these file types. Re-run the
formatter on the whole repository.

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

show more ...

150be91216-Jun-2022 Patrick Williams <patrick@stwcx.xyz>

switch experimental::fs to std::fs

std::filesystem was added to C++17 and is well supported now. Remove
the older std::experimental::filesystem usage.

Signed-off-by: Patrick Williams <patrick@stwc

switch experimental::fs to std::fs

std::filesystem was added to C++17 and is well supported now. Remove
the older std::experimental::filesystem usage.

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

show more ...

fab4020d03-Sep-2021 Ed Tanous <edtanous@google.com>

clang-format code with new clang

New clang, new formatting.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ib20e9ed59f6d6c22e65d54212a096f15071b77b3

5c9264da14-May-2021 Andrew Geissler <geissonator@yahoo.com>

vpnor: Fix const decltype() error reported by gcc-11

The latest yocto rebase has brought in a new compiler. It's flagging the
following error with this code:

| ../git/vpnor/table.cpp: In member fun

vpnor: Fix const decltype() error reported by gcc-11

The latest yocto rebase has brought in a new compiler. It's flagging the
following error with this code:

| ../git/vpnor/table.cpp: In member function 'const pnor_partition& openpower::virtual_pnor::partition::Table::partition(size_t) const':
| ../git/vpnor/table.cpp:159:49: error: 'decltype(auto)' cannot be cv-qualified
| 159 | const decltype(auto) table = getNativeTable();
| |

The function is already returning a const so the declaration of the
variable as a const is redundant (and no longer allowed by the compiler)

Change-Id: I105f7e0a90c87b2618439a49e387ee74b4f5dc79
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...

0ad1721614-May-2021 Andrew Geissler <geissonator@yahoo.com>

vpnor: Fix style issues reported by clang tooling

The files in this commit need to be changed to fix a warning found in
the latest gcc version. The issue has to do with using the following
syntax:
`

vpnor: Fix style issues reported by clang tooling

The files in this commit need to be changed to fix a warning found in
the latest gcc version. The issue has to do with using the following
syntax:
`const decltype(auto)`

First update the files in question to match with the latest clang11
formatting.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: If728d370665b42f2ccafea84dbfd50a2ae80c77a

show more ...

5ff50e3c30-Nov-2020 Adriana Kobylak <anoo@us.ibm.com>

vpnor: Use the partition in rw if it exists

Look for the partition file in the rw directory first as the default.
This allows mboxd to support a single writable directory for the case
where the part

vpnor: Use the partition in rw if it exists

Look for the partition file in the rw directory first as the default.
This allows mboxd to support a single writable directory for the case
where the partition files (including the read-only ones) need to be
modified at runtime by the BMC, for example to support two different
configurations of a system using the same firmware image.

Tested: Enabled debug traces to check where the read and write requests
were being fulfilled from and copied some partition files to
the patch directory:
On witherspoon, verified the reads/writes were done on the patch
directory for the files that existed there, and reads were
fulfilled from the ro dir, and writes from the rw dir.
On rainier where all partitions exist in the rw dir, verified
the reads/writes were done on the patch dir for the files that
existed there, and reads/writes were done to the rw dir. For the
HB_VOLATILE partition that gets erased, the ro dir was then used
to read after it was deleted from the rw dir.

Change-Id: I3fe1875bd6a47aa82e9a1f23bc136a5a4f499c7f
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...

02821c6a31-Jan-2020 Andrew Jeffery <andrew@aj.id.au>

vpnor: partition: Fix file descriptor leaks

In the face of errors we were leaking the partition file descriptor when
throwing exceptions.

Change-Id: I257a491460062384928d8dda6bbf178da662f3b3
Signed

vpnor: partition: Fix file descriptor leaks

In the face of errors we were leaking the partition file descriptor when
throwing exceptions.

Change-Id: I257a491460062384928d8dda6bbf178da662f3b3
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

5b97044831-Jan-2020 Andrew Jeffery <andrew@aj.id.au>

vpnor: partition: Only attempt read() for in-bounds accesses

Attempting to read after an lseek() past the end of the file leads to an
error and we bail out. The error propagates up the callstack and

vpnor: partition: Only attempt read() for in-bounds accesses

Attempting to read after an lseek() past the end of the file leads to an
error and we bail out. The error propagates up the callstack and causes
errors on the host side, where really we should just be returning an
erased window.

Change-Id: I06cdda4f7f6aa4d66e133de95cd642e04418bbe0
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

e2744c0e27-Jan-2020 Andrew Jeffery <andrew@aj.id.au>

vpnor: Avoid mmap() due to lack of support on some filesystems

JFFS2 does not support writable mappings. Switch to read()/write() and
add all the failure handling to ensure we get the required seman

vpnor: Avoid mmap() due to lack of support on some filesystems

JFFS2 does not support writable mappings. Switch to read()/write() and
add all the failure handling to ensure we get the required semantics.

Change-Id: I5ec547bf7a01a389cf8f1403f748026fe6bb21fa
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

032fb30027-Jan-2020 Andrew Jeffery <andrew@aj.id.au>

vpnor: table: Handle alignment warning

The static_assert() isn't enough for g++-9, do the slow but correct
thing and copy the data into a container with the correct alignment.

Resolves:

In file in

vpnor: table: Handle alignment warning

The static_assert() isn't enough for g++-9, do the slow but correct
thing and copy the data into a container with the correct alignment.

Resolves:

In file included from vpnor/table.cpp:11:
./vpnor/table.hpp: In instantiation of ‘openpower::virtual_pnor::checksum_t openpower::virtual_pnor::details::checksum(const T&) [with T = pnor_partition_table::<unnamed struct>; openpower::virtual_pnor::checksum_t = unsigned int]’:
vpnor/table.cpp:52:50: required from here
./vpnor/table.hpp:66:10: warning: converting a packed ‘const pnor_partition_table::<unnamed struct>’ pointer (alignment 1) to a ‘const unsigned int’ pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
66 | auto begin = reinterpret_cast<const checksum_t*>(&data);
| ^~~~~

Change-Id: If73c72476786628f42a0cb75f43de3d3e313c414
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

8cef63e315-Oct-2019 Alvin Wang <alvinwang@msn.com>

Add backend_adjust_offset to avoid the windows overlap

In mihawk, the windows overlap will cause the cache coherence.
Hostboot writes the SPD data to BMC through a window and read it
back with anoth

Add backend_adjust_offset to avoid the windows overlap

In mihawk, the windows overlap will cause the cache coherence.
Hostboot writes the SPD data to BMC through a window and read it
back with another window. It causes the data missed and DIMM lost.

Hostboot log
23.80714|<<DBG-956|SPD::getMemType() - MemType: 0xff, Error: NoHUID: 0x30008.

BMC log: The overlaped windows
Window @ 0x756e0000 for size 0x00046000 maps flash offset 0x000e7000
Window @ 0x757e0000 for size 0x00048000 maps flash offset 0x000e5000

Tested: 1. In mihawk, it can fix the SPD cache coherence issue
2. Add unit test to verify VPNOR offset alignment

Change-Id: I92670ade4e2a91b5c49a0acabfc0456f90d49b93
Signed-off-by: Alvin Wang <alvinwang@msn.com>
[AJ: Remove some MSG_INFO() spam, fix whitespace issues]
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

0acc669909-Oct-2019 Adriana Kobylak <anoo@us.ibm.com>

vpnor: partition: Add write permissions to writable files

The code preserves the file permissions when the partition files are
copied to the writeable area. Currently the file permissions are 664,
b

vpnor: partition: Add write permissions to writable files

The code preserves the file permissions when the partition files are
copied to the writeable area. Currently the file permissions are 664,
but if the squashfs was built with file permissions set to 444 to
make it explicit that the pnor partition files were read-only, the
files in the writable area would also have read only permissions.

Therefore, explicitly add write permissions to the partition files
that are copied to the writable area.

Tested:

- With current permissions (there's no change):

root@witherspoon-YL30UF74T02M:~# ls -l /var/lib/phosphor-software-manager/pnor/ro/HBD
-rw-rw-r-- 1 253760 401855 1179648 Sep 23 16:30 HBD
root@witherspoon-YL30UF74T02M:~#ls -l /var/lib/phosphor-software-manager/pnor/rw/HBD
-rw-rw-r-- 1 root root 1179648 Oct 9 18:38 HBD

- With read-only permissions:

root@witherspoon-YL30UF74T02M:~# ls -l /var/lib/phosphor-software-manager/pnor/ro/HBD
-r--r--r-- 1 root root 1179648 Oct 9 15:33 /var/lib/phosphor-software-manager/pnor/ro/HBD
root@witherspoon-YL30UF74T02M:~# ls -l /var/lib/phosphor-software-manager/pnor/rw/HBD
-rw-r--r-- 1 root root 1179648 Oct 9 18:43 /var/lib/phosphor-software-manager/pnor/rw/HBD

Change-Id: Ibc3f47bd3a4f645d99155d19624c7271df4d0470
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...

81d27b0407-Mar-2019 Lei YU <mine260309@gmail.com>

vpnor: Rename generate-squashfs to generate-tar

The tool refernced in table.hpp is renamed to generate-tar.
Update the comment in code.

Change-Id: I67f75dbe5018ab71d65f87ee14093c3972eb5846
Signed-o

vpnor: Rename generate-squashfs to generate-tar

The tool refernced in table.hpp is renamed to generate-tar.
Update the comment in code.

Change-Id: I67f75dbe5018ab71d65f87ee14093c3972eb5846
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...

81059e3218-Mar-2019 Andrew Jeffery <andrew@aj.id.au>

Makefiles: Centralise some use of VIRTUAL_PNOR_ENABLED

Better that we try to keep all the conditional junk near the top of the
tree.

Change-Id: Ic9e8dca892dcf15607bace9f630f4d107e1a4b4e
Signed-off-

Makefiles: Centralise some use of VIRTUAL_PNOR_ENABLED

Better that we try to keep all the conditional junk near the top of the
tree.

Change-Id: Ic9e8dca892dcf15607bace9f630f4d107e1a4b4e
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

de08ca2d17-Mar-2019 Andrew Jeffery <andrew@aj.id.au>

vpnor: Rename pnor_partition_table sources to table

Change-Id: I95c5129aa81a7b4a4d88ce2f7edf6a10a3c94b98
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

fb01e14e17-Mar-2019 Andrew Jeffery <andrew@aj.id.au>

vpnor: Rename pnor_partition sources to partition

Change-Id: I7fb3ba5071c94595449c5469625564233cc8d752
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

dec59b4717-Mar-2019 Andrew Jeffery <andrew@aj.id.au>

vpnor: Rename pnor_partition_defs sources to ffs

Change-Id: I1bb919eec2a12403474d58540c52beab8664b8b8
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

035ad76b17-Mar-2019 Andrew Jeffery <andrew@aj.id.au>

vpnor: Consolidate backend and mboxd_pnor_partition_table sources

Change-Id: Ibf66c3a86c2a50e2304fb968f8c912ede84cf719
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

f4bc335b17-Mar-2019 Andrew Jeffery <andrew@aj.id.au>

vpnor: Rename mboxd_pnor_partition_table sources to backend

Change-Id: I6f0fff4ab54e011c1765fc04186e899754787641
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

5320f6e014-Mar-2019 Andrew Jeffery <andrew@aj.id.au>

mboxd: Add backend DBus interface and commandline options

Also implement a backend commandline option to mboxctl: `mboxctl
--backend ...`, to allow easy run-time switching of the backend from the
co

mboxd: Add backend DBus interface and commandline options

Also implement a backend commandline option to mboxctl: `mboxctl
--backend ...`, to allow easy run-time switching of the backend from the
commandline.

Switching between VPNOR and file backends via mboxctl was tested on
Witherspoon, and MTD and file backends on Romulus.

Change-Id: Iaf0e27ecf1d5cdd9e3a31729fb179096bbc37408
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

123