mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
Debug stuff
This commit is contained in:
parent
1beaf2b46d
commit
fe12e3bca9
@ -35,7 +35,7 @@ CINCLUDES=-Ikaleid/include
|
|||||||
|
|
||||||
CFLAGS1=-nostdlib -ffreestanding -mcmodel=large // -std=gnu11
|
CFLAGS1=-nostdlib -ffreestanding -mcmodel=large // -std=gnu11
|
||||||
CFLAGS2=_ASMTYPE -mno-red-zone -mno-mmx -mno-sse -mno-sse2
|
CFLAGS2=_ASMTYPE -mno-red-zone -mno-mmx -mno-sse -mno-sse2
|
||||||
CFLAGS=$(CFLAGS1) $(CFLAGS2)
|
CFLAGS=$(CFLAGS1) $(CFLAGS2) -DNDEBUG
|
||||||
|
|
||||||
CC=$(CCNAME) $(COPTIM) $(CWARNS) $(CFLAGS) $(CINCLUDES)
|
CC=$(CCNAME) $(COPTIM) $(CWARNS) $(CFLAGS) $(CINCLUDES)
|
||||||
|
|
||||||
|
@ -96,6 +96,9 @@ extern Terminal_t *stdOut;
|
|||||||
#define GetStdOut() (stdOut)
|
#define GetStdOut() (stdOut)
|
||||||
#define SetStdOut(x) (stdOut = (x))
|
#define SetStdOut(x) (stdOut = (x))
|
||||||
|
|
||||||
|
// Debug purposes
|
||||||
|
volatile ushort *vga;
|
||||||
|
|
||||||
//------------------------------------------//
|
//------------------------------------------//
|
||||||
|
|
||||||
#ifndef _NO_DEBUG
|
#ifndef _NO_DEBUG
|
||||||
|
@ -39,14 +39,12 @@ noreturn void StartKern(void *mbInfo, int mbMagic)
|
|||||||
// We're not ready to deal with interrupts
|
// We're not ready to deal with interrupts
|
||||||
DisableIRQs();
|
DisableIRQs();
|
||||||
|
|
||||||
volatile ushort *vga = (volatile ushort *)0xB8000;
|
|
||||||
|
|
||||||
// Kernel terminals
|
// Kernel terminals
|
||||||
//InitTerms();
|
InitTerms();
|
||||||
|
|
||||||
*vga++ = ('A' << 8 | 0x0F);
|
*vga = 'A' | (0x0F << 8);
|
||||||
|
|
||||||
// We're out
|
// We're out
|
||||||
StartPanic("Goodbye World :(");
|
// StartPanic("Goodbye World :(");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,5 +27,7 @@
|
|||||||
int cpuCount = 1;
|
int cpuCount = 1;
|
||||||
Processor_t cpuTable[NCPUS] = {0};
|
Processor_t cpuTable[NCPUS] = {0};
|
||||||
|
|
||||||
Terminal_t *stdOut, *stdDbg;
|
Terminal_t *stdOut = 0, *stdDbg = 0;
|
||||||
|
|
||||||
|
volatile ushort *vga = (volatile ushort *)0xB8000;
|
||||||
|
|
||||||
|
@ -32,12 +32,10 @@ extern Terminal_t VGA_Terminal;
|
|||||||
//
|
//
|
||||||
void InitTerms(void)
|
void InitTerms(void)
|
||||||
{
|
{
|
||||||
KalAssert(!GetStdOut() && !GetStdDbg());
|
//KalAssert(!GetStdOut() && !GetStdDbg());
|
||||||
|
|
||||||
VGA_Init();
|
VGA_Init();
|
||||||
|
|
||||||
// vgaTerm.initDone = INITOK;
|
|
||||||
|
|
||||||
SetStdDbg(&VGA_Terminal);
|
SetStdDbg(&VGA_Terminal);
|
||||||
SetStdOut(&VGA_Terminal);
|
SetStdOut(&VGA_Terminal);
|
||||||
|
|
||||||
|
@ -37,12 +37,12 @@
|
|||||||
#define VGA_ComputeEntry(ch, cl) (((ushort)(ch)) | (ushort)(cl) << 8)
|
#define VGA_ComputeEntry(ch, cl) (((ushort)(ch)) | (ushort)(cl) << 8)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Fill terminal with '\0'
|
// Clear terminal
|
||||||
//
|
//
|
||||||
error_t VGA_ClearTermUnlocked(Terminal_t *term)
|
error_t VGA_ClearTermUnlocked(Terminal_t *term)
|
||||||
{
|
{
|
||||||
const uchar color = VGA_ComputeColorCode(term->fgColor, term->bgColor);
|
const uchar color = VGA_ComputeColorCode(term->fgColor, term->bgColor);
|
||||||
const ushort filler = VGA_ComputeEntry('\0', color);
|
const ushort filler = VGA_ComputeEntry(' ', color);
|
||||||
const size_t bufsize = term->width * term->height;
|
const size_t bufsize = term->width * term->height;
|
||||||
|
|
||||||
// Fill the buffer
|
// Fill the buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user