git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86_64 starts without erroring, reaches high mem and full 64-bit
[tpg/acess2.git]
/
Kernel
/
arch
/
x86
/
lib.c
diff --git
a/Kernel/arch/x86/lib.c
b/Kernel/arch/x86/lib.c
index
990d1dc
..
7fa666f
100644
(file)
--- a/
Kernel/arch/x86/lib.c
+++ b/
Kernel/arch/x86/lib.c
@@
-2,7
+2,7
@@
* AcessOS Microkernel Version
* lib.c
*/
* AcessOS Microkernel Version
* lib.c
*/
-#include <
common
.h>
+#include <
acess
.h>
// === CODE ===
void Spinlock(int *lock)
// === CODE ===
void Spinlock(int *lock)
@@
-49,10
+49,10
@@
Uint32 ind(Uint16 Port)
}
/**
}
/**
- * \fn void *memset(void *Dest, int Val,
Uin
t Num)
+ * \fn void *memset(void *Dest, int Val,
size_
t Num)
* \brief Do a byte granuality set of Dest
*/
* \brief Do a byte granuality set of Dest
*/
-void *memset(void *Dest, int Val,
Uin
t Num)
+void *memset(void *Dest, int Val,
size_
t Num)
{
__asm__ __volatile__ (
"rep stosl;\n\t"
{
__asm__ __volatile__ (
"rep stosl;\n\t"
@@
-62,19
+62,19
@@
void *memset(void *Dest, int Val, Uint Num)
return Dest;
}
/**
return Dest;
}
/**
- * \
fn void *memsetd(void *Dest, Uint Val, Uint Num)
+ * \
brief Set double words
*/
*/
-void *memsetd(void *Dest, Uint
Val, Uin
t Num)
+void *memsetd(void *Dest, Uint
32 Val, size_
t Num)
{
__asm__ __volatile__ ("rep stosl" :: "D" (Dest), "a" (Val), "c" (Num));
return Dest;
}
/**
{
__asm__ __volatile__ ("rep stosl" :: "D" (Dest), "a" (Val), "c" (Num));
return Dest;
}
/**
- * \fn int memcmp(const void *m1, const void *m2,
Uin
t Num)
+ * \fn int memcmp(const void *m1, const void *m2,
size_
t Num)
* \brief Compare two pieces of memory
*/
* \brief Compare two pieces of memory
*/
-int memcmp(const void *m1, const void *m2,
Uin
t Num)
+int memcmp(const void *m1, const void *m2,
size_
t Num)
{
while(Num--)
{
{
while(Num--)
{
@@
-86,10
+86,10
@@
int memcmp(const void *m1, const void *m2, Uint Num)
}
/**
}
/**
- * \fn void *memcpy(void *Dest, const void *Src,
Uin
t Num)
+ * \fn void *memcpy(void *Dest, const void *Src,
size_
t Num)
* \brief Copy \a Num bytes from \a Src to \a Dest
*/
* \brief Copy \a Num bytes from \a Src to \a Dest
*/
-void *memcpy(void *Dest, const void *Src,
Uin
t Num)
+void *memcpy(void *Dest, const void *Src,
size_
t Num)
{
if((Uint)Dest & 3 || (Uint)Src & 3)
__asm__ __volatile__ ("rep movsb" :: "D" (Dest), "S" (Src), "c" (Num));
{
if((Uint)Dest & 3 || (Uint)Src & 3)
__asm__ __volatile__ ("rep movsb" :: "D" (Dest), "S" (Src), "c" (Num));
@@
-103,10
+103,10
@@
void *memcpy(void *Dest, const void *Src, Uint Num)
return Dest;
}
/**
return Dest;
}
/**
- * \fn void *memcpyd(void *Dest, const void *Src,
Uin
t Num)
+ * \fn void *memcpyd(void *Dest, const void *Src,
size_
t Num)
* \brief Copy \a Num DWORDs from \a Src to \a Dest
*/
* \brief Copy \a Num DWORDs from \a Src to \a Dest
*/
-void *memcpyd(void *Dest, const void *Src,
Uin
t Num)
+void *memcpyd(void *Dest, const void *Src,
size_
t Num)
{
__asm__ __volatile__ ("rep movsl" :: "D" (Dest), "S" (Src), "c" (Num));
return Dest;
{
__asm__ __volatile__ ("rep movsl" :: "D" (Dest), "S" (Src), "c" (Num));
return Dest;
UCC
git Repository :: git.ucc.asn.au