arch/powerpc/boot/xz_config.h
Source file repositories/reference/linux-study-clean/arch/powerpc/boot/xz_config.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/boot/xz_config.h- Extension
.h- Size
- 1199 bytes
- Lines
- 58
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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.
Dependency Surface
types.hswab.h../../../include/linux/xz.h
Detected Declarations
function swab32pfunction be32_to_cpupfunction be32_to_cpupfunction get_unaligned_be32function put_unaligned_be32
Annotated Snippet
#ifndef __XZ_CONFIG_H__
#define __XZ_CONFIG_H__
/*
* most of this is copied from lib/xz/xz_private.h, we can't use their defines
* since the boot wrapper is not built in the same environment as the rest of
* the kernel.
*/
#include "types.h"
#include "swab.h"
static inline uint32_t swab32p(void *p)
{
uint32_t *q = p;
return swab32(*q);
}
#ifdef __LITTLE_ENDIAN__
#define get_le32(p) (*((uint32_t *) (p)))
#define cpu_to_be32(x) swab32(x)
static inline u32 be32_to_cpup(const u32 *p)
{
return swab32p((u32 *)p);
}
#else
#define get_le32(p) swab32p(p)
#define cpu_to_be32(x) (x)
static inline u32 be32_to_cpup(const u32 *p)
{
return *p;
}
#endif
static inline uint32_t get_unaligned_be32(const void *p)
{
return be32_to_cpup(p);
}
static inline void put_unaligned_be32(u32 val, void *p)
{
*((u32 *)p) = cpu_to_be32(val);
}
#define memeq(a, b, size) (memcmp(a, b, size) == 0)
#define memzero(buf, size) memset(buf, 0, size)
/* prevent the inclusion of the xz-preboot MM headers */
#define DECOMPR_MM_H
#define memmove memmove
/* xz.h needs to be included directly since we need enum xz_mode */
#include "../../../include/linux/xz.h"
#endif
Annotation
- Immediate include surface: `types.h`, `swab.h`, `../../../include/linux/xz.h`.
- Detected declarations: `function swab32p`, `function be32_to_cpup`, `function be32_to_cpup`, `function get_unaligned_be32`, `function put_unaligned_be32`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.