Commit Graph

3 Commits

Author SHA1 Message Date
Andrew Walbran 3280f5f456 Load pvmfw as pVM firmware rather than bootloader.
Using the old memory layout for now.

Bug: 223166344
Test: Ran --unprotected-vm-with-firmware with patched crosvm.
Change-Id: I91d289828800e5e7eefffc00c964713153cc9ad5
2022-05-12 14:20:22 +00:00
Andrew Walbran a0ecabdae4 Move writable data to a higher block of memory.
This means we can map the text and rodata sections read-only, and enable
WXN. The data section must be copied from its (now readonly) load
address to the writable block.

Bug: 223166344
Test: Ran unprotected VM under crosvm.
Change-Id: I9105f200c8bd937f6e3a504fed7d0fb5e38ff366
2022-04-13 14:12:16 +00:00
Andrew Walbran 267f6c1fcc Use hardcoded pagetable initially.
This pagetable is built into the binary, and maps device memory and
enough RAM for the DT and image. It can later be replaced by a proper
pagetable built in Rust.

Using a hardcoded pagetable means we avoid making any memory access
before enabling it, which avoids a bunch of cache issues.

Bug: 223166344
Test: Ran unprotected VM under crosvm.
Change-Id: I567e377ab93881aa357428f750b11be6b3aad034
2022-04-13 14:08:00 +00:00