2be4563d | 20-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 ...
|
81365bf8 | 25-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> |
68a24c9e | 25-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 ...
|
150be912 | 16-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 ...
|
8cef63e3 | 15-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 ...
|
81059e32 | 18-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 ...
|
de08ca2d | 17-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> |
fb01e14e | 17-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> |
dec59b47 | 17-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> |
035ad76b | 17-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> |
f4bc335b | 17-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> |
0297e5b8 | 14-Mar-2019 |
Andrew Jeffery <andrew@aj.id.au> |
mboxd: Remove flash API compatibility shim
The flash API compatibility was kept to reduce the line noise in the previous backend patch. Remove the compatibility layer now and convert the remaining c
mboxd: Remove flash API compatibility shim
The flash API compatibility was kept to reduce the line noise in the previous backend patch. Remove the compatibility layer now and convert the remaining call-sites.
Change-Id: I4b6e54f4463059a7804918add81e7572db7b7c21 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
f1e547c7 | 13-Mar-2019 |
Evan Lojewski <github@meklort.com> |
mboxd: Add a backend abstraction layer to mboxd.
Introduce a backend abstraction, enabling multiple implementations to be compiled in at once. This change formally abstracts the two existing backend
mboxd: Add a backend abstraction layer to mboxd.
Introduce a backend abstraction, enabling multiple implementations to be compiled in at once. This change formally abstracts the two existing backends, mtd and vpnor.
With the backend abstraction in place, subsequent backends are easier to implement.
This change is based of Evan's work and he retains authorship credit. I (AJ) have reworked the patch to pass the vpnor tests, refactored some parts to enable broader use of const structures and others to clarify the initialisation sequences.
Due to the existing lack of abstraction the patch has unfortunately wide-ranging impacts. I've whittled it down as much as I consider reasonable.
Change-Id: I29984a36dae4ea86ec00b853d2a756f0b9afb3ec Signed-off-by: Evan Lojewski <github@meklort.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
cb93504e | 14-Mar-2019 |
Andrew Jeffery <andrew@aj.id.au> |
flash: Introduce flash_validate()
Clean up the protocol_negotiate_version() mess. The existing approach came about due to viewing the vpnor implementation as an edge case in its own right. The code
flash: Introduce flash_validate()
Clean up the protocol_negotiate_version() mess. The existing approach came about due to viewing the vpnor implementation as an edge case in its own right. The code becomes much neater if we consider all backends as equal and afford them the callbacks necessary for correct behaviour.
Change-Id: Ifaeee9da459818cf22b2f137ddc5b8d0356b9be9 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
261f61a1 | 13-Mar-2019 |
Andrew Jeffery <andrew@aj.id.au> |
vpnor: Shuffle and rework includes for sanity
Include ordering and whether or not C linkage is forced by `extern "C"` blocks can cause headaches at link time. Ensure that all C dependencies are incl
vpnor: Shuffle and rework includes for sanity
Include ordering and whether or not C linkage is forced by `extern "C"` blocks can cause headaches at link time. Ensure that all C dependencies are included in an `extern C` block before other includes occur. Also include the C++ versions of string.h and assert.h
Change-Id: Ia96f6044d40c8eccb907b65924efcf62ac7a89c3 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
7a85d22a | 13-Nov-2018 |
Andrew Jeffery <andrew@aj.id.au> |
vpnor: Enforce a read-only FFS ToC regardless of flags
The virtual PNOR implementation never properly honoured writes to the FFS ToC, as the ToC's binary representation is generated from the CSV fil
vpnor: Enforce a read-only FFS ToC regardless of flags
The virtual PNOR implementation never properly honoured writes to the FFS ToC, as the ToC's binary representation is generated from the CSV file shipped in the PNOR squashfs image.
What *did* happen was that opening a write window to the ToC region succeeded and writes could be flushed, but the flushed writes were never read, and ToC representation internal to mboxd was never updated to match the written state. Thus the written values "persisted" until the ToC's window fell out of the cache (with 64MiB reserved regions, probably on a host reboot).
Short circuit the insanity of handling FFS more than we have to by forcefully marking the ToC as read-only, regardless of the flag configuration shipped in the CSV representation. This prevents the host from successfully opening a write window and thus the host can have no expectation of write persistence.
Change-Id: Ib2788c56b245da506cb7d607c0758b17785766cf Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
8a0efd5e | 13-Nov-2018 |
Andrew Jeffery <andrew@aj.id.au> |
vpnor: test: Add force_readonly_toc
This ensures that the ToC presented to the host indicates that it is not writable. The virtual PNOR implementation has never properly honoured writes to the ToC,
vpnor: test: Add force_readonly_toc
This ensures that the ToC presented to the host indicates that it is not writable. The virtual PNOR implementation has never properly honoured writes to the ToC, so lets at least tell the host.
As the code has not yet been fixed to implement the desired behaviour, add the test to XFAIL_TESTS.
Change-Id: Ia13a0f907f916d6dec3979b17685d54bc578a106 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
89985754 | 12-Nov-2018 |
Andrew Jeffery <andrew@aj.id.au> |
vpnor: Add write-to-writable-ToC test
Tests if mutations survive re-opening the window. They don't, so add the test to XFAIL_TESTS.
Change-Id: Ic2f844c30a7da35033bf03012ea452718d2843e4 Signed-off-b
vpnor: Add write-to-writable-ToC test
Tests if mutations survive re-opening the window. They don't, so add the test to XFAIL_TESTS.
Change-Id: Ic2f844c30a7da35033bf03012ea452718d2843e4 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
d5f1d40f | 11-Oct-2018 |
William A. Kennington III <wak@google.com> |
clang-format: Pull the format rules from the openbmc/docs repo
This makes it consistent with other openbmc projects for c++ formatting.
Tested: Run through the unit test suite.
Change-Id: I920
clang-format: Pull the format rules from the openbmc/docs repo
This makes it consistent with other openbmc projects for c++ formatting.
Tested: Run through the unit test suite.
Change-Id: I92030ce5b42de01360393687fb438faf26f36ac8 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
26558dbb | 09-Aug-2018 |
Andrew Jeffery <andrew@aj.id.au> |
mboxd: Refactor and rename mbox.h to mboxd.h
Refine the purpose of the header file to represent what's required for the daemon itself, not its constituent pieces. Rather, split those definitions out
mboxd: Refactor and rename mbox.h to mboxd.h
Refine the purpose of the header file to represent what's required for the daemon itself, not its constituent pieces. Rather, split those definitions out to their respective header files and include them as necessary.
Finally the header file is renamed to better reflect its purpose.
Change-Id: I48c409f57d96c844589cd865b24f197477dfe87c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
c7d1947e | 07-Aug-2018 |
Andrew Jeffery <andrew@aj.id.au> |
vpnor: Hijack protocol rather than transport
By hijacking the transport the changes in behaviour were limited to the mailbox interface. Now that we have a DBus interface as well this would lead to i
vpnor: Hijack protocol rather than transport
By hijacking the transport the changes in behaviour were limited to the mailbox interface. Now that we have a DBus interface as well this would lead to inconsistent behaviour dependent on the transport.
Instead of hooking the transport, push the hook down to the protocol level where we will achieve consistent behaviour across all transports.
Change-Id: I437866a6dbda107149336c15a00ee1aa058f5875 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
1e531afd | 06-Aug-2018 |
Andrew Jeffery <andrew@aj.id.au> |
protocol: Add get_info
Change-Id: Ie3338714813bb65f5d37fcd046dd5bebc0ba21f0 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
457a6e5f | 07-Aug-2018 |
Andrew Jeffery <andrew@aj.id.au> |
mboxd: Rename mboxd_msg to transport_mbox
Change-Id: I0f4e206648c02a98fa938a7e582470c8d90904f1 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
f593b1bd | 07-Aug-2018 |
Andrew Jeffery <andrew@aj.id.au> |
mboxd: Rename windows files
Change-Id: I44e110906fd0f751f8f34b175f971e65896a7301 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
cd18611e | 07-Aug-2018 |
Andrew Jeffery <andrew@aj.id.au> |
mboxd: Rename lpc source files
Change-Id: I289618c90b2df8911e362397b7eab99403c86c05 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |