[−][src]Struct aw_fel::soc::Info
SoC information structure.
Each SoC variant may have its own list of memory buffers to be exchanged and the information about the placement of the thunk code, which handles the transition of execution from the BROM FEL code to the U-Boot SPL and back.
Note: the entries in the swap_buffers
tables need to be sorted by buf1
addresses. And
the buf1
addresses are the BROM data buffers, while buf2
addresses are the intended
backup locations.
Also for performance reasons, we optionally want to have MMU enabled with optimal section
attributes configured (the code from the BROM should use I-cache, writing data to the
DRAM area should use write combining). The reason is that the BROM FEL protocol
implementation moves data using the CPU somewhere on the performance critical path when
transferring data over USB. The older SoC variants (A10/A13/A20/A31/A23) already
have MMU enabled and we only need to adjust section attributes. The BROM in newer SoC
variants (A33/A83T/H3) doesn't enable MMU any more, so we need to find some 16K of
spare space in SRAM to place the translation table there and specify it as the mmu_tt_addr
field in the soc_sram_info
structure. The mmu_tt_addr
address must be 16K aligned.
Fields
soc_id: u32
ID of the SoC.
name: &'static str
Human-readable SoC name string.
spl_addr: u32
SPL load address.
scratch_addr: u32
A safe place to upload & run code.
thunk_addr: u32
Address of the thunk code.
thunk_size: u32
Maximal size of the thunk code.
needs_l2en: bool
Set the L2EN
bit.
mmu_tt_addr: Option<u32>
MMU translation table address.
sid_addr: Option<u32>
Base address for SID_KEY[0-3]
registers.
rvbar_reg: Option<u32>
MMIO address of RVBARADDR0_L
register.
swap_buffers: &'static [SRAMSwapBuffers]
SRAM buffers.
Methods
impl Info
[src]
impl Info
pub fn from_id(soc_id: u32) -> Option<Self>
[src]
pub fn from_id(soc_id: u32) -> Option<Self>
Gets the SoC information structure for the given ID, if supported.
pub fn from_version(version: &Version) -> Option<Self>
[src]
pub fn from_version(version: &Version) -> Option<Self>
Gets the SoC information structure from the given SoCVersion
, if supported.
pub fn get_soc_id(&self) -> u32
[src]
pub fn get_soc_id(&self) -> u32
Gets the SoC ID.
pub fn get_name(&self) -> &str
[src]
pub fn get_name(&self) -> &str
Gets the name of the SoC.
pub fn get_spl_addr(&self) -> u32
[src]
pub fn get_spl_addr(&self) -> u32
Gets the SPL load address for the SoC.
pub fn get_scratch_addr(&self) -> u32
[src]
pub fn get_scratch_addr(&self) -> u32
Gets the scratch address.
pub fn get_thunk_addr(&self) -> u32
[src]
pub fn get_thunk_addr(&self) -> u32
Gets the address of the thunk code.
pub fn get_thunk_size(&self) -> u32
[src]
pub fn get_thunk_size(&self) -> u32
Gets the size of the thunk code.
pub fn needs_l2en(&self) -> bool
[src]
pub fn needs_l2en(&self) -> bool
pub fn get_mmu_tt_addr(&self) -> Option<u32>
[src]
pub fn get_mmu_tt_addr(&self) -> Option<u32>
Gets the MMU translation table address.
pub fn get_sid_addr(&self) -> Option<u32>
[src]
pub fn get_sid_addr(&self) -> Option<u32>
Gets the SID
register address.
pub fn get_rvbar_reg(&self) -> Option<u32>
[src]
pub fn get_rvbar_reg(&self) -> Option<u32>
Get the RVBAR
register address, if supported.
pub fn get_swap_buffers(&self) -> &[SRAMSwapBuffers]
[src]
pub fn get_swap_buffers(&self) -> &[SRAMSwapBuffers]
Gets the SoC swap buffers.
Trait Implementations
impl Clone for Info
[src]
impl Clone for Info
fn clone(&self) -> Info
[src]
fn clone(&self) -> Info
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Info
[src]
impl Copy for Info
impl PartialEq<Info> for Info
[src]
impl PartialEq<Info> for Info
fn eq(&self, other: &Info) -> bool
[src]
fn eq(&self, other: &Info) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Info) -> bool
[src]
fn ne(&self, other: &Info) -> bool
This method tests for !=
.
impl Debug for Info
[src]
impl Debug for Info
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 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