[PATCH 2/4] Add UV bios call infrastructure
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>
---
arch/x86/kernel/bios_uv.c | 106 +++++++++++++++++++++++++++++++--------
arch/x86/kernel/genx2apic_uv_x.c | 1
include/asm-x86/uv/bios.h | 58 +++++++++++----------
3 files changed, 117 insertions(+), 48 deletions(-)
Index: linux/arch/x86/kernel/bios_uv.c
===================================================================
--- linux.orig/arch/x86/kernel/bios_uv.c 2008-09-22 16:01:00.000000000 -0500
+++ linux/arch/x86/kernel/bios_uv.c 2008-09-22 16:01:11.000000000 -0500
@@ -1,8 +1,6 @@
/*
* BIOS run time interface routines.
*
- * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -16,33 +14,99 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) Russ Anderson
*/
+#include <linux/efi.h>
+#include <linux/io.h>
#include <asm/uv/bios.h>
-const char *
-x86_bios_strerror(long status)
+struct sal_systab sal_systab;
+
+s64 uv_bios_call(int which, u64 a1, u64 a2, u64 a3, u64 a4, u64 a5)
{
- const char *str;
- switch (status) {
- case 0: str = "Call completed without error"; break;
- case -1: str = "Not implemented"; break;
- case -2: str = "Invalid argument"; break;
- case -3: str = "Call completed with error"; break;
- default: str = "Unknown BIOS status code"; break;
- }
- return str;
+ struct ...