From: John Hodge Date: Tue, 4 Oct 2011 03:51:01 +0000 (+0800) Subject: Kernel/armv7 - Fixed lack of in*/out* functions X-Git-Tag: rel0.11~38 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=62747dec23ae7ee6531ebf8e3f307726e810e84c;p=tpg%2Facess2.git Kernel/armv7 - Fixed lack of in*/out* functions --- diff --git a/Kernel/arch/armv7/include/arch.h b/Kernel/arch/armv7/include/arch.h index 36c1a3f3..837a5e10 100644 --- a/Kernel/arch/armv7/include/arch.h +++ b/Kernel/arch/armv7/include/arch.h @@ -39,4 +39,6 @@ extern void Debug_PutStringDebug(const char *String); extern void MM_SetupPhys(void); extern int MM_InitialiseVirtual(void); +#define NO_IO_BUS 1 + #endif diff --git a/Kernel/include/acess.h b/Kernel/include/acess.h index 5100c81c..5df49c12 100644 --- a/Kernel/include/acess.h +++ b/Kernel/include/acess.h @@ -11,6 +11,9 @@ #define UNUSED(x) UNUSED_##x __attribute__((unused)) #define offsetof(st, m) ((Uint)((char *)&((st *)(0))->m - (char *)0 )) +#define TRUE 1 +#define FALSE 0 + #include #include #include "errno.h" @@ -23,6 +26,7 @@ typedef Uint tGID; typedef Sint64 tTimestamp; typedef Sint64 tTime; typedef struct sShortSpinlock tShortSpinlock; +typedef int bool; // --- Helper Macros --- /** @@ -159,6 +163,16 @@ extern void Debug_HexDump(const char *Header, const void *Data, Uint Length); */ // --- IO --- +#if NO_IO_BUS +#define inb(a) (Log_Panic("Arch", "ARMv7 does not support in*/out* (%s:%i)", __FILE__, __LINE__),0) +#define inw(a) inb(a) +#define ind(a) inb(a) +#define inq(a) inb(a) +#define outb(a,b) inb(a) +#define outw(a,b) inb(a) +#define outd(a,b) inb(a) +#define outq(a,b) inb(a) +#else /** * \name I/O Memory Access * \{ @@ -174,7 +188,7 @@ extern Uint64 inq(Uint16 Port); /** * \} */ - +#endif // --- Memory Management --- /** * \name Memory Management