v86
v86 copied to clipboard
Boot Redox OS
Redox OS is an OS written in Rust https://www.redox-os.org/ Trying to boot the latest ISO from https://gitlab.redox-os.org/redox-os/redox/-/releases fails. I allocate 500 MB RAM and 8 MB VRAM. This is the text output (it seems to freeze afterwards):
Booting from DVD/CD...
ISOLINUX 6.03 20151222 ETCD Copyright (C) 1994-2014 H. Peter Anvin et al
Loading /isolinux/memdisk... ok
Loading /livedisk.gz...ok
MEMDISK 6.03 20151222 Copyright 2001-2014 H. Peter Anvin et al
e820: 0000000000000000 000000000009fc00 1
e820: 000000000009fc00 0000000000000400 2
e820: 00000000000f0000 0000000000010000 2
e820: 0000000000100000 0000000038300000 1
e820: 00000000fffc0000 0000000000040000 2
Ramdisk at 0x35411000, length 0x02feedf8
Moving compressed data from 0x35411000 to 0x24ae3200
gzip image: decompressed addr 0x27ad2000, len 0x1092e000
Probably requires https://github.com/copy/v86/issues/133, unless they have an i386 build somewhere.
Redox 0.8 released with i686 support, and it works out of the box in v86, when acpi is enabled: https://copy.sh/v86/?profile=redox
It's very laggy though, and some investigation is needed why that is the case.
I am looking into this.
Seems to be rendering.
Two things on Redox's side:
- VGA memory is written byte-wise. On v86, this is much slower than word-wise (or even better, 128-bit SSE writes), since v86 needs to emulate paging (wasm doesn't have mmap or similar)
- VGA memory is written completely on every frame, rather than just areas that changed (you can see this by turning on paint flashing in your browser's devtools; compare for example to ReactOS). This also affects idle CPU usage.
On v86's side:
- VGA memory writes are handled in the slow path of the jit paging mechanism. Instead, we could return a pointer to vga memory and use the fast path (in that case, those TLB entries need to be cleared after rendering, to detect new changes).