#
e8c39f35
|
| 28-May-2025 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
oem-ibm: NVRAM service file changes
When capturing details like a kernel panic or a bmc reboot during the middle of NVRAM file creation would lead to corrupted sizes and hence there is a need to als
oem-ibm: NVRAM service file changes
When capturing details like a kernel panic or a bmc reboot during the middle of NVRAM file creation would lead to corrupted sizes and hence there is a need to also validate the file size before we can use it.
This change in PLDM NVRAM service files handles below conditions 1. If the file /var/lib/phosphor-software-manager/hostfw/nvram/PHYP-NVRAM exists and if it has a bad size we have to remove it and recreate it. 2. if /var/lib/phosphor-software-manager/hostfw/nvram/PHYP-NVRAM file does not exist then check if /var/lib/pldm/PHYP-NVRAM exists if so then move /var/lib/pldm/PHYP-NVRAM to /var/lib/phosphor-software-manager/hostfw/nvram/PHYP-NVRAM if not..or if the file exists with bad size then create /var/lib/phosphor-software-manager/hostfw/nvram/PHYP-NVRAM using truncate.
Tested: All the above conditions and also a codeupdate scenario.
Change-Id: If612c494727286e71c61ec1e53ebe31d9ad314cd Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
#
95c872c1
|
| 22-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
oem: ibm: Use `truncate(1)` to create NVRAM related files
Use of `dd(1)` results in back-to-back `read(2)` and `write(2)` syscalls; the performance of `dd(1)` is O(n) with respect to the file size.
oem: ibm: Use `truncate(1)` to create NVRAM related files
Use of `dd(1)` results in back-to-back `read(2)` and `write(2)` syscalls; the performance of `dd(1)` is O(n) with respect to the file size. Poor choice of the `bs=` parameter to `dd(1)` can significantly amplify the amount of syscalls required to achieve the task.
By contrast, `truncate(1)` generally invokes a single syscall, either `truncate(2)` or `ftruncate(2)`. As a consequence, `truncate(1)` is O(1) with respect to file size.
Switch to `truncate(1)` to improve runtime efficiency of the scripts.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I69dd925f36e733fc2a1ee71cb8354ee04ee8871b
show more ...
|
#
2cff3015
|
| 10-Sep-2022 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
oem_ibm: Move the NVRAM files to the hostfw directory
This commit would : - Move the NVRAM files from /var/ on the BMC to the hostfw directory so that they don't get erased during a BMC factory re
oem_ibm: Move the NVRAM files to the hostfw directory
This commit would : - Move the NVRAM files from /var/ on the BMC to the hostfw directory so that they don't get erased during a BMC factory reset.
- To help migrate existing systems, check if the files exist in /var/, and if they do, move them to the hostfw destination.
- This also adds dependent services that ensure that the links being setup correctly in var/lib/phosphor-software-manager/hostfw/ is run first.
- The services to clear PHYP NVRAM are not needed anymore. Instead of the BMC clearing them, the hypervisor will now clear them if the pvm_clear_nvram bios attribute is set.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: If8da88347a82d212b30c3cb6354037b62887c67c
show more ...
|