Turnstone Operating System
Loading...
Searching...
No Matches
setup.h File Reference

handles required signatures for the host OS utilities. More...

#include <types.h>
#include <logging.h>
#include <memory.h>
#include "os_io.h"
#include <time.h>
#include <utils.h>
#include <random.h>
#include <xxhash.h>

Macros

#define ___SETUP_H   0
 
#define REDCOLOR   "\033[1;31m"
 
#define GREENCOLOR   "\033[1;32m"
 
#define RESETCOLOR   "\033[0m"
 

Functions

boolean_t windowmanager_is_initialized (void)
 
size_t video_printf (const char_t *fmt,...)
 
void video_print (const char_t *string)
 prints string to console with efi system table's console output protocol. More...
 
void print_success (const char *msg,...)
 
void print_error (const char *msg,...)
 
void cpu_hlt (void)
 stops cpu. More...
 
int8_t setup_ram2 (void)
 
void remove_ram2 (void)
 
void start_ram (void)
 
void stop_ram (void)
 
void on_sigabrt (int32_t sig)
 
buffer_tbuffer_get_io_buffer (uint64_t buffer_io_id)
 returns a buffer for io buffer id, first three buffers are stdin, stdout, stderr More...
 

Variables

FILE * mem_backend = NULL
 
int32_t mem_backend_fd = 0
 
uint64_t mmmap_address = 4ULL << 30
 
uint64_t mmap_size = RAMSIZE
 
boolean_t windowmanager_initialized = false
 
buffer_tdefault_buffer = NULL
 
memory_heap_td_heap = NULL
 
stdbufs_video_printer stdbufs_video_print
 

Detailed Description

handles required signatures for the host OS utilities.

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Function Documentation

◆ buffer_get_io_buffer()

buffer_t * buffer_get_io_buffer ( uint64_t  buffer_io_id)

returns a buffer for io buffer id, first three buffers are stdin, stdout, stderr

Parameters
[in]buffer_io_idio buffer id
Returns
buffer_t* pointer to buffer

◆ cpu_hlt()

void cpu_hlt ( void  )

stops cpu.

This command stops cpu using hlt assembly command inside for.

◆ video_print()

void video_print ( const char_t string)

prints string to console with efi system table's console output protocol.

Parameters
[in]stringstring to print.

Variable Documentation

◆ windowmanager_initialized

boolean_t windowmanager_initialized = false

windowmanager initialized flag global variable