Skip to content

Commit bc231d9

Browse files
committed
Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 platform updates from Ingo Molnar: "The main change is the addition of SGI/UV4 support" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits) x86/platform/UV: Fix incorrect nodes and pnodes for cpuless and memoryless nodes x86/platform/UV: Remove Obsolete GRU MMR address translation x86/platform/UV: Update physical address conversions for UV4 x86/platform/UV: Build GAM reference tables x86/platform/UV: Support UV4 socket address changes x86/platform/UV: Add obtaining GAM Range Table from UV BIOS x86/platform/UV: Add UV4 addressing discovery function x86/platform/UV: Fold blade info into per node hub info structs x86/platform/UV: Allocate common per node hub info structs on local node x86/platform/UV: Move blade local processor ID to the per cpu info struct x86/platform/UV: Move scir info to the per cpu info struct x86/platform/UV: Create per cpu info structs to replace per hub info structs x86/platform/UV: Update MMIOH setup function to work for both UV3 and UV4 x86/platform/UV: Clean up redunduncies after merge of UV4 MMR definitions x86/platform/UV: Add UV4 Specific MMR definitions x86/platform/UV: Prep for UV4 MMR updates x86/platform/UV: Add UV MMR Illegal Access Function x86/platform/UV: Add UV4 Specific Defines x86/platform/UV: Add UV Architecture Defines x86/platform/UV: Add Initial UV4 definitions ...
2 parents 62a0027 + 3cd0b53 commit bc231d9

File tree

12 files changed

+2895
-793
lines changed

12 files changed

+2895
-793
lines changed

Documentation/kernel-parameters.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ parameter is applicable:
131131
More X86-64 boot options can be found in
132132
Documentation/x86/x86_64/boot-options.txt .
133133
X86 Either 32-bit or 64-bit x86 (same as X86-32+X86-64)
134+
X86_UV SGI UV support is enabled.
134135
XEN Xen support is enabled
135136

136137
In addition, the following text indicates that the option:
@@ -542,6 +543,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
542543
Format: <int> (must be >=0)
543544
Default: 64
544545

546+
bau= [X86_UV] Enable the BAU on SGI UV. The default
547+
behavior is to disable the BAU (i.e. bau=0).
548+
Format: { "0" | "1" }
549+
0 - Disable the BAU.
550+
1 - Enable the BAU.
551+
unset - Disable the BAU.
552+
545553
baycom_epp= [HW,AX25]
546554
Format: <io>,<mode>
547555

arch/x86/include/asm/bios_ebda.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,6 @@ static inline unsigned int get_bios_ebda(void)
1717
return address; /* 0 means none */
1818
}
1919

20-
/*
21-
* Return the sanitized length of the EBDA in bytes, if it exists.
22-
*/
23-
static inline unsigned int get_bios_ebda_length(void)
24-
{
25-
unsigned int address;
26-
unsigned int length;
27-
28-
address = get_bios_ebda();
29-
if (!address)
30-
return 0;
31-
32-
/* EBDA length is byte 0 of the EBDA (stored in KiB) */
33-
length = *(unsigned char *)phys_to_virt(address);
34-
length <<= 10;
35-
36-
/* Trim the length if it extends beyond 640KiB */
37-
length = min_t(unsigned int, (640 * 1024) - address, length);
38-
return length;
39-
}
40-
4120
void reserve_ebda_region(void);
4221

4322
#ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION

arch/x86/include/asm/uv/bios.h

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,66 @@ enum {
5151
BIOS_STATUS_UNAVAIL = -EBUSY
5252
};
5353

