arch/x86/platform/intel-mid/intel-mid.c
Source file repositories/reference/linux-study-clean/arch/x86/platform/intel-mid/intel-mid.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/platform/intel-mid/intel-mid.c- Extension
.c- Size
- 3306 bytes
- Lines
- 127
- 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/init.hlinux/kernel.hlinux/interrupt.hlinux/regulator/machine.hlinux/scatterlist.hlinux/irq.hlinux/export.hlinux/notifier.hasm/setup.hasm/mpspec_def.hasm/hw_irq.hasm/apic.hasm/cpu_device_id.hasm/io_apic.hasm/intel-mid.hasm/io.hasm/i8259.hasm/reboot.hlinux/platform_data/x86/intel_scu_ipc.h
Detected Declarations
function intel_mid_power_offfunction intel_mid_rebootfunction intel_mid_time_initfunction intel_mid_arch_setupfunction intel_mid_get_nmi_reasonfunction x86_intel_mid_early_setup
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Intel MID platform setup code
*
* (C) Copyright 2008, 2012, 2021 Intel Corporation
* Author: Jacob Pan (jacob.jun.pan@intel.com)
* Author: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
*/
#define pr_fmt(fmt) "intel_mid: " fmt
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/regulator/machine.h>
#include <linux/scatterlist.h>
#include <linux/irq.h>
#include <linux/export.h>
#include <linux/notifier.h>
#include <asm/setup.h>
#include <asm/mpspec_def.h>
#include <asm/hw_irq.h>
#include <asm/apic.h>
#include <asm/cpu_device_id.h>
#include <asm/io_apic.h>
#include <asm/intel-mid.h>
#include <asm/io.h>
#include <asm/i8259.h>
#include <asm/reboot.h>
#include <linux/platform_data/x86/intel_scu_ipc.h>
#define IPCMSG_COLD_OFF 0x80 /* Only for Tangier */
#define IPCMSG_COLD_RESET 0xF1
static void intel_mid_power_off(void)
{
/* Shut down South Complex via PWRMU */
intel_mid_pwr_power_off();
/* Only for Tangier, the rest will ignore this command */
intel_scu_ipc_dev_simple_command(NULL, IPCMSG_COLD_OFF, 1);
};
static void intel_mid_reboot(void)
{
intel_scu_ipc_dev_simple_command(NULL, IPCMSG_COLD_RESET, 0);
}
static void __init intel_mid_time_init(void)
{
/* Lapic only, no apbt */
x86_init.timers.setup_percpu_clockev = setup_boot_APIC_clock;
x86_cpuinit.setup_percpu_clockev = setup_secondary_APIC_clock;
}
static void intel_mid_arch_setup(void)
{
switch (boot_cpu_data.x86_vfm) {
case INTEL_ATOM_SILVERMONT_MID:
x86_platform.legacy.rtc = 1;
break;
default:
break;
}
/*
* Intel MID platforms are using explicitly defined regulators.
*
* Let the regulator core know that we do not have any additional
* regulators left. This lets it substitute unprovided regulators with
* dummy ones:
*/
regulator_has_full_constraints();
}
/*
* Moorestown does not have external NMI source nor port 0x61 to report
* NMI status. The possible NMI sources are from pmu as a result of NMI
* watchdog or lock debug. Reading io port 0x61 results in 0xff which
* misled NMI handler.
*/
static unsigned char intel_mid_get_nmi_reason(void)
{
return 0;
}
/*
* Moorestown specific x86_init function overrides and early setup
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/interrupt.h`, `linux/regulator/machine.h`, `linux/scatterlist.h`, `linux/irq.h`, `linux/export.h`, `linux/notifier.h`.
- Detected declarations: `function intel_mid_power_off`, `function intel_mid_reboot`, `function intel_mid_time_init`, `function intel_mid_arch_setup`, `function intel_mid_get_nmi_reason`, `function x86_intel_mid_early_setup`.
- 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.