v86 icon indicating copy to clipboard operation
v86 copied to clipboard

Boot Redox OS

Open mehlon opened this issue 5 years ago • 4 comments

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

mehlon avatar Nov 04 '19 22:11 mehlon

Probably requires https://github.com/copy/v86/issues/133, unless they have an i386 build somewhere.

copy avatar Nov 04 '19 23:11 copy

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.

copy avatar Nov 27 '22 03:11 copy

I am looking into this.

jackpot51 avatar Mar 02 '23 18:03 jackpot51

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).

copy avatar Sep 03 '23 00:09 copy