04.05.2012 02:46, Bart Oldeman wrote: > There are three things here: > 1. MAP_32BIT should really have been called MAP_31BIT (see the man > page), so it already has bit 32 0. > 2. But it's a no-op for 32 bit DOSEMU, so to force first the 2GB for > 32-bit DOSEMU you need to give mmap() a hint like for dpmi_base, so > mmap will look for a VMA that is closeby. OK, but I think both the above points are very linux-specific and may even change.
> 3. Though I suspect but am not sure that in this case high addresses > are not a problem in this case because real DOS DPMI servers without > paging would just have virtual address = hardware address, and the > hardware address is often very high, like 0xe0000000 for LFBs. I think someone will correct me here if I speculate that the older ISA cards were limited to the 16Mb space (I am not sure too) > Mainly the MAP_32BIT is just there because during the x86-64 port work > is was by far the most straightforward way of getting things working. I know, I am just saying that _depending_ on it, and creating an API assumptions on it, is not good. It was fine for porting, but if we are to clean the things up, lets get rid of that, and not of the things that were "by design". With the current design, you can remove MAP_32BIT and the API will remain the same: its just that mmap_mapping_kmem() (or whatever it is called) will start returning the different address rather than the same one. Also, how would you implement the "map device" DPMI function? (0x508) This cannot be done without remapping, so just statically map and then only mprotect is not enough. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Dosemu-devel mailing list Dosemu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dosemu-devel