aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/uv
diff options
context:
space:
mode:
authorRuss Anderson <rja@sgi.com>2008-10-03 12:59:15 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:53:13 -0400
commit7f5942329e0787087a5e4dced838cee711ac2b58 (patch)
tree7bf3d4d91e15694977ff5d46bf6ceab7ebbd6c54 /include/asm-x86/uv
parenta50f70b17541c0060967c6df61133e968bad3652 (diff)
x86: Add UV bios call infrastructure v4
Add the EFI callback function and associated wrapper code. Initialize SAL system table entry info at boot time. Signed-off-by: Russ Anderson <rja@sgi.com> Signed-off-by: Paul Jackson <pj@sgi.com> Acked-by: Huang Ying <ying.huang@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/uv')
-rw-r--r--include/asm-x86/uv/bios.h73
1 files changed, 41 insertions, 32 deletions
diff --git a/include/asm-x86/uv/bios.h b/include/asm-x86/uv/bios.h
index 7cd6d7ec1308..f63e46e5337c 100644
--- a/include/asm-x86/uv/bios.h
+++ b/include/asm-x86/uv/bios.h
@@ -2,9 +2,7 @@
2#define ASM_X86__UV__BIOS_H 2#define ASM_X86__UV__BIOS_H
3 3
4/* 4/*
5 * BIOS layer definitions. 5 * UV BIOS layer definitions.
6 *
7 * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,50 +17,61 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
22 * Copyright (c) Russ Anderson
22 */ 23 */
23 24
24#include <linux/rtc.h> 25#include <linux/rtc.h>
25 26
26#define BIOS_FREQ_BASE 0x01000001 27/*
28 * Values for the BIOS calls. It is passed as the first * argument in the
29 * BIOS call. Passing any other value in the first argument will result
30 * in a BIOS_STATUS_UNIMPLEMENTED return status.
31 */
32enum uv_bios_cmd {
33 UV_BIOS_COMMON,
34 UV_BIOS_GET_SN_INFO,
35 UV_BIOS_FREQ_BASE
36};
27 37
38/*
39 * Status values returned from a BIOS call.
40 */
28enum { 41enum {
29 BIOS_FREQ_BASE_PLATFORM = 0, 42 BIOS_STATUS_SUCCESS = 0,
30 BIOS_FREQ_BASE_INTERVAL_TIMER = 1, 43 BIOS_STATUS_UNIMPLEMENTED = -ENOSYS,
31 BIOS_FREQ_BASE_REALTIME_CLOCK = 2 44 BIOS_STATUS_EINVAL = -EINVAL,
45 BIOS_STATUS_UNAVAIL = -EBUSY
32}; 46};
33 47
34# define BIOS_CALL(result, a0, a1, a2, a3, a4, a5, a6, a7) \ 48/*
35 do { \ 49 * The UV system table describes specific firmware
36 /* XXX - the real call goes here */ \ 50 * capabilities available to the Linux kernel at runtime.
37 result.status = BIOS_STATUS_UNIMPLEMENTED; \ 51 */
38 isrv.v0 = 0; \ 52struct uv_systab {
39 isrv.v1 = 0; \ 53 char signature[4]; /* must be "UVST" */
40 } while (0) 54 u32 revision; /* distinguish different firmware revs */
55 u64 function; /* BIOS runtime callback function ptr */
56};
41 57
42enum { 58enum {
43 BIOS_STATUS_SUCCESS = 0, 59 BIOS_FREQ_BASE_PLATFORM = 0,
44 BIOS_STATUS_UNIMPLEMENTED = -1, 60 BIOS_FREQ_BASE_INTERVAL_TIMER = 1,
45 BIOS_STATUS_EINVAL = -2, 61 BIOS_FREQ_BASE_REALTIME_CLOCK = 2
46 BIOS_STATUS_ERROR = -3
47}; 62};
48 63
49struct uv_bios_retval { 64/*
50 /* 65 * bios calls have 6 parameters
51 * A zero status value indicates call completed without error. 66 */
52 * A negative status value indicates reason of call failure. 67extern s64 uv_bios_call(enum uv_bios_cmd, u64, u64, u64, u64, u64);
53 * A positive status value indicates success but an 68extern s64 uv_bios_call_irqsave(enum uv_bios_cmd, u64, u64, u64, u64, u64);
54 * informational value should be printed (e.g., "reboot for 69extern s64 uv_bios_call_reentrant(enum uv_bios_cmd, u64, u64, u64, u64, u64);
55 * change to take effect"). 70
56 */ 71extern void uv_bios_init(void);
57 s64 status;
58 u64 v0;
59 u64 v1;
60 u64 v2;
61};
62 72
63extern long 73extern long
64x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second, 74x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
65 unsigned long *drift_info); 75 unsigned long *drift_info);
66extern const char *x86_bios_strerror(long status);
67 76
68#endif /* ASM_X86__UV__BIOS_H */ 77#endif /* ASM_X86__UV__BIOS_H */