Map the system and video BIOSes with PROT_WRITE for x86emu.
commit640598459c4bb508c6ab6aba734c49c4bee2f3f7
authorMichał Januszewski <spock@gentoo.org>
Mon, 3 Nov 2008 23:24:17 +0000 (4 00:24 +0100)
committerMichał Januszewski <spock@gentoo.org>
Mon, 3 Nov 2008 23:24:17 +0000 (4 00:24 +0100)
treef7a9fd49a50e5c9d03763e1fc428c2915368cca4
parenta35294831cb18a936e506cf1522c79a160f37e2a
Map the system and video BIOSes with PROT_WRITE for x86emu.

https://bugs.gentoo.org/show_bug.cgi?id=245254 provides an example
of a system which requires the Video BIOS and the System BIOS to
be mapped with read-write protections for the emulation to work
correctly.

Since only a few systems exhibit this property, this patch only
fixes this problem in x86emu.  The lrmi backend is left unchanged.
Mapping the BIOS with PROT_WRITE there would cause it to break
on PaX systems.  This is not an issue for x86emu, where the code
is never directly executed (and thus the BIOS pages are not mapped
with PROT_EXEC).
v86_mem.c