copy / v86

x86 PC emulator and x86-to-wasm JIT, running in the browser
https://copy.sh/v86/
BSD 2-Clause "Simplified" License
19.38k stars 1.34k forks source link

Buildroot cannot boot when enable ACPI #406

Open raspiduino opened 3 years ago

raspiduino commented 3 years ago

I created a simple Buildroot image with latest Linux kernel (you can get the .config file below, named buildroot.config in the zip file). The image can boot on v86 without any problem when I do not click the enable ACPI button. But when I tried to enable ACPI, it cannot boot and stop at the image below:
image Here is the video of the boot process:

https://user-images.githubusercontent.com/68118236/109418514-52edcb00-79fb-11eb-87f8-a2465df5c22b.mp4

(Sorry for the speed, it's my machine's slow speed, not v86's fault.) You can download the zip file here, which include the buildroot iso and .config file: buildroot.zip

Thanks for any help!

abundant-ray commented 3 years ago

86 I think this is the issue because they say that acpi breaks some oses.

BelleNottelling commented 3 years ago

When I tested the ISO you provided in V86's debug mode it boots. image

BelleNottelling commented 3 years ago

Actually. It works fine for using both chrome and Firefox in debug and non-debug mode. I wonder if this a timing issue that's made shown by a slow emulation speed? I suspect that editing V86 to enable ACPI without APIC would be a workaround for you

Edit: It just did the same thing for me in Firefox Last debug log from APIC is Write config 0x00000700 irq=0x8 vector=0x00 deliverymode=ExtINT (7) destmode=physical is_level=0 disabled=0

The delivery mode ExtINT is unimplemented in V86. We are also missing the NMI delivery mode.

Edit 2; If I'm understanding what I'm reading, these functions seem to be related to multiprocessor functionality, so I'm wondering if it's a mistake that buildroot is trying to call it?

raspiduino commented 3 years ago

I tested again and I got a Kernel panic image

abundant-ray commented 3 years ago

@BenNottelling did you test it with acpi on and off? @raspiduino it is an acpi issue as when i tested it with acpi off it worked but not with it on.

raspiduino commented 3 years ago

Yeb, no problem when I turn acpi off. I wrote that in the first comment

The image can boot on v86 without any problem when I do not click the enable ACPI button

abundant-ray commented 3 years ago

well then you now have your answer i guess. the issue is acpi dosent work with this. you dont need it anyway soooooo.