From: Horms <horms@verge.net.au>
To: linux-ia64@vger.kernel.org
Subject: [patch 4/5] Choose physical or virtual SAL calls as appropriate
Date: Fri, 06 Oct 2006 02:07:44 +0000 [thread overview]
Message-ID: <20061006023253.031582000@tabatha.lab.ultramonkey.org> (raw)
The key thing about this patch is that it will make physical
SAL calls when physical EFI calls are being made (that is the
EFI code hasn't been mapped), and virtual calls otherwise.
The implientation is somewhat simple, but obviously there are many
ways to solve this problem. I am more than happy to change things
around on request.
Signed-Off-By: Simon Horman <horma@verge.net.au>
Index: kexec-ia64-2.6/include/linux/efi.h
=================================--- kexec-ia64-2.6.orig/include/linux/efi.h 2006-10-05 14:53:30.000000000 +0900
+++ kexec-ia64-2.6/include/linux/efi.h 2006-10-05 14:53:33.000000000 +0900
@@ -265,6 +265,7 @@
efi_get_next_high_mono_count_t *get_next_high_mono_count;
efi_reset_system_t *reset_system;
efi_set_virtual_address_map_t *set_virtual_address_map;
+ unsigned mapped;
} efi;
static inline int
Index: kexec-ia64-2.6/arch/ia64/kernel/efi.c
=================================--- kexec-ia64-2.6.orig/arch/ia64/kernel/efi.c 2006-10-05 14:53:30.000000000 +0900
+++ kexec-ia64-2.6/arch/ia64/kernel/efi.c 2006-10-05 14:54:20.000000000 +0900
@@ -600,6 +600,7 @@
efi.set_variable = virt_set_variable;
efi.get_next_high_mono_count = virt_get_next_high_mono_count;
efi.reset_system = virt_reset_system;
+ efi.mapped = 1;
efi_map_pal_code();
}
Index: kexec-ia64-2.6/include/asm-ia64/sal.h
=================================--- kexec-ia64-2.6.orig/include/asm-ia64/sal.h 2006-10-05 14:53:30.000000000 +0900
+++ kexec-ia64-2.6/include/asm-ia64/sal.h 2006-10-05 14:53:33.000000000 +0900
@@ -64,8 +64,10 @@
/* SAL spec _requires_ eight args for each call. */
struct ia64_sal_retval sal_call_phys(ia64_sal_handler ia64_sal, ...);
-#define __SAL_CALL(result,a0,a1,a2,a3,a4,a5,a6,a7) \
- result = sal_call_phys(ia64_sal,a0,a1,a2,a3,a4,a5,a6,a7);
+#define __SAL_CALL(result,a0,a1,a2,a3,a4,a5,a6,a7) \
+ result = efi.mapped ? \
+ (*ia64_sal)(a0,a1,a2,a3,a4,a5,a6,a7) : \
+ sal_call_phys(ia64_sal,a0,a1,a2,a3,a4,a5,a6,a7);
# define SAL_CALL(result,args...) do { \
unsigned long __ia64_sc_flags; \
--
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
next reply other threads:[~2006-10-06 2:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-06 2:07 Horms [this message]
2006-10-23 8:48 ` [patch 4/5] Choose physical or virtual SAL calls as appropriate Horms
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061006023253.031582000@tabatha.lab.ultramonkey.org \
--to=horms@verge.net.au \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox