X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Facesskernel_src%2Fhelpers.c;h=fb3e48cf31b6403598145ae7f26c864ce4e335df;hb=a448627c1d3d7bd7ad98c1d1251dc46492a6ef43;hp=2209b05f22e518a8e2c52a636430f1185a99f075;hpb=602ba046995f564d8ca4b85c873cbfcafed72d42;p=tpg%2Facess2.git diff --git a/AcessNative/acesskernel_src/helpers.c b/AcessNative/acesskernel_src/helpers.c index 2209b05f..fb3e48cf 100644 --- a/AcessNative/acesskernel_src/helpers.c +++ b/AcessNative/acesskernel_src/helpers.c @@ -4,11 +4,13 @@ * * Kernel Main */ -#include +#include #include #include +#include #include +#if 0 void LogF(const char *Fmt, ...) { va_list args; @@ -50,12 +52,45 @@ void Panic(const char *Format, ...) void Debug_SetKTerminal(const char *Path) { - // Ignored, kernel debug goes to stdout + // Ignored, kernel debug goes to stdout instead of a virtual terminal } +#endif -void *Heap_Allocate(int Count, const char *File, int Line) +void KernelPanic_SetMode(void) { - return malloc(Count); + // NOP - No need +} +void KernelPanic_PutChar(char ch) +{ + fprintf(stderr, "%c", ch); +} +void Debug_PutCharDebug(char ch) +{ + printf("%c", ch); +} +void Debug_PutStringDebug(const char *String) +{ + printf("%s", String); +} + +void *Heap_Allocate(const char *File, int Line, int ByteCount) +{ + return malloc(ByteCount); +} + +void *Heap_AllocateZero(const char *File, int Line, int ByteCount) +{ + return calloc(ByteCount, 1); +} + +void *Heap_Reallocate(const char *File, int Line, void *Ptr, int Bytes) +{ + return realloc(Ptr, Bytes); +} + +void Heap_Deallocate(void *Ptr) +{ + free(Ptr); } tPAddr MM_GetPhysAddr(tVAddr VAddr) @@ -63,6 +98,11 @@ tPAddr MM_GetPhysAddr(tVAddr VAddr) return VAddr; // HACK! } +int MM_IsValidBuffer(tVAddr Base, int Size) +{ + return 1; +} + Uint MM_GetFlags(tVAddr VAddr) { return 0;