aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-07-04 05:47:26 -0400
committerKevin O'Connor <kevin@koconnor.net>2008-07-04 05:47:26 -0400
commit84ad59ab83ecdced2bd517f1c8d1129d430d8cdc (patch)
tree4bb0e8f7edab2b4417afd0794e2d9ed9e20602a8 /src/util.h
parentf7ba6d7f5b297a55da6bc1e177c4eba09fc40a8e (diff)
downloadseabios-hppa-84ad59ab83ecdced2bd517f1c8d1129d430d8cdc.zip
seabios-hppa-84ad59ab83ecdced2bd517f1c8d1129d430d8cdc.tar.gz
seabios-hppa-84ad59ab83ecdced2bd517f1c8d1129d430d8cdc.tar.bz2
Separate out smp detection and mp table generation from rombios32.c
Also, change smp_probe() to return the cpu count on each call.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 0522d14..bccf750 100644
--- a/src/util.h
+++ b/src/util.h
@@ -52,6 +52,13 @@ static inline void wbinvd(void)
asm volatile("wbinvd");
}
+static inline void cpuid(u32 index, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx)
+{
+ asm("cpuid"
+ : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
+ : "0" (index));
+}
+
void *memset(void *s, int c, size_t n);
void *memcpy(void *d1, const void *s1, size_t len);
void *memmove(void *d, const void *s, size_t len);
@@ -193,6 +200,12 @@ void rombios32_init(void);
// smm.c
void smm_init();
+// smpdetect.c
+int smp_probe(void);
+
+// mptable.c
+void mptable_init(void);
+
// boot.c
void printf_bootdev(u16 bootdev);