arch/mips/dec/prom/console.c
Source file repositories/reference/linux-study-clean/arch/mips/dec/prom/console.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/dec/prom/console.c- Extension
.c- Size
- 909 bytes
- Lines
- 45
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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
linux/bug.hlinux/console.hlinux/init.hlinux/kernel.hlinux/string.hasm/dec/prom.h
Detected Declarations
function Copyrightfunction register_prom_console
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* DECstation PROM-based early console support.
*
* Copyright (C) 2004, 2007, 2026 Maciej W. Rozycki
*/
#include <linux/bug.h>
#include <linux/console.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <asm/dec/prom.h>
static void __init prom_console_write(struct console *con, const char *s,
unsigned int c)
{
static char buf[81] __initdata = { 0 };
unsigned int chunk = sizeof(buf) - 1;
BUG_ON((long)buf != (int)(long)buf);
while (c > 0) {
if (chunk > c)
chunk = c;
memcpy(buf, s, chunk);
buf[chunk] = '\0';
prom_printf("%s", buf);
s += chunk;
c -= chunk;
}
}
static struct console promcons __initdata = {
.name = "prom",
.write = prom_console_write,
.flags = CON_BOOT | CON_PRINTBUFFER,
.index = -1,
};
void __init register_prom_console(void)
{
register_console(&promcons);
}
Annotation
- Immediate include surface: `linux/bug.h`, `linux/console.h`, `linux/init.h`, `linux/kernel.h`, `linux/string.h`, `asm/dec/prom.h`.
- Detected declarations: `function Copyright`, `function register_prom_console`.
- Atlas domain: Architecture Layer / arch/mips.
- 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.