Skip to content

Commit

Permalink
fix serial port detection logic
Browse files Browse the repository at this point in the history
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
  • Loading branch information
garasubo committed Aug 5, 2023
1 parent a0cacb8 commit 93ede2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hypervisor_bootloader/src/dtb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down

0 comments on commit 93ede2e

Please sign in to comment.