arch/parisc/kernel/real2.S
Source file repositories/reference/linux-study-clean/arch/parisc/kernel/real2.S
File Facts
- System
- Linux kernel
- Corpus path
arch/parisc/kernel/real2.S- Extension
.S- Size
- 6416 bytes
- Lines
- 293
- Domain
- Architecture Layer
- Bucket
- arch/parisc
- Inferred role
- Architecture Layer: arch/parisc
- Status
- atlas-only
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
asm/pdc.hasm/psw.hasm/assembly.hasm/asm-offsets.hlinux/linkage.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#include <asm/pdc.h>
#include <asm/psw.h>
#include <asm/assembly.h>
#include <asm/asm-offsets.h>
#include <linux/linkage.h>
.export real_stack
.export real64_stack
__PAGE_ALIGNED_BSS
real_stack:
real64_stack:
.block 8192
#define N_SAVED_REGS 9
.section .bss
save_cr_space:
.block REG_SZ * N_SAVED_REGS
save_cr_end:
/************************ 32-bit real-mode calls ***********************/
/* This can be called in both narrow and wide kernels */
.text
/* unsigned long real32_call_asm(unsigned int *sp,
* unsigned int *arg0p,
* unsigned int iodc_fn)
* sp is value of stack pointer to adopt before calling PDC (virt)
* arg0p points to where saved arg values may be found
* iodc_fn is the IODC function to call
*/
ENTRY_CFI(real32_call_asm)
STREG %rp, -RP_OFFSET(%sp) /* save RP */
#ifdef CONFIG_64BIT
callee_save
ldo 2*REG_SZ(%sp), %sp /* room for a couple more saves */
STREG %r27, -1*REG_SZ(%sp)
STREG %r29, -2*REG_SZ(%sp)
#endif
STREG %sp, -REG_SZ(%arg0) /* save SP on real-mode stack */
copy %arg0, %sp /* adopt the real-mode SP */
/* save iodc_fn */
copy %arg2, %r31
/* load up the arg registers from the saved arg area */
/* 32-bit calling convention passes first 4 args in registers */
ldw 0(%arg1), %arg0 /* note overwriting arg0 */
ldw -8(%arg1), %arg2
ldw -12(%arg1), %arg3
ldw -4(%arg1), %arg1 /* obviously must do this one last! */
tophys_r1 %sp
b,l rfi_virt2real,%r2
nop
b,l save_control_regs,%r2 /* modifies r1, r2, r28 */
nop
#ifdef CONFIG_64BIT
rsm PSW_SM_W, %r0 /* go narrow */
#endif
load32 PA(ric_ret), %r2
bv 0(%r31)
nop
Annotation
- Immediate include surface: `asm/pdc.h`, `asm/psw.h`, `asm/assembly.h`, `asm/asm-offsets.h`, `linux/linkage.h`.
- Atlas domain: Architecture Layer / arch/parisc.
- Implementation status: atlas-only.
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.