forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sfi-release' of git://git.kernel.org/pub/scm/linux/kern…
…el/git/lenb/linux-sfi-2.6 * 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6: SFI: remove unneeded includes sfi: Remove unused code SFI: Hook PCI MMCONFIG x86: add arch-specific SFI support SFI: add capability to parse ACPI tables SFI: add platform-independent core support SFI: create linux/sfi.h SFI: Simple Firmware Interface - MAINTAINERS, Kconfig
- Loading branch information
Showing
16 changed files
with
1,120 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4669,6 +4669,18 @@ L: [email protected] | |
S: Supported | ||
F: drivers/pci/hotplug/shpchp* | ||
|
||
SIMPLE FIRMWARE INTERFACE (SFI) | ||
P: Len Brown | ||
M: [email protected] | ||
L: [email protected] | ||
W: http://simplefirmware.org/ | ||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6.git | ||
S: Supported | ||
F: arch/x86/kernel/*sfi* | ||
F: drivers/sfi/ | ||
F: include/linux/sfi*.h | ||
|
||
|
||
SIMTEC EB110ATX (Chalice CATS) | ||
P: Ben Dooks | ||
M: Vincent Sanders <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
/* | ||
* sfi.c - x86 architecture SFI support. | ||
* | ||
* Copyright (c) 2009, Intel Corporation. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms and conditions of the GNU General Public License, | ||
* version 2, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
*/ | ||
|
||
#define KMSG_COMPONENT "SFI" | ||
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
|
||
#include <linux/acpi.h> | ||
#include <linux/init.h> | ||
#include <linux/sfi.h> | ||
#include <linux/io.h> | ||
|
||
#include <asm/io_apic.h> | ||
#include <asm/mpspec.h> | ||
#include <asm/setup.h> | ||
#include <asm/apic.h> | ||
|
||
#ifdef CONFIG_X86_LOCAL_APIC | ||
static unsigned long sfi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; | ||
|
||
void __init mp_sfi_register_lapic_address(unsigned long address) | ||
{ | ||
mp_lapic_addr = address; | ||
|
||
set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr); | ||
if (boot_cpu_physical_apicid == -1U) | ||
boot_cpu_physical_apicid = read_apic_id(); | ||
|
||
pr_info("Boot CPU = %d\n", boot_cpu_physical_apicid); | ||
} | ||
|
||
/* All CPUs enumerated by SFI must be present and enabled */ | ||
void __cpuinit mp_sfi_register_lapic(u8 id) | ||
{ | ||
if (MAX_APICS - id <= 0) { | ||
pr_warning("Processor #%d invalid (max %d)\n", | ||
id, MAX_APICS); | ||
return; | ||
} | ||
|
||
pr_info("registering lapic[%d]\n", id); | ||
|
||
generic_processor_info(id, GET_APIC_VERSION(apic_read(APIC_LVR))); | ||
} | ||
|
||
static int __init sfi_parse_cpus(struct sfi_table_header *table) | ||
{ | ||
struct sfi_table_simple *sb; | ||
struct sfi_cpu_table_entry *pentry; | ||
int i; | ||
int cpu_num; | ||
|
||
sb = (struct sfi_table_simple *)table; | ||
cpu_num = SFI_GET_NUM_ENTRIES(sb, struct sfi_cpu_table_entry); | ||
pentry = (struct sfi_cpu_table_entry *)sb->pentry; | ||
|
||
for (i = 0; i < cpu_num; i++) { | ||
mp_sfi_register_lapic(pentry->apic_id); | ||
pentry++; | ||
} | ||
|
||
smp_found_config = 1; | ||
return 0; | ||
} | ||
#endif /* CONFIG_X86_LOCAL_APIC */ | ||
|
||
#ifdef CONFIG_X86_IO_APIC | ||
static u32 gsi_base; | ||
|
||
static int __init sfi_parse_ioapic(struct sfi_table_header *table) | ||
{ | ||
struct sfi_table_simple *sb; | ||
struct sfi_apic_table_entry *pentry; | ||
int i, num; | ||
|
||
sb = (struct sfi_table_simple *)table; | ||
num = SFI_GET_NUM_ENTRIES(sb, struct sfi_apic_table_entry); | ||
pentry = (struct sfi_apic_table_entry *)sb->pentry; | ||
|
||
for (i = 0; i < num; i++) { | ||
mp_register_ioapic(i, pentry->phys_addr, gsi_base); | ||
gsi_base += io_apic_get_redir_entries(i); | ||
pentry++; | ||
} | ||
|
||
WARN(pic_mode, KERN_WARNING | ||
"SFI: pic_mod shouldn't be 1 when IOAPIC table is present\n"); | ||
pic_mode = 0; | ||
return 0; | ||
} | ||
#endif /* CONFIG_X86_IO_APIC */ | ||
|
||
/* | ||
* sfi_platform_init(): register lapics & io-apics | ||
*/ | ||
int __init sfi_platform_init(void) | ||
{ | ||
#ifdef CONFIG_X86_LOCAL_APIC | ||
mp_sfi_register_lapic_address(sfi_lapic_addr); | ||
sfi_table_parse(SFI_SIG_CPUS, NULL, NULL, sfi_parse_cpus); | ||
#endif | ||
#ifdef CONFIG_X86_IO_APIC | ||
sfi_table_parse(SFI_SIG_APIC, NULL, NULL, sfi_parse_ioapic); | ||
#endif | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# SFI Configuration | ||
# | ||
|
||
menuconfig SFI | ||
bool "SFI (Simple Firmware Interface) Support" | ||
---help--- | ||
The Simple Firmware Interface (SFI) provides a lightweight method | ||
for platform firmware to pass information to the operating system | ||
via static tables in memory. Kernel SFI support is required to | ||
boot on SFI-only platforms. Currently, all SFI-only platforms are | ||
based on the 2nd generation Intel Atom processor platform, | ||
code-named Moorestown. | ||
|
||
For more information, see http://simplefirmware.org | ||
|
||
Say 'Y' here to enable the kernel to boot on SFI-only platforms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
obj-y += sfi_acpi.o | ||
obj-y += sfi_core.o | ||
|
Oops, something went wrong.