[PATCH 2/4] x86: Add UV bios call infrastructure

Previous thread: [PATCH 1/4] x86: Add UV EFI table entry by Russ Anderson on Monday, September 22, 2008 - 2:08 pm. (2 messages)

Next thread: [PATCH] Memory management livelock by Mikulas Patocka on Monday, September 22, 2008 - 2:10 pm. (67 messages)
From: Russ Anderson
Date: Monday, September 22, 2008 - 2:09 pm

[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 ...
From: H. Peter Anvin
Date: Monday, September 22, 2008 - 3:07 pm

Preferred style is:

	if (!tab->function)

	-hpa
--

From: Russ Anderson
Date: Monday, September 22, 2008 - 3:18 pm

Attached is an updated patch.


-- 
Russ Anderson, OS RAS/Partitioning Project Lead  
SGI - Silicon Graphics Inc          rja@sgi.com
From: Ingo Molnar
Date: Tuesday, September 23, 2008 - 4:07 am

shouldnt this be done in include/asm-x86/efi.h and 
arch/x86/kernel/efi_stub_64.S instead?

	Ingo
--

From: Huang Ying
Date: Tuesday, September 23, 2008 - 8:20 pm

Hi, Russ,


Either wrap efi_call6() in uv_bios_call() inside #ifdef CONFIG_EFI, or
add efi_call<x>() implementation when CONFIG_EFI is undefined into
include/asm-x86/efi.h.

Best Regards,
Huang Ying

Previous thread: [PATCH 1/4] x86: Add UV EFI table entry by Russ Anderson on Monday, September 22, 2008 - 2:08 pm. (2 messages)

Next thread: [PATCH] Memory management livelock by Mikulas Patocka on Monday, September 22, 2008 - 2:10 pm. (67 messages)