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

Add TPM 1.2, 2.0 emulation, UEFI with Secure Boot emulation on Bochs x86 emulator #265

Open
youself64github opened this issue Feb 9, 2024 · 7 comments
Labels
bios enhancement New feature or request

Comments

@youself64github
Copy link

Windows 11 requires TPM 2.0 and UEFI with Secure Boot and also, Some OSes only work in UEFI and not in Legacy BIOS, So Bochs x86 emulator needs to add TPM 1.2, TPM 2.0, UEFI BIOS with Secure Boot Support emulation.

@stlintel stlintel added the enhancement New feature or request label Feb 10, 2024
@DrChat
Copy link
Contributor

DrChat commented Mar 7, 2024

Some prior work/discussion with UEFI:
https://sourceforge.net/p/bochs/mailman/bochs-developers/thread/020e01caf5f5%24c4c7c6e0%244e5754a0%24%40com/
https://forum.osdev.org/viewtopic.php?f=1&t=33440

Note that Bochs actually already effectively supports UEFI. I had to bump BIOSROMSZ, and OVMF loads up just fine.

@DrChat
Copy link
Contributor

DrChat commented Mar 8, 2024

Note that OVMF does not embed ACPI tables anymore - they defer to qemu via a pseudo fwcfg device: https://vinxue.github.io/2022/03/01/ovmf_uefi_with_acpi.html

https://github.com/tianocore/edk2/blob/ccf91b518f22102d446f26320110d30ea0fc1fa9/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c#L45
https://github.com/tianocore/edk2/blob/ccf91b518f22102d446f26320110d30ea0fc1fa9/OvmfPkg/Library/AcpiPlatformLib/QemuFwCfgAcpi.c#L1099

This would need to be implemented by Bochs in order to boot into Windows. Specifically, the bootloader requires the MADT table.

@DrChat
Copy link
Contributor

DrChat commented Mar 13, 2024

@stlintel Would you accept a PR that bumps BIOSROMSZ to 4M? It's needed in order to run a standard OVMF build.

I am not alone here. I think it can be accepted.

@DrChat
Copy link
Contributor

DrChat commented Mar 18, 2024

Note: For reference, I'm using OVMF based on edk2-stable202105 with this patchset:
bochs.patch

@youself64github
Copy link
Author

I tried OVMF bios on Bochs, but it panics then Bochs crashed for me.

@godmar
Copy link

godmar commented May 21, 2024

Could you clarify - are you saying that Bochs 2.7/2.8 does not provide ACPI tables such as the RSDT and MADT at all when used with its default BIOS?

I just updated our teaching OS to implement ACPI (since Qemu is phasing out MPP tables) and although we mostly use Qemu, we'd love to retain the ability to support Bochs as well, but ideally not at the price of having both an ACPI and an MPP based implementation - we'd like to keep our code small.

@godmar
Copy link

godmar commented May 21, 2024

Could you clarify - are you saying that Bochs 2.7/2.8 does not provide ACPI tables such as the RSDT and MADT at all when used with its default BIOS?

I just updated our teaching OS to implement ACPI (since Qemu is phasing out MPP tables) and although we mostly use Qemu, we'd love to retain the ability to support Bochs as well, but ideally not at the price of having both an ACPI and an MPP based implementation - we'd like to keep our code small.

Following up on my own question - no, Bochs does support ACPI tables in its default (legacy boot) configuration. This thread is about future UEFI support.

@stlintel stlintel added the bios label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bios enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants