Turnstone Operating System
Loading...
Searching...
No Matches
dummy_methods.c File Reference

dummy methods for efi. More...

#include <setup.h>
#include <types.h>
#include <utils.h>
#include <crc.h>
#include <random.h>
#include <memory.h>
#include <hashmap.h>
#include <bloomfilter.h>
#include <math.h>
#include <cache.h>
#include <bplustree.h>
#include <rbtree.h>
#include <binarysearch.h>
#include <memory/frame.h>
#include <memory/paging.h>
#include <efi.h>
#include <stdbufs.h>
#include <deflate.h>
#include <compression.h>
#include <quicksort.h>

Macros

#define TIME_TIMESTAMP_START_YEAR   1970
 
#define TIME_SECONDS_OF_MINUTE   60
 
#define TIME_SECONDS_OF_HOUR   3600
 
#define TIME_SECONDS_OF_DAY   86400
 
#define TIME_SECONDS_OF_MONTH   2629743
 
#define TIME_SECONDS_OF_YEAR   31556926
 
#define TIME_DAYS_AT_YEAR   365
 
#define TIME_DAYS_AT_LEAP_YEAR   366
 

Typedefs

typedef void * task_t
 
typedef void * future_t
 

Functions

 MODULE ("turnstone.efi")
 
boolean_t windowmanager_is_initialized (void)
 
void * task_get_current_task (void)
 dummy method for efi for getting the current task. More...
 
void task_yield (void)
 dummy method for efi for yielding the current task. More...
 
void backtrace (void)
 dummy method for efi for backtracing. More...
 
uint64_t task_get_id (void)
 dummy method for efi for getting the current task id. More...
 
int8_t apic_get_local_apic_id (void)
 dummy method for efi for getting local apic id. More...
 
future_t future_create_with_heap_and_data (memory_heap_t *heap, lock_t *lock, void *data)
 dummy method for efi for creating a future. More...
 
void * future_get_data_and_destroy (future_t fut)
 dummy method for efi for getting data from future and destroying it. More...
 
buffer_ttask_get_input_buffer (void)
 dummy method for efi for getting input buffer. More...
 
buffer_ttask_get_output_buffer (void)
 dummy method for efi for getting output buffer. More...
 
buffer_ttask_get_error_buffer (void)
 dummy method for efi for getting error buffer. More...
 
void future_task_wait_toggler (uint64_t task_id)
 
int8_t efi_frame_allocate_frame_by_count (struct frame_allocator_t *self, uint64_t count, frame_allocation_type_t fa_type, frame_t **fs, uint64_t *alloc_list_size)
 
efi_status_t efi_frame_allocator_init (void)
 initializes frame allocator More...
 
static boolean_t time_is_leap (int64_t year)
 check if a year is leap year More...
 
void efi_timer_init (void)
 
EFIAPI void efi_timer_cb (efi_event_t event, void *context)
 
void efi_set_current_time_ns (void)
 
time_t time_ns (time_t *t)
 gets current time in nanoseconds More...
 

Variables

lock_tvideo_lock = NULL
 
boolean_t KERNEL_PANIC_DISABLE_LOCKS = false
 
boolean_t windowmanager_initialized = false
 
efi_boot_services_tBS
 
efi_runtime_services_tRS
 
const int32_t time_days_of_month [] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
 
time_t efi_current_time_ns = 0
 

Detailed Description

dummy methods for efi.

this file contains methods that are not required for efi however are required for linking.

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

Macro Definition Documentation

◆ TIME_DAYS_AT_LEAP_YEAR

#define TIME_DAYS_AT_LEAP_YEAR   366

days of a leap year

◆ TIME_DAYS_AT_YEAR

#define TIME_DAYS_AT_YEAR   365

days of a leap year

◆ TIME_SECONDS_OF_DAY

#define TIME_SECONDS_OF_DAY   86400

seconds of a day

◆ TIME_SECONDS_OF_HOUR

#define TIME_SECONDS_OF_HOUR   3600

seconds of a hour

◆ TIME_SECONDS_OF_MINUTE

#define TIME_SECONDS_OF_MINUTE   60

seconds of a minute

◆ TIME_SECONDS_OF_MONTH

#define TIME_SECONDS_OF_MONTH   2629743

seconds of a month

◆ TIME_SECONDS_OF_YEAR

#define TIME_SECONDS_OF_YEAR   31556926

seconds of a year

◆ TIME_TIMESTAMP_START_YEAR

