arch/parisc/kernel/hpmc.S

Source file repositories/reference/linux-study-clean/arch/parisc/kernel/hpmc.S

File Facts

System
Linux kernel
Corpus path
arch/parisc/kernel/hpmc.S
Extension
.S
Size
7197 bytes
Lines
290
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.

Dependency Surface

Detected Declarations

Annotated Snippet

.level		1.1

#include <asm/assembly.h>
#include <asm/pdc.h>
#include <asm/psw.h>

#include <linux/linkage.h>
#include <linux/init.h>

	/*
	 * stack for os_hpmc, the HPMC handler.
	 * buffer for IODC procedures (for the HPMC handler).
	 *
	 * IODC requires 7K byte stack.  That leaves 1K byte for os_hpmc.
	 */

	.import toc_stack,data
#define hpmc_stack	toc_stack	/* re-use the TOC stack */

#define HPMC_IODC_BUF_SIZE 0x8000

	__PAGE_ALIGNED_BSS
	.align 4096
hpmc_iodc_buf:
	.block HPMC_IODC_BUF_SIZE

	.section .bss
	.align 8
hpmc_raddr:
	.block 128

#define HPMC_PIM_DATA_SIZE 896 /* Enough to hold all architected 2.0 state */

	.section .bss
	.align 8
ENTRY(hpmc_pim_data)
	.block HPMC_PIM_DATA_SIZE
END(hpmc_pim_data)

	.text

	.import intr_save, code
	.align 16
ENTRY(os_hpmc)
.os_hpmc:

	/*
	 * registers modified:
	 *
	 *   Using callee saves registers without saving them.  The
	 *   original values are in the pim dump if we need them.
	 *
	 *   r2   (rp)  return pointer
	 *   r3   address of PDCE_PROC
	 *   r4   scratch
	 *   r5   scratch
	 *   r23  (arg3) procedure arg
	 *   r24  (arg2) procedure arg
	 *   r25  (arg1) procedure arg
	 *   r26  (arg0) procedure arg
	 *   r30  (sp)   stack pointer
	 *
	 * registers read:
	 *
	 *   r26  contains address of PDCE_PROC on entry
	 *   r28  (ret0) return value from procedure
	 */

	copy    arg0, %r3       /* save address of PDCE_PROC */

Annotation

Implementation Notes