arch/mips/include/asm/octeon/cvmx-bootmem.h
Source file repositories/reference/linux-study-clean/arch/mips/include/asm/octeon/cvmx-bootmem.h
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/include/asm/octeon/cvmx-bootmem.h- Extension
.h- Size
- 11770 bytes
- Lines
- 342
- Domain
- Architecture Layer
- Bucket
- arch/mips
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct cvmx_bootmem_block_headerstruct cvmx_bootmem_named_block_descstruct cvmx_bootmem_desc
Annotated Snippet
struct cvmx_bootmem_block_header {
/*
* Note: these are referenced from assembly routines in the
* bootloader, so this structure should not be changed
* without changing those routines as well.
*/
uint64_t next_block_addr;
uint64_t size;
};
/*
* Structure for named memory blocks. Number of descriptors available
* can be changed without affecting compatibility, but name length
* changes require a bump in the bootmem descriptor version Note: This
* structure must be naturally 64 bit aligned, as a single memory
* image will be used by both 32 and 64 bit programs.
*/
struct cvmx_bootmem_named_block_desc {
/* Base address of named block */
uint64_t base_addr;
/*
* Size actually allocated for named block (may differ from
* requested).
*/
uint64_t size;
/* name of named block */
char name[CVMX_BOOTMEM_NAME_LEN];
};
/* Current descriptor versions */
/* CVMX bootmem descriptor major version */
#define CVMX_BOOTMEM_DESC_MAJ_VER 3
/* CVMX bootmem descriptor minor version */
#define CVMX_BOOTMEM_DESC_MIN_VER 0
/* First three members of cvmx_bootmem_desc_t are left in original
* positions for backwards compatibility.
*/
struct cvmx_bootmem_desc {
#if defined(__BIG_ENDIAN_BITFIELD) || defined(CVMX_BUILD_FOR_LINUX_HOST)
/* spinlock to control access to list */
uint32_t lock;
/* flags for indicating various conditions */
uint32_t flags;
uint64_t head_addr;
/* Incremented when incompatible changes made */
uint32_t major_version;
/*
* Incremented changed when compatible changes made, reset to
* zero when major incremented.
*/
uint32_t minor_version;
uint64_t app_data_addr;
uint64_t app_data_size;
/* number of elements in named blocks array */
uint32_t named_block_num_blocks;
/* length of name array in bootmem blocks */
uint32_t named_block_name_len;
/* address of named memory block descriptors */
uint64_t named_block_array_addr;
#else /* __LITTLE_ENDIAN */
uint32_t flags;
uint32_t lock;
uint64_t head_addr;
uint32_t minor_version;
uint32_t major_version;
uint64_t app_data_addr;
uint64_t app_data_size;
uint32_t named_block_name_len;
uint32_t named_block_num_blocks;
uint64_t named_block_array_addr;
#endif
};
/**
* Initialize the boot alloc memory structures. This is
* normally called inside of cvmx_user_app_init()
*
* @mem_desc_ptr: Address of the free memory list
*/
extern int cvmx_bootmem_init(void *mem_desc_ptr);
Annotation
- Detected declarations: `struct cvmx_bootmem_block_header`, `struct cvmx_bootmem_named_block_desc`, `struct cvmx_bootmem_desc`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.