arch/x86/realmode/rm/wakemain.c
Source file repositories/reference/linux-study-clean/arch/x86/realmode/rm/wakemain.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/realmode/rm/wakemain.c- Extension
.c- Size
- 1631 bytes
- Lines
- 88
- Domain
- Architecture Layer
- Bucket
- arch/x86
- 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.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
wakeup.hboot.h
Detected Declarations
function udelayfunction beepfunction send_morsefunction main
Annotated Snippet
switch (s) {
case '.':
beep(DOT_HZ);
udelay(US_PER_DOT);
beep(0);
udelay(US_PER_DOT);
break;
case '-':
beep(DASH_HZ);
udelay(US_PER_DOT * 3);
beep(0);
udelay(US_PER_DOT);
break;
default: /* Assume it's a space */
udelay(US_PER_DOT * 3);
break;
}
}
}
struct port_io_ops pio_ops;
void main(void)
{
init_default_io_ops();
/* Kill machine if structures are wrong */
if (wakeup_header.real_magic != 0x12345678)
while (1)
;
if (wakeup_header.realmode_flags & 4)
send_morse("...-");
if (wakeup_header.realmode_flags & 1)
asm volatile("lcallw $0xc000,$3");
if (wakeup_header.realmode_flags & 2) {
/* Need to call BIOS */
probe_cards(0);
set_mode(wakeup_header.video_mode);
}
}
Annotation
- Immediate include surface: `wakeup.h`, `boot.h`.
- Detected declarations: `function udelay`, `function beep`, `function send_morse`, `function main`.
- Atlas domain: Architecture Layer / arch/x86.
- 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.