Pip
Architecture-dependent parts of Pip: MAL, IAL and boot
Functions | Variables
debug.c File Reference

Benchmarking and serial line output. More...

#include "debug.h"
#include "serial.h"
#include <stdint.h>
#include "libc.h"
#include <stdarg.h>
#include "segment_selectors.h"
#include "hdef.h"

Functions

void krn_puts (char *c)
 Writes a string to the serial output. More...
 
void panic (int_ctx_t *is)
 Just a loop acting like a kernel panic. More...
 
void dumpRegs (int_ctx_t *is, uint32_t outputLevel)
 Dumps the registers of a saved interrupt context onto the serial output. More...
 
void puthex (int n)
 Writes an hexadecimal number to the serial output. More...
 
void putdec (int n)
 Writes a decimal number to the serial output. More...
 
void counterUpdate (uint32_t begin)
 
void displayTime ()
 
void kprintf (char *fmt,...)
 

Variables

uint32_t perfHighBegin
 
uint32_t perfLowBegin
 
uint32_t perfHighEnd
 
uint32_t perfLowEnd
 
static char * bf
 
static char buf [12]
 
static unsigned int num
 
static char uc
 
static char zs
 

Detailed Description

Benchmarking and serial line output.

Function Documentation

◆ counterUpdate()

void counterUpdate ( uint32_t  begin)

◆ displayTime()

void displayTime ( )

◆ dumpRegs()

dumpRegs ( int_ctx_t is,
uint32_t  outputLevel 
)

Dumps the registers of a saved interrupt context onto the serial output.

Parameters
isInterrupted state
outputLevelSerial log debugging output level

◆ kprintf()

void kprintf ( char *  fmt,
  ... 
)

◆ krn_puts()

krn_puts ( char *  c)

Writes a string to the serial output.

Parameters
cThe string to write

◆ panic()

void panic ( int_ctx_t is)

Just a loop acting like a kernel panic.

◆ putdec()

void putdec ( int  n)

Writes a decimal number to the serial output.

Parameters
nThe number to write

◆ puthex()

void puthex ( int  n)

Writes an hexadecimal number to the serial output.

Parameters
nThe number to write

Variable Documentation

◆ bf

char* bf
static

◆ buf

char buf[12]
static

◆ num

unsigned int num
static

◆ perfHighBegin

uint32_t perfHighBegin

◆ perfHighEnd

uint32_t perfHighEnd

◆ perfLowBegin

uint32_t perfLowBegin

◆ perfLowEnd

uint32_t perfLowEnd

◆ uc

char uc
static

◆ zs

char zs
static