Skip to content

Commit 33157e5

Browse files
committed
multiboot2: doc streamlining
1 parent de6aea4 commit 33157e5

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

multiboot2/src/efi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use core::mem::size_of;
88
#[cfg(feature = "builder")]
99
use crate::builder::traits::StructAsBytes;
1010

11-
/// EFI system table in 32 bit mode
11+
/// EFI system table in 32 bit mode tag.
1212
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
1313
#[repr(C)]
1414
pub struct EFISdt32Tag {
@@ -40,7 +40,7 @@ impl StructAsBytes for EFISdt32Tag {
4040
}
4141
}
4242

43-
/// EFI system table in 64 bit mode
43+
/// EFI system table in 64 bit mode tag.
4444
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
4545
#[repr(C)]
4646
pub struct EFISdt64Tag {

multiboot2/src/framebuffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const METADATA_SIZE: usize = size_of::<TagTypeId>()
5050
+ size_of::<u16>()
5151
+ 2 * size_of::<u8>();
5252

53-
/// The VBE Framebuffer information Tag.
53+
/// The VBE Framebuffer information tag.
5454
#[derive(ptr_meta::Pointee, Eq)]
5555
#[repr(C)]
5656
pub struct FramebufferTag {

multiboot2/src/image_load_addr.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ use {
55
core::mem::size_of,
66
};
77

8-
/// If the image has relocatable header tag, this tag contains the image's
9-
/// base physical address.
8+
/// The physical load address tag. Typically, this is only available if the
9+
/// binary was relocated, for example if the relocatable header tag was
10+
/// specified.
1011
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
1112
#[repr(C)]
1213
pub struct ImageLoadPhysAddrTag {

multiboot2/src/memory_map.rs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use {crate::builder::boxed_dst_tag, crate::builder::traits::StructAsBytes, alloc
1212

1313
const METADATA_SIZE: usize = mem::size_of::<TagTypeId>() + 3 * mem::size_of::<u32>();
1414

15-
/// This tag provides an initial host memory map.
15+
/// This tag provides an initial host memory map (legacy boot, not UEFI).
1616
///
1717
/// The map provided is guaranteed to list all standard RAM that should be
1818
/// available for normal use. This type however includes the regions occupied
@@ -151,20 +151,18 @@ pub enum MemoryAreaType {
151151
Defective = 5,
152152
}
153153

154-
/// Basic memory info
154+
/// Basic memory info tag.
155+
///
156+
/// This tag includes "basic memory information". This means (legacy) lower and
157+
/// upper memory: In Real Mode (modeled after the 8086), only the first 1MB of
158+
/// memory is accessible. Typically, the region between 640KB and 1MB is not
159+
/// freely usable, because it is used for memory-mapped IO, for instance. The
160+
/// term “lower memory” refers to those first 640KB of memory that are freely
161+
/// usable for an application in Real Mode. “Upper memory” then refers to the
162+
/// next freely usable chunk of memory, starting at 1MB up to about 10MB, in
163+
/// practice. This is the memory an application running on a 286 (which had a
164+
/// 24-bit address bus) could use, historically.
155165
///
156-
/// This tag includes "basic memory information".
157-
/// This means (legacy) lower and upper memory:
158-
/// In Real Mode (modeled after the 8086),
159-
/// only the first 1MB of memory is accessible.
160-
/// Typically, the region between 640KB and 1MB is not freely usable,
161-
/// because it is used for memory-mapped IO, for instance.
162-
/// The term “lower memory” refers to those first 640KB of memory that are
163-
/// freely usable for an application in Real Mode.
164-
/// “Upper memory” then refers to the next freely usable chunk of memory,
165-
/// starting at 1MB up to about 10MB, in practice.
166-
/// This is the memory an application running on a 286
167-
/// (which had a 24-bit address bus) could use, historically.
168166
/// Nowadays, much bigger chunks of continuous memory are available at higher
169167
/// addresses, but the Multiboot standard still references those two terms.
170168
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
@@ -204,7 +202,7 @@ impl StructAsBytes for BasicMemoryInfoTag {
204202

205203
const EFI_METADATA_SIZE: usize = mem::size_of::<TagTypeId>() + 3 * mem::size_of::<u32>();
206204

207-
/// EFI memory map as per EFI specification.
205+
/// EFI memory map tag. The [`EFIMemoryDesc`] follows the EFI specification.
208206
#[derive(ptr_meta::Pointee, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
209207
#[repr(C)]
210208
pub struct EFIMemoryMapTag {
@@ -274,7 +272,7 @@ impl StructAsBytes for EFIMemoryDesc {
274272
}
275273
}
276274

277-
/// EFI ExitBootServices was not called
275+
/// EFI ExitBootServices was not called tag.
278276
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
279277
#[repr(C)]
280278
pub struct EFIBootServicesNotExitedTag {

multiboot2/src/module.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ use {
1212

1313
const METADATA_SIZE: usize = size_of::<TagTypeId>() + 3 * size_of::<u32>();
1414

15-
/// This tag indicates to the kernel what boot module was loaded along with
16-
/// the kernel image, and where it can be found.
15+
/// The module tag can occur multiple times and specifies passed boot modules
16+
/// (blobs in memory). The tag itself doesn't include the blog, but references
17+
/// its location.
1718
#[derive(ptr_meta::Pointee, PartialEq, Eq, PartialOrd, Ord, Hash)]
1819
#[repr(C)]
1920
pub struct ModuleTag {

0 commit comments

Comments
 (0)