-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS-level access to CBMEM #69
Comments
@SergiiDmytruk I see, that CBMEM currently works on the platform flashed with v0.6.0 binary. I have one question: if the coreboot timestamps should be available? When I execute the following command:
In the output I see: |
@sulewskiprzemyslaw No, timestamps aren't enabled.
|
@SergiiDmytruk ok, thank you for the information. |
CONFIG_COLLECT_TIMESTAMPS=y Should be set otherwise speed comparison will not be possible. |
Definition from Kconfig:
So all x86 boards will have it. Is there a reason why POWER would not want to select it? |
I don't know if QEMU would support timer in current state, this would need testing. Other than that, we can enable it. |
We can either make it read-write and not reserve it or reserve it and do not let any access. Possible ideas
|
Dasharo/coreboot#197 was fixing this (although not in |
I think a different approach was taken since then? Confused but I think its now correctly exposed in read only now |
The commit that excludes cbmem from available memory is there, so it basically works the same. Endianness and DT stuff is done differently, but looks like the kernel can now see TPM log which used to cause issues. |
@SergiiDmytruk you are correct. For some reason I think I saw it just added entries to FDT "memreserve" fields instead of creating DT "/reserved-memory/coreboot@%llx" nodes, in which case Skiboot wouldn't mark it as reserved and OS would be allowed to overwrite it. Maybe it was on |
Nope, the necessary changes seem to be there, some commits just got squashed. |
Awaiting for the automated tests to be ready to close the issue |
This issue is fixed with linuxboot/heads#1313 and is part of the 0.7.0 release, which was published here: https://docs.dasharo.com/variants/talos_2/releases/#v070-2023-07-26 |
The problem you're addressing (if any)
After fixing memory reservation in the device tree generation code, CBMEM is no longer accessible from operating system. Previously it was marked as usable, non-reserved RAM and could be read as long as nothing overwrote it.
Describe the solution you'd like
It is mainly required by
cbmem
util from coreboot. This utility should be able to access CBMEM region either bymmap
ing it directly or by accessing some file exposed by kernel.Where is the value to a user, and who might that user be?
CBMEM holds various pieces of information about firmware, like console log or timestamps.
Describe alternatives you've considered
mmap
able” memory in device tree (note that skiboot, skiroot and final OS' kernel may modify it)The text was updated successfully, but these errors were encountered: