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
Kernel/arm7 - Fiddling with PCI etc
[tpg/acess2.git]
/
Kernel
/
arch
/
x86_64
/
lib.c
diff --git
a/Kernel/arch/x86_64/lib.c
b/Kernel/arch/x86_64/lib.c
index
7402bda
..
5f6bdd8
100644
(file)
--- a/
Kernel/arch/x86_64/lib.c
+++ b/
Kernel/arch/x86_64/lib.c
@@
-8,6
+8,7
@@
#define SERIAL_PORT 0x3F8
#define GDB_SERIAL_PORT 0x2F8
#define SERIAL_PORT 0x3F8
#define GDB_SERIAL_PORT 0x2F8
+
// === IMPORTS ===
extern int GetCPUNum(void);
extern void *Proc_GetCurThread(void);
// === IMPORTS ===
extern int GetCPUNum(void);
extern void *Proc_GetCurThread(void);
@@
-16,6
+17,9
@@
extern void *Proc_GetCurThread(void);
int gbDebug_SerialSetup = 0;
int gbGDB_SerialSetup = 0;
int gbDebug_SerialSetup = 0;
int gbGDB_SerialSetup = 0;
+// === PROTOTYPEs ===
+ int putDebugChar(char ch);
+
// === CODE ===
/**
* \brief Determine if a short spinlock is locked
// === CODE ===
/**
* \brief Determine if a short spinlock is locked
@@
-141,6
+145,7
@@
void SHORTREL(struct sShortSpinlock *Lock)
}
// === DEBUG IO ===
}
// === DEBUG IO ===
+#if USE_GDB_STUB
int putDebugChar(char ch)
{
if(!gbGDB_SerialSetup) {
int putDebugChar(char ch)
{
if(!gbGDB_SerialSetup) {
@@
-172,6
+177,7
@@
int getDebugChar(void)
while( (inb(GDB_SERIAL_PORT + 5) & 1) == 0) ;
return inb(GDB_SERIAL_PORT);
}
while( (inb(GDB_SERIAL_PORT + 5) & 1) == 0) ;
return inb(GDB_SERIAL_PORT);
}
+#endif
void Debug_PutCharDebug(char ch)
{
void Debug_PutCharDebug(char ch)
{
@@
-195,6
+201,12
@@
void Debug_PutCharDebug(char ch)
#endif
}
#endif
}
+void Debug_PutStringDebug(const char *String)
+{
+ while(*String)
+ Debug_PutCharDebug(*String++);
+}
+
// === PORT IO ===
void outb(Uint16 Port, Uint8 Data)
{
// === PORT IO ===
void outb(Uint16 Port, Uint8 Data)
{
@@
-228,6
+240,7
@@
Uint32 ind(Uint16 Port)
}
// === Endianness ===
}
// === Endianness ===
+/*
Uint32 BigEndian32(Uint32 Value)
{
Uint32 ret;
Uint32 BigEndian32(Uint32 Value)
{
Uint32 ret;
@@
-242,6
+255,7
@@
Uint16 BigEndian16(Uint16 Value)
{
return (Value>>8)|(Value<<8);
}
{
return (Value>>8)|(Value<<8);
}
+*/
// === Memory Manipulation ===
int memcmp(const void *__dest, const void *__src, size_t __count)
// === Memory Manipulation ===
int memcmp(const void *__dest, const void *__src, size_t __count)
UCC
git Repository :: git.ucc.asn.au