| 749 | } |
| 750 | |
| 751 | fn create_psci_node(fdt: &mut FdtWriter) -> FdtWriterResult<()> { |
| 752 | let compatible = "arm,psci-0.2"; |
| 753 | let psci_node = fdt.begin_node("psci")?; |
| 754 | fdt.property_string("compatible", compatible)?; |
| 755 | // Two methods available: hvc and smc. |
| 756 | // As per documentation, PSCI calls between a guest and hypervisor may use the HVC conduit instead of SMC. |
| 757 | // So, since we are using kvm, we need to use hvc. |
| 758 | fdt.property_string("method", "hvc")?; |
| 759 | fdt.end_node(psci_node)?; |
| 760 | |
| 761 | Ok(()) |
| 762 | } |
| 763 | |
| 764 | fn create_virtio_node<T: DeviceInfoForFdt + Clone + Debug>( |
| 765 | fdt: &mut FdtWriter, |