[][src]Struct aw_fel::FelHandle

pub struct FelHandle<'h> {
    usb_handle: UsbHandle<'h>,
    soc_version: Version,
    soc_info: Info,
}

FEL device handle.

Fields

Methods

impl<'h> FelHandle<'h>
[src]

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.

Writes U-Boot SPL into memory and executes it.

impl<'h> FelHandle<'h>
[src]

Gets the SoC information from the FEL device.

Note: This is a no-op. The SoC information is acquired during initialization.

Gets the SoC version information from the FEL device.

Note: This is a no-op. The SoC information is acquired during initialization.

Enables the L2 cache.

Gets stack information.

The result will be a tuple. The first element will be the SP_irq, while the second element will be the nuser mode SP.

Generates a default MMU translation table.

Backup MMU translation table and disable it.

Gets the TTBR0 register.

Sets the TTBR0 register to the given value.

Gets the TTBCR register.

Sets the TTBCR register to the given value.

Gets the DACR register.

Sets the DACR register to the given value.

Gets the SCTLR register.

Sets the SCTLR register to the given value.

Reads the given ARM register.

Writes the given value to the given ARM register.

Reads the SID from the SoC if it has one.

Read words chunk from the FEL device memory.

Write words chunk to the FEL device memory.

Read words chunk from the FEL device memory.

Write words chunk to the FEL device memory.

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>>

Fill memory at the given offset.

It will fill num_size bytes with the given byte.

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.

Writes to the FEL device memory at the given offset.

It will panic if the buffer overflows total memory address space.

Makes the FEL device execute the code at the given address.

Gets the SoC version information.

Reads the FEL status.

Sends a FEL request.

Reads the given data from the USB.

Writes the given data to the USB.

Sends the request type USB request.

Reads and discards the USB response. It will check if the response is correct.

Trait Implementations

impl<'h> Debug for FelHandle<'h>
[src]

Formats the value using the given formatter. Read more

impl<'h> Deref for FelHandle<'h>
[src]

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

impl<'h> Send for FelHandle<'h>

impl<'h> Sync for FelHandle<'h>

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more