Skip to content
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

Firmware update for QEMU to extend Dasharo ecosystem testability #542

Open
pietrushnic opened this issue Oct 23, 2023 · 5 comments
Open
Labels
DasharoToolsSuite enhancement New feature or request qemu_q35 QEMU Q35

Comments

@pietrushnic
Copy link

The problem you're addressing (if any)

Currently, we use only firmware binary file replacement on the host system, QEMU runs. This limits the scope of possible tests, excluding capsule updates and flashrom testing. It also limits the DTS and potential fwupd/LVFS testing scope.

Describe the solution you'd like

Out QEMU Q35 release should support some (even fake) update methods, which would work from the perspective of the user and operating system.

Where is the value to a user, and who might that user be?

Extended validation scope will help keep the Dasharo release stable and reliable.

Describe alternatives you've considered

No response

Additional context

No response

@pietrushnic pietrushnic added enhancement New feature or request qemu_q35 QEMU Q35 labels Oct 23, 2023
@tlaurion
Copy link

Related linuxboot/heads#1203

@krystian-hebel
Copy link

QEMU Q35 is able to write to flash file when it is mounted as -drive if=pflash.

Writing itself is very peculiar, code for doing so can be found in https://github.com/tianocore/edk2/blob/master/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c, I wasn't able to find any concrete documentation on this. It is different from real-life flash devices, i.e. you don't have to erase before writing, write is able to change bits both ways (1 to 0 and 0 to 1). Erase is still available, probably to make higher level APIs at least somewhat similar to physical devices. Block size seems to be 4K (https://github.com/tianocore/edk2/blob/987bea6525d70cd01649472c93d19f89d41d83a2/OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc#L72, https://github.com/tianocore/edk2/blob/987bea6525d70cd01649472c93d19f89d41d83a2/OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc#L11), not sure if this is configurable.

@tlaurion
Copy link

tlaurion commented May 8, 2024

Ideal would be flashrom/flashprog support

@krystian-hebel
Copy link

When doing preliminary tests for QEMU Q35 v0.2.0 I got an error on DTS test in network-boot.robot. Since SMBIOS says that it already is Dasharo firmware, DTS doesn't show Install Dasharo firmware, and since there is no update known to DTS, there is no Update Dasharo firmware. We don't plan to include any form of firmware update in this release, so this error will have to be listed as a known issue until we implement Capsule Updates.

@tlaurion
Copy link

There were discussions recently under https://matrix.to/#/!MwWOJhMJzlxIdAQxae:matrix.3mdeb.com/$pz0BK_27nv2BlRyD9BhtZCwE2ccr3QPI9qouxV9xVZw?via=matrix.org&via=nitro.chat&via=matrix.3mdeb.com

Ws wondering if work is happening somewhere for qemu/flashrom/flashprog?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DasharoToolsSuite enhancement New feature or request qemu_q35 QEMU Q35
Projects
None yet
Development

No branches or pull requests

5 participants