Skip to content

Commit

Permalink
Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/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
  ...
  • Loading branch information
Linus Torvalds committed May 16, 2016
2 parents 62a0027 + 3cd0b53 commit bc231d9
Show file tree
Hide file tree
Showing 12 changed files with 2,895 additions and 793 deletions.
8 changes: 8 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ parameter is applicable:
More X86-64 boot options can be found in
Documentation/x86/x86_64/boot-options.txt .
X86 Either 32-bit or 64-bit x86 (same as X86-32+X86-64)
X86_UV SGI UV support is enabled.
XEN Xen support is enabled

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

bau= [X86_UV] Enable the BAU on SGI UV. The default
behavior is to disable the BAU (i.e. bau=0).
Format: { "0" | "1" }
0 - Disable the BAU.
1 - Enable the BAU.
unset - Disable the BAU.

baycom_epp= [HW,AX25]
Format: <io>,<mode>

Expand Down
21 changes: 0 additions & 21 deletions arch/x86/include/asm/bios_ebda.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,6 @@ static inline unsigned int get_bios_ebda(void)
return address; /* 0 means none */
}

/*
* Return the sanitized length of the EBDA in bytes, if it exists.
*/
static inline unsigned int get_bios_ebda_length(void)
{
unsigned int address;
unsigned int length;

address = get_bios_ebda();
if (!address)
return 0;

/* EBDA length is byte 0 of the EBDA (stored in KiB) */
length = *(unsigned char *)phys_to_virt(address);
length <<= 10;

/* Trim the length if it extends beyond 640KiB */
length = min_t(unsigned int, (640 * 1024) - address, length);
return length;
}

void reserve_ebda_region(void);

#ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
Expand Down
59 changes: 57 additions & 2 deletions arch/x86/include/asm/uv/bios.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,66 @@ enum {
BIOS_STATUS_UNAVAIL = -EBUSY
};

/* Address map parameters */
struct uv_gam_parameters {
u64 mmr_base;
u64 gru_base;
u8 mmr_shift; /* Convert PNode to MMR space offset */
u8 gru_shift; /* Convert PNode to GRU space offset */
u8 gpa_shift; /* Size of offset field in GRU phys addr */
u8 unused1;
};

/* UV_TABLE_GAM_RANGE_ENTRY values */
#define UV_GAM_RANGE_TYPE_UNUSED 0 /* End of table */
#define UV_GAM_RANGE_TYPE_RAM 1 /* Normal RAM */
#define UV_GAM_RANGE_TYPE_NVRAM 2 /* Non-volatile memory */
#define UV_GAM_RANGE_TYPE_NV_WINDOW 3 /* NVMDIMM block window */
#define UV_GAM_RANGE_TYPE_NV_MAILBOX 4 /* NVMDIMM mailbox */
#define UV_GAM_RANGE_TYPE_HOLE 5 /* Unused address range */
#define UV_GAM_RANGE_TYPE_MAX 6

/* The structure stores PA bits 56:26, for 64MB granularity */
#define UV_GAM_RANGE_SHFT 26 /* 64MB */

struct uv_gam_range_entry {
char type; /* Entry type: GAM_RANGE_TYPE_UNUSED, etc. */
char unused1;
u16 nasid; /* HNasid */
u16 sockid; /* Socket ID, high bits of APIC ID */
u16 pnode; /* Index to MMR and GRU spaces */
u32 pxm; /* ACPI proximity domain number */
u32 limit; /* PA bits 56:26 (UV_GAM_RANGE_SHFT) */
};

#define UV_SYSTAB_SIG "UVST"
#define UV_SYSTAB_VERSION_1 1 /* UV1/2/3 BIOS version */
#define UV_SYSTAB_VERSION_UV4 0x400 /* UV4 BIOS base version */
#define UV_SYSTAB_VERSION_UV4_1 0x401 /* + gpa_shift */
#define UV_SYSTAB_VERSION_UV4_2 0x402 /* + TYPE_NVRAM/WINDOW/MBOX */
#define UV_SYSTAB_VERSION_UV4_LATEST UV_SYSTAB_VERSION_UV4_2

#define UV_SYSTAB_TYPE_UNUSED 0 /* End of table (offset == 0) */
#define UV_SYSTAB_TYPE_GAM_PARAMS 1 /* GAM PARAM conversions */
#define UV_SYSTAB_TYPE_GAM_RNG_TBL 2 /* GAM entry table */
#define UV_SYSTAB_TYPE_MAX 3

/*
* The UV system table describes specific firmware
* capabilities available to the Linux kernel at runtime.
*/
struct uv_systab {
char signature[4]; /* must be "UVST" */
char signature[4]; /* must be UV_SYSTAB_SIG */
u32 revision; /* distinguish different firmware revs */
u64 function; /* BIOS runtime callback function ptr */
u32 size; /* systab size (starting with _VERSION_UV4) */
struct {
u32 type:8; /* type of entry */
u32 offset:24; /* byte offset from struct start to entry */
} entry[1]; /* additional entries follow */
};
extern struct uv_systab *uv_systab;
/* (... end of definitions from UV BIOS ...) */

enum {
BIOS_FREQ_BASE_PLATFORM = 0,
Expand Down Expand Up @@ -99,15 +150,19 @@ extern s64 uv_bios_change_memprotect(u64, u64, enum uv_memprotect);
extern s64 uv_bios_reserved_page_pa(u64, u64 *, u64 *, u64 *);
extern int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus);

#ifdef CONFIG_EFI
extern void uv_bios_init(void);
#else
void uv_bios_init(void) { }
#endif

extern unsigned long sn_rtc_cycles_per_second;
extern int uv_type;
extern long sn_partition_id;
extern long sn_coherency_id;
extern long sn_region_size;
extern long system_serial_number;
#define partition_coherence_id() (sn_coherency_id)
#define uv_partition_coherence_id() (sn_coherency_id)

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

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/include/asm/uv/uv_bau.h
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ struct bau_control {
int timeout_tries;
int ipi_attempts;
int conseccompletes;
short nobau;
bool nobau;
short baudisabled;
short cpu;
short osnode;
Expand Down
Loading

0 comments on commit bc231d9

Please sign in to comment.