#define TIME_TIMESTAMP_START_YEAR   1970

start year of timestamp

Typedef Documentation

◆ future_t

typedef void* future_t

dummy future_t type for efi

◆ task_t

typedef void* task_t

dummy task_t type for efi

Function Documentation

◆ apic_get_local_apic_id()

int8_t apic_get_local_apic_id ( void  )

dummy method for efi for getting local apic id.

this method is not required for efi however is required for linking.

Returns
0

◆ backtrace()

void backtrace ( void  )

dummy method for efi for backtracing.

this method is not required for efi however is required for linking.

◆ efi_frame_allocate_frame_by_count()

int8_t efi_frame_allocate_frame_by_count ( struct frame_allocator_t self,
uint64_t  count,
frame_allocation_type_t  fa_type,
frame_t **  fs,
uint64_t alloc_list_size 
)

brief allocates a frame from the efi boot services.

Parameters
[in]selfframe allocator to use. (ignored)
[in]countnumber of frames to allocate.
[in]fa_typetype of frame allocation to use. (ignored)
[out]fsframe to allocate.
[out]alloc_list_sizesize of allocation list. (ignored)
Returns
0 on success. error code otherwise.

◆ efi_frame_allocator_init()

efi_status_t efi_frame_allocator_init ( void  )

initializes frame allocator

Returns
status of initialization

◆ future_create_with_heap_and_data()

future_t future_create_with_heap_and_data ( memory_heap_t heap,
lock_t lock,
void *  data 
)

dummy method for efi for creating a future.

this method is not required for efi however is required for linking. if data is not NULL then it is returned. otherwise 0xdeadbeaf is returned.

Parameters
heapheap to allocate future on. (ignored)
locklock to use for future. (ignored)
datadata to store in future.
Returns
data if data is not NULL. otherwise 0xdeadbeaf.

◆ future_get_data_and_destroy()

void * future_get_data_and_destroy ( future_t  fut)

dummy method for efi for getting data from future and destroying it.

this method is not required for efi however is required for linking. if fut is 0xdeadbeaf then NULL is returned. otherwise fut is returned. fut value may be a data pointer. see future_create_with_heap_and_data.

Parameters
futfuture to get data from.
Returns
fut if fut is not 0xdeadbeaf. otherwise NULL.

◆ MODULE()

MODULE ( "turnstone.efi"  )

module name

◆ task_get_current_task()

void * task_get_current_task ( void  )

dummy method for efi for getting the current task.

returns current task

this method is not required for efi however is required for linking.

Returns
NULL

◆ task_get_error_buffer()

buffer_t * task_get_error_buffer ( void  )

dummy method for efi for getting error buffer.

this method is not required for efi however is required for linking. NULL is returned.

Returns
NULL

◆ task_get_id()

uint64_t task_get_id ( void  )

dummy method for efi for getting the current task id.

returns current task's id

this method is not required for efi however is required for linking.

Returns
0

◆ task_get_input_buffer()

buffer_t * task_get_input_buffer ( void  )

dummy method for efi for getting input buffer.

this method is not required for efi however is required for linking. NULL is returned.

Returns
NULL

◆ task_get_output_buffer()

buffer_t * task_get_output_buffer ( void  )

dummy method for efi for getting output buffer.

this method is not required for efi however is required for linking. NULL is returned.

Returns
NULL

◆ task_yield()

void task_yield ( void  )

dummy method for efi for yielding the current task.

yields task for waiting other tasks.

this method is not required for efi however is required for linking.

◆ time_is_leap()

static boolean_t time_is_leap ( int64_t  year)
inlinestatic

check if a year is leap year

Parameters
[in]yearthe year to check
Returns
true if the year is leap year

◆ time_ns()

time_t time_ns ( time_t t)

gets current time in nanoseconds

Parameters
[out]tpointer to time_t
Returns
current time in nanoseconds

Variable Documentation

◆ BS

efi_boot_services_t* BS
extern

efi boot services global variable

EFI boot services global variable

◆ KERNEL_PANIC_DISABLE_LOCKS

boolean_t KERNEL_PANIC_DISABLE_LOCKS = false

global kernel panic lock for efi

◆ RS

efi runtime services global variable

EFI runtime services global variable

◆ time_days_of_month

const int32_t time_days_of_month[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }

day count of each month

◆ video_lock

lock_t* video_lock = NULL

global video lock for efi

◆ windowmanager_initialized

boolean_t windowmanager_initialized = false

windowmanager initialized flag global variable