#[repr(C, align(8))]pub struct AddressHeaderTag { /* private fields */ }
Expand description
Binary address information for non-ELF images.
This information does not need to be provided if the kernel image is in ELF format, but it must be provided if the image is in a.out format or in some other format. Required for legacy boot (BIOS). Determines load addresses.
Implementations§
Source§impl AddressHeaderTag
impl AddressHeaderTag
Sourcepub const fn new(
flags: HeaderTagFlag,
header_addr: u32,
load_addr: u32,
load_end_addr: u32,
bss_end_addr: u32,
) -> Self
pub const fn new( flags: HeaderTagFlag, header_addr: u32, load_addr: u32, load_end_addr: u32, bss_end_addr: u32, ) -> Self
Constructs a new tag.
Sourcepub const fn typ(&self) -> HeaderTagType
pub const fn typ(&self) -> HeaderTagType
Returns the HeaderTagType
.
Sourcepub const fn flags(&self) -> HeaderTagFlag
pub const fn flags(&self) -> HeaderTagFlag
Returns the HeaderTagFlag
s.
Sourcepub const fn header_addr(&self) -> u32
pub const fn header_addr(&self) -> u32
Returns the header address.
Sourcepub const fn load_end_addr(&self) -> u32
pub const fn load_end_addr(&self) -> u32
Returns the load end address.
Sourcepub const fn bss_end_addr(&self) -> u32
pub const fn bss_end_addr(&self) -> u32
Returns the bss end address.
Trait Implementations§
Source§impl Clone for AddressHeaderTag
impl Clone for AddressHeaderTag
Source§fn clone(&self) -> AddressHeaderTag
fn clone(&self) -> AddressHeaderTag
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AddressHeaderTag
impl Debug for AddressHeaderTag
Source§impl Hash for AddressHeaderTag
impl Hash for AddressHeaderTag
Source§impl MaybeDynSized for AddressHeaderTag
impl MaybeDynSized for AddressHeaderTag
Source§const BASE_SIZE: usize = 24usize
const BASE_SIZE: usize = 24usize
The true base size of the struct without any implicit or additional
padding. Note that
size_of::<T>()
isn’t sufficient, as for example
the type could have three u32
fields, which would add an implicit
u32
padding. However, this constant must always fulfill
BASE_SIZE >= size_of::<Self::Header>()
. Read moreSource§type Header = HeaderTagHeader
type Header = HeaderTagHeader
The associated
Header
of this tag.Source§fn dst_len(_header: &Self::Header) -> Self::Metadata
fn dst_len(_header: &Self::Header) -> Self::Metadata
Returns the amount of items in the dynamically sized portion of the
DST. Note that this is not the amount of bytes. So if the dynamically
sized portion is 16 bytes in size and each element is 4 bytes big, then
this function must return 4. Read more
Source§fn payload(&self) -> &[u8]
fn payload(&self) -> &[u8]
Returns the payload, i.e., all memory that is not occupied by the
Header
of the type.Source§impl Ord for AddressHeaderTag
impl Ord for AddressHeaderTag
Source§fn cmp(&self, other: &AddressHeaderTag) -> Ordering
fn cmp(&self, other: &AddressHeaderTag) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AddressHeaderTag
impl PartialEq for AddressHeaderTag
Source§impl PartialOrd for AddressHeaderTag
impl PartialOrd for AddressHeaderTag
Source§impl Tag for AddressHeaderTag
impl Tag for AddressHeaderTag
Source§const ID: HeaderTagType = HeaderTagType::Address
const ID: HeaderTagType = HeaderTagType::Address
The ID of this tag. This should be unique across all implementors. Read more
Source§type IDType = HeaderTagType
type IDType = HeaderTagType
The ID type that identifies the tag.
impl Copy for AddressHeaderTag
impl Eq for AddressHeaderTag
impl StructuralPartialEq for AddressHeaderTag
Auto Trait Implementations§
impl Freeze for AddressHeaderTag
impl RefUnwindSafe for AddressHeaderTag
impl Send for AddressHeaderTag
impl Sync for AddressHeaderTag
impl Unpin for AddressHeaderTag
impl UnwindSafe for AddressHeaderTag
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more