Struct aw_fel::FelHandle
[−]
[src]
pub struct FelHandle<'h> { /* fields omitted */ }
FEL device handle.
Methods
impl<'h> FelHandle<'h>
[src]
fn write_uboot_image(&self, uboot: &[u8]) -> Result<(u32, u32)>
This function tests a given buffer for a valid U-Boot image. Upon success, the image data gets transferred to the default memory address stored within the image header; and the function returns the U-Boot entry point (offset) and size values, in that order.
fn write_and_execute_spl(&self, spl: &[u8]) -> Result<()>
Writes U-Boot SPL into memory and executes it.
impl<'h> FelHandle<'h>
[src]
fn get_soc_info(&self) -> &SocInfo
Gets the SoC information from the FEL device.
Note: This is a no-op. The SoC information is acquired during initialization.
fn get_version_info(&self) -> &SocVersion
Gets the SoC version information from the FEL device.
Note: This is a no-op. The SoC information is acquired during initialization.
fn read_sid(&self) -> Result<Option<[u32; 4]>>
Reads the SID from the SoC if it has one.
fn read_words(&self, offset: u32, words: &mut [u32]) -> Result<()>
Read words chunk from the FEL device memory.
fn write_words(&self, offset: u32, words: &[u32]) -> Result<()>
Write words chunk to the FEL device memory.
fn rmr_request(&self, entry_point: u32, aarch64: bool) -> Result<()>
Perform FEL RMR request.
This function stores a given entry point to the RVBAR
address for CPU0, and then writes
the Reset Management Register to request a warm boot.
It is useful with some AArch64 transitions, e.g. when passing control to ARM Trusted
Firmware (ATF) during the boot process of Pine64.
The code was inspired by U-boot
Methods from Deref<Target = UsbHandle<'h>>
fn fel_fill(&self, offset: u32, num_bytes: u32, byte: u8) -> Result<()>
Fill memory at the given offset.
It will fill num_size
bytes with the given byte.
fn fel_read(&self, offset: u32, buf: &mut [u8]) -> Result<()>
Reads from the FEL device memory at the given offset.
It will fill all the given buffer, but it will panic if the buffer overflows total memory address space.
fn fel_write(&self, offset: u32, buf: &[u8]) -> Result<()>
Writes to the FEL device memory at the given offset.
It will panic if the buffer overflows total memory address space.
fn fel_execute(&self, offset: u32) -> Result<()>
Makes the FEL device execute the code at the given address.