In this patch, I remove all the direct uses of phys_ram_base
from hw/pc.c, except for those presently needed to construct the
arguments to the vga init functions.
This involved:
* Getting rid of various additions and subtractions of phys_ram_base
* Changing the types of the guest physical addresses in load_linux
from uint8_t* to target_phys_addr_t
* Replacing calls to memcpy and pstrcpy with
cpu_physical_memory_write (and a new pstrcpy_targphys function)
* Replacing most calls to fread with a new fread_targphys function
* Deprecating load_image in favour of a new load_image_targphys
* Removing (rather than fixing up) the unused function load_kernel
I noticed that load_image doesn't take a buffer size argument - it
just overwrites the destination buffer with file data, extending as
long as the file happens to be. In most cases this is probably not an
exploitable vulnerability, but it seems poor practice. Hence
load_image_targphys's extra argument.