[pvmfw] Use separate heap for shared memory
Use a separate heap for shared memory allocation on platforms such as
Gunyah, that do not support an API for guest to share its memory with
host at runtime. The separate heap is initialized from the memory
range indicated in swiotlb node's reg property.
Test: m pvmfw_img
Bug: 271493784
Change-Id: I784626c27024f647672abcb4e844903e6dc7be70
diff --git a/pvmfw/src/fdt.rs b/pvmfw/src/fdt.rs
index 065159c..70916ac 100644
--- a/pvmfw/src/fdt.rs
+++ b/pvmfw/src/fdt.rs
@@ -436,7 +436,7 @@
}
#[derive(Debug)]
-struct SwiotlbInfo {
+pub struct SwiotlbInfo {
addr: Option<usize>,
size: usize,
align: usize,
@@ -580,7 +580,7 @@
num_cpus: usize,
pci_info: PciInfo,
serial_info: SerialInfo,
- swiotlb_info: SwiotlbInfo,
+ pub swiotlb_info: SwiotlbInfo,
}
impl DeviceTreeInfo {