From 93ede2effeb0edbb0866520f8022398e2b251468 Mon Sep 17 00:00:00 2001 From: garasubo Date: Sat, 5 Aug 2023 16:20:13 +0900 Subject: [PATCH] fix serial port detection logic Before this PR, we assume that a serial port is disalbed if the status propery does not exist. But according to the document, a node is enabled if the status propery does not exist Ref: https://elinux.org/Device_Tree_Linux#status_property --- src/hypervisor_bootloader/src/dtb.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hypervisor_bootloader/src/dtb.rs b/src/hypervisor_bootloader/src/dtb.rs index cfcdcea..8150d63 100644 --- a/src/hypervisor_bootloader/src/dtb.rs +++ b/src/hypervisor_bootloader/src/dtb.rs @@ -457,7 +457,8 @@ impl DtbNode { if let Some((p, _)) = s.search_pointer_to_property(PROP_STATUS, dtb)? { Ok(Some(Self::match_string(p, PROP_STATUS_OKAY))) } else { - Ok(None) + // A node is enabled if status property does not exist. + Ok(Some(true)) } }