aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
authorDavid Mosberger-Tang <David.Mosberger@acm.org>2006-06-21 14:19:22 -0400
committerTony Luck <tony.luck@intel.com>2006-06-21 14:19:22 -0400
commit2ab561a116e16cdee3ae0e13d51910634c15aee9 (patch)
tree3a1ff4ae7546c57778a2cd4b51fb5d76aaaae93e /include/asm-ia64
parent22ae813b85df7c0b0fc7c8d6f336d6a9f566ff97 (diff)
[IA64] esi-support
Add support for making ESI calls [1]. ESI stands for "Extensible SAL specification" and is basically a way for invoking firmware subroutines which are identified by a GUID. I don't know whether ESI is used by vendors other than HP (if you do, please let me know) but as firmware "backdoors" go, this seems one of the cleaner methods, so it seems reasonable to support it, even though I'm not aware of any publicly documented ESI calls. I'd have liked to make the ESI module completely stand-alone, but unfortunately that is not easily (or not at all) possible because in order to make ESI calls in physical mode, a small stub similar to the EFI stub is needed in the kernel proper. I did try to create a stub that would work in user-level, but it quickly got ugly beyond recognition (e.g., the stub had to make assumptions about how the module-loader generated call-stubs work) and I didn't even get it to work (that's probably fixable, but I didn't bother because I concluded it was too ugly anyhow). While it's not terribly elegant to have kernel code which isn't actively used in the kernel proper, I think it might be worth making an exception here for two reasons: the code is trivially small (all that's really needed is esi_stub.S) and by including it in the normal kernel distro, it might encourage other OEMs to also use ESI, which I think would be far better than each inventing their own firmware "backdoor". The code was originally written by Alex. I just massaged and packaged it a bit (and perhaps messed up some things along the way...). Changes since first version of patch that was posted to mailing list: * Export ia64_esi_call and ia64_esi_call_phys() as GPL symbols. * Disallow building esi.c as a module for now. Building as a module would currently lead to an unresolved reference to "sal_lock" on SMP kernels because that symbol doesn't get exported. * Export esi_call_phys() only if ESI is enabled. * Remove internal stuff from esi.h and add a "proc_type" argument to ia64_esi_call() such that serialization-requirements can be expressed (ESI follows SAL here, where procedure calls may have to be serialized, are MP-safe, or MP-safe andr reentrant). [1] h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,919,00.html Signed-off-by: David Mosberger <David.Mosberger@acm.org> Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/esi.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/asm-ia64/esi.h b/include/asm-ia64/esi.h
new file mode 100644
index 000000000000..84aac0e0b583
--- /dev/null
+++ b/include/asm-ia64/esi.h
@@ -0,0 +1,30 @@
1/*
2 * ESI service calls.
3 *
4 * Copyright (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P.
5 * Alex Williamson <alex.williamson@hp.com>
6 */
7#ifndef esi_h
8#define esi_h
9
10#include <linux/efi.h>
11
12#define ESI_QUERY 0x00000001
13#define ESI_OPEN_HANDLE 0x02000000
14#define ESI_CLOSE_HANDLE 0x02000001
15
16enum esi_proc_type {
17 ESI_PROC_SERIALIZED, /* calls need to be serialized */
18 ESI_PROC_MP_SAFE, /* MP-safe, but not reentrant */
19 ESI_PROC_REENTRANT /* MP-safe and reentrant */
20};
21
22extern int ia64_esi_init (void);
23extern struct ia64_sal_retval esi_call_phys (void *, u64 *);
24extern int ia64_esi_call(efi_guid_t, struct ia64_sal_retval *,
25 enum esi_proc_type,
26 u64, u64, u64, u64, u64, u64, u64, u64);
27extern int ia64_esi_call_phys(efi_guid_t, struct ia64_sal_retval *, u64, u64,
28 u64, u64, u64, u64, u64, u64);
29
30#endif /* esi_h */