#[repr(C)]pub struct Block<const N: usize> { /* private fields */ }
Expand description
A Block as understood by the Boot ROM.
This could be an Image Definition, or a Partition Table, or maybe some other kind of block.
It contains within the special start and end markers the Boot ROM is looking for.
Implementations§
Source§impl<const N: usize> Block<N>
impl<const N: usize> Block<N>
Sourcepub const fn new(items: [u32; N]) -> Block<N>
pub const fn new(items: [u32; N]) -> Block<N>
Construct a new Binary Block, with the given items.
The length, and the Start and End markers are added automatically. The Block Loop pointer initially points to itself.
Sourcepub const fn with_offset(self, offset: *const u32) -> Block<N>
pub const fn with_offset(self, offset: *const u32) -> Block<N>
Change the Block Loop offset value.
This method isn’t that useful because you can’t evaluate the difference between two pointers in a const context as the addresses aren’t assigned until long after the const evaluator has run.
If you think you need this method, you might want to set a unique random value here and swap it for the real offset as a post-processing step.
Source§impl Block<1>
impl Block<1>
Sourcepub const fn arch_exe(security: Security, architecture: Architecture) -> Self
pub const fn arch_exe(security: Security, architecture: Architecture) -> Self
Construct a new IMAGE_DEF Block, for an EXE with the given security and architecture.
Sourcepub const fn exe(security: Security) -> Self
pub const fn exe(security: Security) -> Self
Construct a new IMAGE_DEF Block, for an EXE with the given security.
The target architecture is taken from the current build target (i.e. Arm or RISC-V).
Sourcepub const fn non_secure_exe() -> Self
pub const fn non_secure_exe() -> Self
Construct a new IMAGE_DEF Block, for a Non-Secure EXE.
The target architecture is taken from the current build target (i.e. Arm or RISC-V).
Sourcepub const fn secure_exe() -> Self
pub const fn secure_exe() -> Self
Construct a new IMAGE_DEF Block, for a Secure EXE.
The target architecture is taken from the current build target (i.e. Arm or RISC-V).