Jump to payload.
Bug: 223166344
Test: Ran --unprotected-vm-with-firmware with crosvm.
Change-Id: Iae70e60556caa8d3501c86cb3d7fd1b69f179127
diff --git a/pvmfw/src/main.rs b/pvmfw/src/main.rs
index 0d71f6e..8526a92 100644
--- a/pvmfw/src/main.rs
+++ b/pvmfw/src/main.rs
@@ -30,4 +30,15 @@
"fdt_address={:#018x}, payload_start={:#018x}, payload_size={:#018x}, x3={:#018x}",
fdt_address, payload_start, payload_size, arg3,
);
+
+ println!("Starting payload...");
+ // Safe because this is a function we have implemented in assembly that matches its signature
+ // here.
+ unsafe {
+ start_payload(fdt_address, payload_start);
+ }
+}
+
+extern "C" {
+ fn start_payload(fdt_address: u64, payload_start: u64) -> !;
}