]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/linux-26-headers/include/asm-x86/uv/bios.h
update
[l4.git] / l4 / pkg / linux-26-headers / include / asm-x86 / uv / bios.h
1 #ifndef _ASM_X86_BIOS_H
2 #define _ASM_X86_BIOS_H
3
4 /*
5  * BIOS layer definitions.
6  *
7  *  Copyright (c) 2008 Silicon Graphics, Inc.  All Rights Reserved.
8  *
9  *  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
11  *  the Free Software Foundation; either version 2 of the License, or
12  *  (at your option) any later version.
13  *
14  *  This program is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *  GNU General Public License for more details.
18  *
19  *  You should have received a copy of the GNU General Public License
20  *  along with this program; if not, write to the Free Software
21  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
22  */
23
24 #include <linux/rtc.h>
25
26 #define BIOS_FREQ_BASE                  0x01000001
27
28 enum {
29         BIOS_FREQ_BASE_PLATFORM = 0,
30         BIOS_FREQ_BASE_INTERVAL_TIMER = 1,
31         BIOS_FREQ_BASE_REALTIME_CLOCK = 2
32 };
33
34 # define BIOS_CALL(result, a0, a1, a2, a3, a4, a5, a6, a7)              \
35         do {                                                            \
36                 /* XXX - the real call goes here */                     \
37                 result.status = BIOS_STATUS_UNIMPLEMENTED;              \
38                 isrv.v0 = 0;                                            \
39                 isrv.v1 = 0;                                            \
40         } while (0)
41
42 enum {
43         BIOS_STATUS_SUCCESS             =  0,
44         BIOS_STATUS_UNIMPLEMENTED       = -1,
45         BIOS_STATUS_EINVAL              = -2,
46         BIOS_STATUS_ERROR               = -3
47 };
48
49 struct uv_bios_retval {
50         /*
51          * A zero status value indicates call completed without error.
52          * A negative status value indicates reason of call failure.
53          * A positive status value indicates success but an
54          * informational value should be printed (e.g., "reboot for
55          * change to take effect").
56          */
57         s64 status;
58         u64 v0;
59         u64 v1;
60         u64 v2;
61 };
62
63 extern long
64 x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
65                    unsigned long *drift_info);
66 extern const char *x86_bios_strerror(long status);
67
68 #endif /* _ASM_X86_BIOS_H */