include/uapi/linux/kd.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/kd.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/kd.h- Extension
.h- Size
- 6515 bytes
- Lines
- 191
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/compiler.h
Detected Declarations
struct consolefontdescstruct unipairstruct unimapdescstruct unimapinitstruct kbentrystruct kbsentrystruct kbdiacrstruct kbdiacrsstruct kbdiacrucstruct kbdiacrsucstruct kbkeycodestruct kbd_repeatstruct console_font_opstruct console_font
Annotated Snippet
struct consolefontdesc {
unsigned short charcount; /* characters in font (256 or 512) */
unsigned short charheight; /* scan lines per character (1-32) */
char __user *chardata; /* font data in expanded form */
};
#define PIO_FONTRESET 0x4B6D /* reset to default font */
#define GIO_CMAP 0x4B70 /* gets colour palette on VGA+ */
#define PIO_CMAP 0x4B71 /* sets colour palette on VGA+ */
#define KIOCSOUND 0x4B2F /* start sound generation (0 for off) */
#define KDMKTONE 0x4B30 /* generate tone */
#define KDGETLED 0x4B31 /* return current led state */
#define KDSETLED 0x4B32 /* set led state [lights, not flags] */
#define LED_SCR 0x01 /* scroll lock led */
#define LED_NUM 0x02 /* num lock led */
#define LED_CAP 0x04 /* caps lock led */
#define KDGKBTYPE 0x4B33 /* get keyboard type */
#define KB_84 0x01
#define KB_101 0x02 /* this is what we always answer */
#define KB_OTHER 0x03
#define KDADDIO 0x4B34 /* add i/o port as valid */
#define KDDELIO 0x4B35 /* del i/o port as valid */
#define KDENABIO 0x4B36 /* enable i/o to video board */
#define KDDISABIO 0x4B37 /* disable i/o to video board */
#define KDSETMODE 0x4B3A /* set text/graphics mode */
#define KD_TEXT 0x00
#define KD_GRAPHICS 0x01
#define KD_TEXT0 0x02 /* obsolete */
#define KD_TEXT1 0x03 /* obsolete */
#define KDGETMODE 0x4B3B /* get current mode */
#define KDMAPDISP 0x4B3C /* map display into address space */
#define KDUNMAPDISP 0x4B3D /* unmap display from address space */
typedef char scrnmap_t;
#define E_TABSZ 256
#define GIO_SCRNMAP 0x4B40 /* get screen mapping from kernel */
#define PIO_SCRNMAP 0x4B41 /* put screen mapping table in kernel */
#define GIO_UNISCRNMAP 0x4B69 /* get full Unicode screen mapping */
#define PIO_UNISCRNMAP 0x4B6A /* set full Unicode screen mapping */
#define GIO_UNIMAP 0x4B66 /* get unicode-to-font mapping from kernel */
struct unipair {
unsigned short unicode;
unsigned short fontpos;
};
struct unimapdesc {
unsigned short entry_ct;
struct unipair __user *entries;
};
#define PIO_UNIMAP 0x4B67 /* put unicode-to-font mapping in kernel */
#define PIO_UNIMAPCLR 0x4B68 /* clear table, possibly advise hash algorithm */
struct unimapinit {
unsigned short advised_hashsize; /* 0 if no opinion */
unsigned short advised_hashstep; /* 0 if no opinion */
unsigned short advised_hashlevel; /* 0 if no opinion */
};
#define UNI_DIRECT_BASE 0xF000 /* start of Direct Font Region */
#define UNI_DIRECT_MASK 0x01FF /* Direct Font Region bitmask */
#define K_RAW 0x00
#define K_XLATE 0x01
#define K_MEDIUMRAW 0x02
#define K_UNICODE 0x03
#define K_OFF 0x04
#define KDGKBMODE 0x4B44 /* gets current keyboard mode */
#define KDSKBMODE 0x4B45 /* sets current keyboard mode */
#define K_METABIT 0x03
#define K_ESCPREFIX 0x04
#define KDGKBMETA 0x4B62 /* gets meta key handling mode */
#define KDSKBMETA 0x4B63 /* sets meta key handling mode */
#define K_SCROLLLOCK 0x01
#define K_NUMLOCK 0x02
#define K_CAPSLOCK 0x04
#define KDGKBLED 0x4B64 /* get led flags (not lights) */
#define KDSKBLED 0x4B65 /* set led flags (not lights) */
struct kbentry {
unsigned char kb_table;
unsigned char kb_index;
unsigned short kb_value;
Annotation
- Immediate include surface: `linux/types.h`, `linux/compiler.h`.
- Detected declarations: `struct consolefontdesc`, `struct unipair`, `struct unimapdesc`, `struct unimapinit`, `struct kbentry`, `struct kbsentry`, `struct kbdiacr`, `struct kbdiacrs`, `struct kbdiacruc`, `struct kbdiacrsuc`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source 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.