arch/parisc/kernel/relocate_kernel.S
Source file repositories/reference/linux-study-clean/arch/parisc/kernel/relocate_kernel.S
File Facts
- System
- Linux kernel
- Corpus path
arch/parisc/kernel/relocate_kernel.S- Extension
.S- Size
- 2874 bytes
- Lines
- 150
- 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
linux/linkage.hlinux/kexec.hasm/assembly.hasm/asm-offsets.hasm/page.hasm/setup.hasm/psw.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#include <linux/linkage.h>
#include <linux/kexec.h>
#include <asm/assembly.h>
#include <asm/asm-offsets.h>
#include <asm/page.h>
#include <asm/setup.h>
#include <asm/psw.h>
.level PA_ASM_LEVEL
.macro kexec_param name
.align 8
ENTRY(kexec\()_\name)
#ifdef CONFIG_64BIT
.dword 0
#else
.word 0
#endif
ENTRY(kexec\()_\name\()_offset)
.word kexec\()_\name - relocate_new_kernel
.endm
.text
/* args:
* r26 - kimage->head
* r25 - start address of kernel
* r24 - physical address of relocate code
*/
ENTRY_CFI(relocate_new_kernel)
0: copy %arg1, %rp
/* disable I and Q bit, so we are allowed to execute RFI */
rsm PSW_SM_I, %r0
nop
nop
nop
nop
nop
nop
nop
rsm PSW_SM_Q, %r0
nop
nop
nop
nop
nop
nop
nop
/*
* After return-from-interrupt, we want to run without Code/Data
* translation enabled just like on a normal boot.
*/
/* calculate new physical execution address */
ldo 1f-0b(%arg2), %r1
mtctl %r0, %cr17 /* IIASQ */
mtctl %r0, %cr17 /* IIASQ */
mtctl %r1, %cr18 /* IIAOQ */
ldo 4(%r1),%r1
mtctl %r1, %cr18 /* IIAOQ */
#ifdef CONFIG_64BIT
depdi,z 1, PSW_W_BIT, 1, %r1
mtctl %r1, %cr22 /* IPSW */
#else
mtctl %r0, %cr22 /* IPSW */
Annotation
- Immediate include surface: `linux/linkage.h`, `linux/kexec.h`, `asm/assembly.h`, `asm/asm-offsets.h`, `asm/page.h`, `asm/setup.h`, `asm/psw.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.