summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand/libsa/biosprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/amd64/stand/libsa/biosprobe.c')
-rw-r--r--sys/arch/amd64/stand/libsa/biosprobe.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/sys/arch/amd64/stand/libsa/biosprobe.c b/sys/arch/amd64/stand/libsa/biosprobe.c
index 8e57907ffb8..f82360a0e54 100644
--- a/sys/arch/amd64/stand/libsa/biosprobe.c
+++ b/sys/arch/amd64/stand/libsa/biosprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosprobe.c,v 1.1 2004/02/03 12:09:47 mickey Exp $ */
+/* $OpenBSD: biosprobe.c,v 1.2 2012/10/30 14:06:29 jsing Exp $ */
/*
* Copyright (c) 2002 Tobias Weingartner
@@ -38,22 +38,22 @@
void *
getSYSCONFaddr(void)
{
- u_int32_t status;
+ u_int32_t status;
u_int8_t *vers;
- __asm __volatile(DOINT(0x15) "\n\t"
- "setc %%al\n\t"
- : "=a" (status)
- : "0" (0xC000)
- : "%ebx", "%ecx", "%edx", "%esi", "%edi", "cc");
+ __asm __volatile(DOINT(0x15) "\n\t"
+ "setc %%al\n\t"
+ : "=a" (status)
+ : "0" (0xC000)
+ : "%ebx", "%ecx", "%edx", "%esi", "%edi", "cc");
/* On failure we go for a NULL */
- if(status)
- return(NULL);
+ if (status)
+ return NULL;
/* Calculate where the version bytes are */
vers = (void*)((BIOS_regs.biosr_es << 4) | BIOS_regs.biosr_bx);
- return(vers);
+ return vers;
}
void *
@@ -63,18 +63,20 @@ getEBDAaddr(void)
u_int8_t *info;
info = getSYSCONFaddr();
- if(!info) return(NULL);
+
+ if (!info)
+ return NULL;
__asm __volatile(DOINT(0x15) "\n\t"
- "setc %%al"
- : "=a" (status)
- : "0" (0xC100)
- : "%ebx", "%ecx", "%edx", "%esi", "%edi", "cc");
+ "setc %%al"
+ : "=a" (status)
+ : "0" (0xC100)
+ : "%ebx", "%ecx", "%edx", "%esi", "%edi", "cc");
- if(status) return(NULL);
+ if (status)
+ return NULL;
info = (void *)(BIOS_regs.biosr_es << 4);
- return(info);
+ return info;
}
-