diff options
author | Graeme Russ <graeme.russ@gmail.com> | 2011-11-08 02:33:15 +0000 |
---|---|---|
committer | Graeme Russ <graeme.russ@gmail.com> | 2011-11-29 21:03:43 +1100 |
commit | 83088afbba0c142fda5313866abd1e679d0f9e78 (patch) | |
tree | dc968778c47d8aa2f915e928838b5bd72b71ff18 /arch/x86/lib/realmode.c | |
parent | 01a0f5a1ebba7eeccf13fc5992ed59e8614fd58a (diff) | |
download | u-boot-imx-83088afbba0c142fda5313866abd1e679d0f9e78.zip u-boot-imx-83088afbba0c142fda5313866abd1e679d0f9e78.tar.gz u-boot-imx-83088afbba0c142fda5313866abd1e679d0f9e78.tar.bz2 |
cosmetic: checkpatch cleanup of arch/x86/lib/*.c
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'arch/x86/lib/realmode.c')
-rw-r--r-- | arch/x86/lib/realmode.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/x86/lib/realmode.c b/arch/x86/lib/realmode.c index 6aa0f23..5a525ee 100644 --- a/arch/x86/lib/realmode.c +++ b/arch/x86/lib/realmode.c @@ -26,11 +26,7 @@ #include <asm/ptrace.h> #include <asm/realmode.h> -#define REALMODE_MAILBOX ((char*)0xe00) - -extern ulong __realmode_start; -extern ulong __realmode_size; -extern char realmode_enter; +#define REALMODE_MAILBOX ((char *)0xe00) int realmode_setup(void) { @@ -63,15 +59,14 @@ int enter_realmode(u16 seg, u16 off, struct pt_regs *in, struct pt_regs *out) in->eip = off; in->xcs = seg; - if (3>(in->esp & 0xffff)) { + if ((in->esp & 0xffff) < 4) printf("Warning: entering realmode with sp < 4 will fail\n"); - } memcpy(REALMODE_MAILBOX, in, sizeof(struct pt_regs)); asm("wbinvd\n"); __asm__ volatile ( - "lcall $0x20,%0\n" : : "i" (&realmode_enter) ); + "lcall $0x20,%0\n" : : "i" (&realmode_enter)); asm("wbinvd\n"); memcpy(out, REALMODE_MAILBOX, sizeof(struct pt_regs)); @@ -79,9 +74,10 @@ int enter_realmode(u16 seg, u16 off, struct pt_regs *in, struct pt_regs *out) return out->eax; } - -/* This code is supposed to access a realmode interrupt - * it does currently not work for me */ +/* + * This code is supposed to access a realmode interrupt + * it does currently not work for me + */ int enter_realmode_int(u8 lvl, struct pt_regs *in, struct pt_regs *out) { /* place two instructions at 0x700 */ @@ -92,5 +88,5 @@ int enter_realmode_int(u8 lvl, struct pt_regs *in, struct pt_regs *out) enter_realmode(0x00, 0x700, in, out); - return out->eflags&1; + return out->eflags & 0x00000001; } |