From b751e48de6f7b38c757824e67f11537376b63888 Mon Sep 17 00:00:00 2001
From: anonymous <anonymous@VirtualBox.(none)> Date: Sun, 4 Dec 2011 16:57:49 +0100 Subject: [PATCH 1/2] Fixed comments and output
--- src/apm.c | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/apm.c b/src/apm.c index c497dbe..02dc023 100644 --- a/src/apm.c +++ b/src/apm.c @@ -1,23 +1,23 @@ // Basic support for apmbios callbacks. // // Copyright (C) 2008 Kevin O'Connor kevin@koconnor.net -// Copyright (C) 2005 Struan Bartlett -// Copyright (C) 2004 Fabrice Bellard +// Copyright (C) 2005 Struan Bartlett +// Copyright (C) 2004 Fabrice Bellard // // This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "farptr.h" // GET_VAR -#include "bregs.h" // struct bregs -#include "ioport.h" // outb -#include "util.h" // wait_irq -#include "config.h" // CONFIG_* +#include "farptr.h" // GET_VAR +#include "bregs.h" // struct bregs +#include "ioport.h" // outb +#include "util.h" // wait_irq +#include "config.h" // CONFIG_* #include "biosvar.h" // GET_GLOBAL
static void out_str(const char *str_cs) { if (CONFIG_COREBOOT) { - dprintf(1, "APM request '%s'\n", str_cs); + dprintf(1, "APM request: '%s'\n", str_cs); return; }
@@ -39,8 +39,8 @@ handle_155300(struct bregs *regs) regs->al = 2; // APM minor version regs->bh = 'P'; regs->bl = 'M'; - // bit 0 : 16 bit interface supported - // bit 1 : 32 bit interface supported + // bit 0 : 16-bit interface supported + // bit 1 : 32-bit interface supported regs->cx = 0x03; set_success(regs); } @@ -56,30 +56,30 @@ handle_155301(struct bregs *regs) extern void entry_apm16(void); extern void entry_apm32(void);
-// APM 16 bit protected mode interface connect +// APM 16-bit protected mode interface connect static void handle_155302(struct bregs *regs) { regs->bx = (u32)entry_apm16; - regs->ax = SEG_BIOS; // 16 bit code segment base - regs->si = 0xfff0; // 16 bit code segment size + regs->ax = SEG_BIOS; // 16-bit code segment base + regs->si = 0xfff0; // 16-bit code segment size regs->cx = SEG_BIOS; // data segment address regs->di = 0xfff0; // data segment length set_success(regs); }
-// APM 32 bit protected mode interface connect +// APM 32-bit protected mode interface connect static void handle_155303(struct bregs *regs) { - regs->ax = SEG_BIOS; // 32 bit code segment base + regs->ax = SEG_BIOS; // 32-bit code segment base regs->ebx = (u32)entry_apm32; - regs->cx = SEG_BIOS; // 16 bit code segment base - // 32 bit code segment size (low 16 bits) - // 16 bit code segment size (high 16 bits) + regs->cx = SEG_BIOS; // 16-bit code segment base + // 32-bit code segment size (low 16 bits) + // 16-bit code segment size (high 16 bits) regs->esi = 0xfff0fff0; regs->dx = SEG_BIOS; // data segment address - regs->di = 0xfff0; // data segment length + regs->di = 0xfff0; // data segment length set_success(regs); }
@@ -198,7 +198,7 @@ handle_1553XX(struct bregs *regs) void handle_1553(struct bregs *regs) { - if (! CONFIG_APMBIOS) { + if (!CONFIG_APMBIOS) { set_code_invalid(regs, RET_EUNSUPPORTED); return; }