arch/x86/kernel/early-quirks.c

Source file repositories/reference/linux-study-clean/arch/x86/kernel/early-quirks.c

File Facts

System
Linux kernel
Corpus path
arch/x86/kernel/early-quirks.c
Extension
.c
Size
22813 bytes
Lines
813
Domain
Architecture Layer
Bucket
arch/x86
Inferred role
Architecture Layer: exported/initcall integration point
Status
integration 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

struct intel_early_ops {
	resource_size_t (*stolen_size)(int num, int slot, int func);
	resource_size_t (*stolen_base)(int num, int slot, int func,
				       resource_size_t size);
};

static const struct intel_early_ops i830_early_ops __initconst = {
	.stolen_base = i830_stolen_base,
	.stolen_size = i830_stolen_size,
};

static const struct intel_early_ops i845_early_ops __initconst = {
	.stolen_base = i845_stolen_base,
	.stolen_size = i830_stolen_size,
};

static const struct intel_early_ops i85x_early_ops __initconst = {
	.stolen_base = i85x_stolen_base,
	.stolen_size = gen3_stolen_size,
};

static const struct intel_early_ops i865_early_ops __initconst = {
	.stolen_base = i865_stolen_base,
	.stolen_size = gen3_stolen_size,
};

static const struct intel_early_ops gen3_early_ops __initconst = {
	.stolen_base = gen3_stolen_base,
	.stolen_size = gen3_stolen_size,
};

static const struct intel_early_ops gen6_early_ops __initconst = {
	.stolen_base = gen3_stolen_base,
	.stolen_size = gen6_stolen_size,
};

static const struct intel_early_ops gen8_early_ops __initconst = {
	.stolen_base = gen3_stolen_base,
	.stolen_size = gen8_stolen_size,
};

static const struct intel_early_ops gen9_early_ops __initconst = {
	.stolen_base = gen3_stolen_base,
	.stolen_size = gen9_stolen_size,
};

static const struct intel_early_ops chv_early_ops __initconst = {
	.stolen_base = gen3_stolen_base,
	.stolen_size = chv_stolen_size,
};

static const struct intel_early_ops gen11_early_ops __initconst = {
	.stolen_base = gen11_stolen_base,
	.stolen_size = gen9_stolen_size,
};

/* Intel integrated GPUs for which we need to reserve "stolen memory" */
static const struct pci_device_id intel_early_ids[] __initconst = {
	INTEL_I830_IDS(INTEL_VGA_DEVICE, &i830_early_ops),
	INTEL_I845G_IDS(INTEL_VGA_DEVICE, &i845_early_ops),
	INTEL_I85X_IDS(INTEL_VGA_DEVICE, &i85x_early_ops),
	INTEL_I865G_IDS(INTEL_VGA_DEVICE, &i865_early_ops),
	INTEL_I915G_IDS(INTEL_VGA_DEVICE, &gen3_early_ops),
	INTEL_I915GM_IDS(INTEL_VGA_DEVICE, &gen3_early_ops),
	INTEL_I945G_IDS(INTEL_VGA_DEVICE, &gen3_early_ops),
	INTEL_I945GM_IDS(INTEL_VGA_DEVICE, &gen3_early_ops),
	INTEL_VLV_IDS(INTEL_VGA_DEVICE, &gen6_early_ops),
	INTEL_PNV_IDS(INTEL_VGA_DEVICE, &gen3_early_ops),
	INTEL_I965G_IDS(INTEL_VGA_DEVICE, &gen3_early_ops),
	INTEL_G33_IDS(INTEL_VGA_DEVICE, &gen3_early_ops),
	INTEL_I965GM_IDS(INTEL_VGA_DEVICE, &gen3_early_ops),
	INTEL_GM45_IDS(INTEL_VGA_DEVICE, &gen3_early_ops),
	INTEL_G45_IDS(INTEL_VGA_DEVICE, &gen3_early_ops),
	INTEL_ILK_IDS(INTEL_VGA_DEVICE, &gen3_early_ops),
	INTEL_SNB_IDS(INTEL_VGA_DEVICE, &gen6_early_ops),
	INTEL_IVB_IDS(INTEL_VGA_DEVICE, &gen6_early_ops),
	INTEL_HSW_IDS(INTEL_VGA_DEVICE, &gen6_early_ops),
	INTEL_BDW_IDS(INTEL_VGA_DEVICE, &gen8_early_ops),
	INTEL_CHV_IDS(INTEL_VGA_DEVICE, &chv_early_ops),
	INTEL_SKL_IDS(INTEL_VGA_DEVICE, &gen9_early_ops),
	INTEL_BXT_IDS(INTEL_VGA_DEVICE, &gen9_early_ops),
	INTEL_KBL_IDS(INTEL_VGA_DEVICE, &gen9_early_ops),
	INTEL_CFL_IDS(INTEL_VGA_DEVICE, &gen9_early_ops),
	INTEL_WHL_IDS(INTEL_VGA_DEVICE, &gen9_early_ops),
	INTEL_CML_IDS(INTEL_VGA_DEVICE, &gen9_early_ops),
	INTEL_GLK_IDS(INTEL_VGA_DEVICE, &gen9_early_ops),
	INTEL_CNL_IDS(INTEL_VGA_DEVICE, &gen9_early_ops),
	INTEL_ICL_IDS(INTEL_VGA_DEVICE, &gen11_early_ops),
	INTEL_EHL_IDS(INTEL_VGA_DEVICE, &gen11_early_ops),
	INTEL_JSL_IDS(INTEL_VGA_DEVICE, &gen11_early_ops),

Annotation

Implementation Notes