arch/sparc/lib/memset.S
Source file repositories/reference/linux-study-clean/arch/sparc/lib/memset.S
File Facts
- System
- Linux kernel
- Corpus path
arch/sparc/lib/memset.S- Extension
.S- Size
- 3861 bytes
- Lines
- 198
- Domain
- Architecture Layer
- Bucket
- arch/sparc
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
linux/export.hasm/ptrace.h
Detected Declarations
export __bzeroexport memset
Annotated Snippet
#include <linux/export.h>
#include <asm/ptrace.h>
/* Work around cpp -rob */
#define ALLOC #alloc
#define EXECINSTR #execinstr
#define EX(x,y,a,b) \
98: x,y; \
.section .fixup,ALLOC,EXECINSTR; \
.align 4; \
99: retl; \
a, b, %o0; \
.section __ex_table,ALLOC; \
.align 4; \
.word 98b, 99b; \
.text; \
.align 4
#define STORE(source, base, offset, n) \
98: std source, [base + offset + n]; \
.section .fixup,ALLOC,EXECINSTR; \
.align 4; \
99: ba 30f; \
sub %o3, n - offset, %o3; \
.section __ex_table,ALLOC; \
.align 4; \
.word 98b, 99b; \
.text; \
.align 4;
#define STORE_LAST(source, base, offset, n) \
EX(std source, [base - offset - n], \
add %o1, offset + n);
/* Please don't change these macros, unless you change the logic
* in the .fixup section below as well.
* Store 64 bytes at (BASE + OFFSET) using value SOURCE. */
#define ZERO_BIG_BLOCK(base, offset, source) \
STORE(source, base, offset, 0x00); \
STORE(source, base, offset, 0x08); \
STORE(source, base, offset, 0x10); \
STORE(source, base, offset, 0x18); \
STORE(source, base, offset, 0x20); \
STORE(source, base, offset, 0x28); \
STORE(source, base, offset, 0x30); \
STORE(source, base, offset, 0x38);
#define ZERO_LAST_BLOCKS(base, offset, source) \
STORE_LAST(source, base, offset, 0x38); \
STORE_LAST(source, base, offset, 0x30); \
STORE_LAST(source, base, offset, 0x28); \
STORE_LAST(source, base, offset, 0x20); \
STORE_LAST(source, base, offset, 0x18); \
STORE_LAST(source, base, offset, 0x10); \
STORE_LAST(source, base, offset, 0x08); \
STORE_LAST(source, base, offset, 0x00);
.text
.align 4
.globl __bzero_begin
__bzero_begin:
.globl __bzero
.type __bzero,#function
.globl memset
EXPORT_SYMBOL(__bzero)
EXPORT_SYMBOL(memset)
memset:
mov %o0, %g1
Annotation
- Immediate include surface: `linux/export.h`, `asm/ptrace.h`.
- Detected declarations: `export __bzero`, `export memset`.
- Atlas domain: Architecture Layer / arch/sparc.
- Implementation status: integration 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.