X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Facesskernel_src%2Fhelpers.c;h=b08906c4ebeed5a0feb94bdd423d7483f4ec3379;hb=f737fb47a583fca5c922604d419ab744609308df;hp=ef5f1db13df6290e7608732f1837c2946253085e;hpb=02cbaac1233be9c5228973a787431fa5e0aa178e;p=tpg%2Facess2.git diff --git a/AcessNative/acesskernel_src/helpers.c b/AcessNative/acesskernel_src/helpers.c index ef5f1db1..b08906c4 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,7 +52,25 @@ 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 KernelPanic_SetMode(void) +{ + // 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) @@ -58,6 +78,21 @@ 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) { return VAddr; // HACK!