XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
aucon.c File Reference
#include <stdint.h>
#include <aucon.h>
#include <_null.h>
#include "font.h"
#include <Mm\vmmngr.h>
#include <Mm\pmmngr.h>
#include <Mm\kmalloc.h>
#include <string.h>
#include <va_list.h>
#include <stdio.h>
#include <Hal/AA64/sched.h>
#include <process.h>
#include <Fs/vfs.h>
#include <Drivers/uart.h>
#include <Hal/AA64/aa64cpu.h>
#include <Hal/AA64/aa64lowlevel.h>
#include <Ipc/postbox.h>
Include dependency graph for aucon.c:

Macros

#define CONSOLE_BACKGROUND   0x00000000
 
#define CONSOLE_FOREGROUND   0xFFFFFFFF
 
#define RGB(r, g, b)    ((r & 0xFF) | ((g << 8)&0xFF00) | ((b << 16)&0xFF0000))
 
#define RED(col)    (col & 0xFF)
 
#define GREEN(col)    ((col>>8) & 0xFF)
 
#define BLUE(col)    ((col>>16) & 0xFF)
 

Functions

void AuUartPutString (const char *s)
 LBUartPutString – print a string to UART.
 
void AuTestPrint ()
 
void AuConsoleInitialize (PKERNEL_BOOT_INFO info, bool early)
 AuConsoleInitialize – initialize kernel direct screen console.
 
int AuConsoleIoControl (AuVFSNode *file, int code, void *arg)
 AuConsoleIoControl – iocontrol implementation for au console, called from user space.
 
void AuConsolePostInitialise (PKERNEL_BOOT_INFO info)
 AuConsolePostInitialise – initialise the post console process.
 
int_fast8_t high_set_bit (size_t sz)
 
int_fast8_t low_set_bit (size_t sz)
 
void AuPutPixel (size_t x, size_t y, uint32_t col)
 AuPutPixel – puts a pixel on the screen.
 
void AuPutC (char c)
 Put a character to console output.
 
void AuPutS (char *str)
 Prints string to console output.
 
void AuTextOut (const char *format,...)
 AuTextOut – standard text printing function for entire kernel.
 
void AuConsoleEarlyEnable (bool value)
 AuConsoleEarlyEnable – enables or disable early mode text output.
 
uint32_t AuConsoleGetScreenWidth ()
 AuConsoleGetScreenWidth – return the screen width.
 
uint32_t AuConsoleGetScreenHeight ()
 AuConsoleGetScreenHeight – return the screen height.
 
void AuConsoleFlushFramebuffer ()
 

Variables

uint8_tfont_data
 
uint32_t console_x
 
uint32_t console_y
 
uint32_t__framebuffer
 
AuConsoleaucon
 
uint32_t redmask
 
uint32_t bluemask
 
uint32_t greenmask
 
uint32_t resvmask
 
size_t h_res
 
size_t v_res
 
BOOL early_
 
void(* _print_func )(const char *text,...)
 

Detailed Description

BSD 2-Clause License

Copyright (c) 2022-2025, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ BLUE

#define BLUE (   col)     ((col>>16) & 0xFF)

◆ CONSOLE_BACKGROUND

#define CONSOLE_BACKGROUND   0x00000000

◆ CONSOLE_FOREGROUND

#define CONSOLE_FOREGROUND   0xFFFFFFFF

◆ GREEN

#define GREEN (   col)     ((col>>8) & 0xFF)

◆ RED

#define RED (   col)     (col & 0xFF)

◆ RGB

#define RGB (   r,
  g,
 
)     ((r & 0xFF) | ((g << 8)&0xFF00) | ((b << 16)&0xFF0000))

Function Documentation

◆ AuConsoleEarlyEnable()

void AuConsoleEarlyEnable ( bool  value)

AuConsoleEarlyEnable – enables or disable early mode text output.

Parameters
value– boolean value

◆ AuConsoleFlushFramebuffer()

void AuConsoleFlushFramebuffer ( )

◆ AuConsoleGetScreenHeight()

uint32_t AuConsoleGetScreenHeight ( )

AuConsoleGetScreenHeight – return the screen height.

Returns
return screen height

◆ AuConsoleGetScreenWidth()

uint32_t AuConsoleGetScreenWidth ( )

AuConsoleGetScreenWidth – return the screen width.

Returns
return screen width

◆ AuConsoleInitialize()

void AuConsoleInitialize ( PKERNEL_BOOT_INFO  info,
bool  early 
)

AuConsoleInitialize – initialize kernel direct screen console.

Parameters
info– Pointer to kernel boot info structure

◆ AuConsoleIoControl()

int AuConsoleIoControl ( AuVFSNode file,
int  code,
void *  arg 
)

AuConsoleIoControl – iocontrol implementation for au console, called from user space.

Parameters
file– Pointer to console file
code– control code number
arg– Pointer to any user data

◆ AuConsolePostInitialise()

void AuConsolePostInitialise ( PKERNEL_BOOT_INFO  info)

AuConsolePostInitialise – initialise the post console process.

Parameters
info– pointer to kernel boot info structure

◆ AuPutC()

void AuPutC ( char  c)

Put a character to console output.

Parameters
c– character to print

◆ AuPutPixel()

void AuPutPixel ( size_t  x,
size_t  y,
uint32_t  col 
)

AuPutPixel – puts a pixel on the screen.

Parameters
x– x location of the screen
y– y location of the screen
col– color of the pixel

◆ AuPutS()

void AuPutS ( char *  str)

Prints string to console output.

Parameters
str– string to print

◆ AuTestPrint()

void AuTestPrint ( )

◆ AuTextOut()

void AuTextOut ( const char *  format,
  ... 
)

AuTextOut – standard text printing function for entire kernel.

Parameters
text– text to output

◆ AuUartPutString()

void AuUartPutString ( const char *  s)
extern

LBUartPutString – print a string to UART.

Parameters
s– String to print

◆ high_set_bit()

int_fast8_t high_set_bit ( size_t  sz)

◆ low_set_bit()

int_fast8_t low_set_bit ( size_t  sz)

Variable Documentation

◆ __framebuffer

uint32_t* __framebuffer

◆ _print_func

void(* _print_func) (const char *text,...) ( const char *  text,
  ... 
)

◆ aucon

AuConsole* aucon

◆ bluemask

uint32_t bluemask

◆ console_x

uint32_t console_x

◆ console_y

uint32_t console_y

◆ early_

BOOL early_

◆ font_data

uint8_t* font_data

◆ greenmask

uint32_t greenmask

◆ h_res

size_t h_res

◆ redmask

uint32_t redmask

◆ resvmask

uint32_t resvmask

◆ v_res

size_t v_res