hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/x86/include/asm/uv/bios.h
....@@ -1,25 +1,13 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 #ifndef _ASM_X86_UV_BIOS_H
23 #define _ASM_X86_UV_BIOS_H
34
45 /*
56 * UV BIOS layer definitions.
67 *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, write to the Free Software
19
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
- *
21
- * Copyright (c) 2008-2009 Silicon Graphics, Inc. All Rights Reserved.
22
- * Copyright (c) Russ Anderson <rja@sgi.com>
8
+ * (C) Copyright 2020 Hewlett Packard Enterprise Development LP
9
+ * Copyright (C) 2007-2017 Silicon Graphics, Inc. All rights reserved.
10
+ * Copyright (c) Russ Anderson <rja@sgi.com>
2311 */
2412
2513 #include <linux/rtc.h>
....@@ -84,18 +72,27 @@
8472 u32 limit; /* PA bits 56:26 (UV_GAM_RANGE_SHFT) */
8573 };
8674
75
+#define UV_AT_SIZE 8 /* 7 character arch type + NULL char */
76
+struct uv_arch_type_entry {
77
+ char archtype[UV_AT_SIZE];
78
+};
79
+
8780 #define UV_SYSTAB_SIG "UVST"
88
-#define UV_SYSTAB_VERSION_1 1 /* UV1/2/3 BIOS version */
81
+#define UV_SYSTAB_VERSION_1 1 /* UV2/3 BIOS version */
8982 #define UV_SYSTAB_VERSION_UV4 0x400 /* UV4 BIOS base version */
9083 #define UV_SYSTAB_VERSION_UV4_1 0x401 /* + gpa_shift */
9184 #define UV_SYSTAB_VERSION_UV4_2 0x402 /* + TYPE_NVRAM/WINDOW/MBOX */
9285 #define UV_SYSTAB_VERSION_UV4_3 0x403 /* - GAM Range PXM Value */
9386 #define UV_SYSTAB_VERSION_UV4_LATEST UV_SYSTAB_VERSION_UV4_3
9487
88
+#define UV_SYSTAB_VERSION_UV5 0x500 /* UV5 GAM base version */
89
+#define UV_SYSTAB_VERSION_UV5_LATEST UV_SYSTAB_VERSION_UV5
90
+
9591 #define UV_SYSTAB_TYPE_UNUSED 0 /* End of table (offset == 0) */
9692 #define UV_SYSTAB_TYPE_GAM_PARAMS 1 /* GAM PARAM conversions */
9793 #define UV_SYSTAB_TYPE_GAM_RNG_TBL 2 /* GAM entry table */
98
-#define UV_SYSTAB_TYPE_MAX 3
94
+#define UV_SYSTAB_TYPE_ARCH_TYPE 3 /* UV arch type */
95
+#define UV_SYSTAB_TYPE_MAX 4
9996
10097 /*
10198 * The UV system table describes specific firmware
....@@ -136,13 +133,6 @@
136133 UV_MEMPROT_ALLOW_RW
137134 };
138135
139
-/*
140
- * bios calls have 6 parameters
141
- */
142
-extern s64 uv_bios_call(enum uv_bios_cmd, u64, u64, u64, u64, u64);
143
-extern s64 uv_bios_call_irqsave(enum uv_bios_cmd, u64, u64, u64, u64, u64);
144
-extern s64 uv_bios_call_reentrant(enum uv_bios_cmd, u64, u64, u64, u64, u64);
145
-
146136 extern s64 uv_bios_get_sn_info(int, int *, long *, long *, long *, long *);
147137 extern s64 uv_bios_freq_base(u64, u64 *);
148138 extern int uv_bios_mq_watchlist_alloc(unsigned long, unsigned int,
....@@ -152,11 +142,8 @@
152142 extern s64 uv_bios_reserved_page_pa(u64, u64 *, u64 *, u64 *);
153143 extern int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus);
154144
155
-#ifdef CONFIG_EFI
156
-extern void uv_bios_init(void);
157
-#else
158
-void uv_bios_init(void) { }
159
-#endif
145
+extern int uv_bios_init(void);
146
+extern unsigned long get_uv_systab_phys(bool msg);
160147
161148 extern unsigned long sn_rtc_cycles_per_second;
162149 extern int uv_type;
....@@ -164,7 +151,6 @@
164151 extern long sn_coherency_id;
165152 extern long sn_region_size;
166153 extern long system_serial_number;
167
-#define uv_partition_coherence_id() (sn_coherency_id)
168154
169155 extern struct kobject *sgi_uv_kobj; /* /sys/firmware/sgi_uv */
170156