arch/x86/kernel/platform-quirks.c
Source file repositories/reference/linux-study-clean/arch/x86/kernel/platform-quirks.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/kernel/platform-quirks.c- Extension
.c- Size
- 1154 bytes
- Lines
- 48
- 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.
Dependency Surface
linux/kernel.hlinux/init.hlinux/pnp.hasm/setup.hasm/bios_ebda.h
Detected Declarations
function x86_early_init_platform_quirksfunction x86_pnpbios_disabledfunction arch_pnpbios_disabled
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/pnp.h>
#include <asm/setup.h>
#include <asm/bios_ebda.h>
void __init x86_early_init_platform_quirks(void)
{
x86_platform.legacy.i8042 = X86_LEGACY_I8042_EXPECTED_PRESENT;
x86_platform.legacy.rtc = 1;
x86_platform.legacy.warm_reset = 1;
x86_platform.legacy.reserve_bios_regions = 0;
x86_platform.legacy.devices.pnpbios = 1;
switch (boot_params.hdr.hardware_subarch) {
case X86_SUBARCH_PC:
x86_platform.legacy.reserve_bios_regions = 1;
break;
case X86_SUBARCH_XEN:
x86_platform.legacy.devices.pnpbios = 0;
x86_platform.legacy.rtc = 0;
break;
case X86_SUBARCH_INTEL_MID:
case X86_SUBARCH_CE4100:
x86_platform.legacy.devices.pnpbios = 0;
x86_platform.legacy.rtc = 0;
x86_platform.legacy.i8042 = X86_LEGACY_I8042_PLATFORM_ABSENT;
break;
}
if (x86_platform.set_legacy_features)
x86_platform.set_legacy_features();
}
bool __init x86_pnpbios_disabled(void)
{
return x86_platform.legacy.devices.pnpbios == 0;
}
#if defined(CONFIG_PNPBIOS)
bool __init arch_pnpbios_disabled(void)
{
return x86_pnpbios_disabled();
}
#endif
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/init.h`, `linux/pnp.h`, `asm/setup.h`, `asm/bios_ebda.h`.
- Detected declarations: `function x86_early_init_platform_quirks`, `function x86_pnpbios_disabled`, `function arch_pnpbios_disabled`.
- 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.