54+
/* Address map parameters */
55+
struct uv_gam_parameters {
56+
u64 mmr_base;
57+
u64 gru_base;
58+
u8 mmr_shift; /* Convert PNode to MMR space offset */
59+
u8 gru_shift; /* Convert PNode to GRU space offset */
60+
u8 gpa_shift; /* Size of offset field in GRU phys addr */
61+
u8 unused1;
62+
};
63+
64+
/* UV_TABLE_GAM_RANGE_ENTRY values */
65+
#define UV_GAM_RANGE_TYPE_UNUSED 0 /* End of table */
66+
#define UV_GAM_RANGE_TYPE_RAM 1 /* Normal RAM */
67+
#define UV_GAM_RANGE_TYPE_NVRAM 2 /* Non-volatile memory */
68+
#define UV_GAM_RANGE_TYPE_NV_WINDOW 3 /* NVMDIMM block window */
69+
#define UV_GAM_RANGE_TYPE_NV_MAILBOX 4 /* NVMDIMM mailbox */
70+
#define UV_GAM_RANGE_TYPE_HOLE 5 /* Unused address range */
71+
#define UV_GAM_RANGE_TYPE_MAX 6
72+
73+
/* The structure stores PA bits 56:26, for 64MB granularity */
74+
#define UV_GAM_RANGE_SHFT 26 /* 64MB */
75+
76+
struct uv_gam_range_entry {
77+
char type; /* Entry type: GAM_RANGE_TYPE_UNUSED, etc. */
78+
char unused1;
79+
u16 nasid; /* HNasid */
80+
u16 sockid; /* Socket ID, high bits of APIC ID */
81+
u16 pnode; /* Index to MMR and GRU spaces */
82+
u32 pxm; /* ACPI proximity domain number */
83+
u32 limit; /* PA bits 56:26 (UV_GAM_RANGE_SHFT) */
84+
};
85+
86+
#define UV_SYSTAB_SIG "UVST"
87+
#define UV_SYSTAB_VERSION_1 1 /* UV1/2/3 BIOS version */
88+
#define UV_SYSTAB_VERSION_UV4 0x400 /* UV4 BIOS base version */
89+
#define UV_SYSTAB_VERSION_UV4_1 0x401 /* + gpa_shift */
90+
#define UV_SYSTAB_VERSION_UV4_2 0x402 /* + TYPE_NVRAM/WINDOW/MBOX */
91+
#define UV_SYSTAB_VERSION_UV4_LATEST UV_SYSTAB_VERSION_UV4_2
92+
93+
#define UV_SYSTAB_TYPE_UNUSED 0 /* End of table (offset == 0) */
94+
#define UV_SYSTAB_TYPE_GAM_PARAMS 1 /* GAM PARAM conversions */
95+
#define UV_SYSTAB_TYPE_GAM_RNG_TBL 2 /* GAM entry table */
96+
#define UV_SYSTAB_TYPE_MAX 3
97+
5498
/*
5599
* The UV system table describes specific firmware
56100
* capabilities available to the Linux kernel at runtime.
57101
*/
58102
struct uv_systab {
59-
char signature[4]; /* must be "UVST" */
103+
char signature[4]; /* must be UV_SYSTAB_SIG */
60104
u32 revision; /* distinguish different firmware revs */
61105
u64 function; /* BIOS runtime callback function ptr */
106+
u32 size; /* systab size (starting with _VERSION_UV4) */
107+
struct {
108+
u32 type:8; /* type of entry */
109+
u32 offset:24; /* byte offset from struct start to entry */
110+
} entry[1]; /* additional entries follow */
62111
};
112+
extern struct uv_systab *uv_systab;
113+
/* (... end of definitions from UV BIOS ...) */
63114

64115
enum {
65116
BIOS_FREQ_BASE_PLATFORM = 0,
@@ -99,15 +150,19 @@ extern s64 uv_bios_change_memprotect(u64, u64, enum uv_memprotect);
99150
extern s64 uv_bios_reserved_page_pa(u64, u64 *, u64 *, u64 *);
100151
extern int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus);
101152

153+
#ifdef CONFIG_EFI
102154
extern void uv_bios_init(void);
155+
#else
156+
void uv_bios_init(void) { }
157+
#endif
103158

104159
extern unsigned long sn_rtc_cycles_per_second;
105160
extern int uv_type;
106161
extern long sn_partition_id;
107162
extern long sn_coherency_id;
108163
extern long sn_region_size;
109164
extern long system_serial_number;
110-
#define partition_coherence_id() (sn_coherency_id)
165+
#define uv_partition_coherence_id() (sn_coherency_id)
111166

112167
extern struct kobject *sgi_uv_kobj; /* /sys/firmware/sgi_uv */
113168

arch/x86/include/asm/uv/uv_bau.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ struct bau_control {
598598
int timeout_tries;
599599
int ipi_attempts;
600600
int conseccompletes;
601-
short nobau;
601+
bool nobau;
602602
short baudisabled;
603603
short cpu;
604604
short osnode;

0 commit comments

Comments
 (0)