arch/arm64/include/asm/semihost.h

Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/semihost.h

File Facts

System
Linux kernel
Corpus path
arch/arm64/include/asm/semihost.h
Extension
.h
Size
537 bytes
Lines
25
Domain
Architecture Layer
Bucket
arch/arm64
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.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _ARM64_SEMIHOST_H_
#define _ARM64_SEMIHOST_H_

struct uart_port;

static inline void smh_putc(struct uart_port *port, unsigned char c)
{
	asm volatile("mov  x1, %0\n"
		     "mov  x0, #3\n"
		     "hlt  0xf000\n"
		     : : "r" (&c) : "x0", "x1", "memory");
}

#endif /* _ARM64_SEMIHOST_H_ */

Annotation

Implementation Notes