Turnstone Operating System
Loading...
Searching...
No Matches
frame_allocator.64.c File Reference

Physical Frame allocator implementation for 64-bit systems. More...

#include <memory/frame.h>
#include <list.h>
#include <bplustree.h>
#include <systeminfo.h>
#include <efi.h>
#include <cpu.h>
#include <cpu/sync.h>
#include <cpu/descriptor.h>
#include <memory/paging.h>
#include <stdbufs.h>
#include <logging.h>

Classes

struct  frame_allocator_context_t
 

Typedefs

typedef struct frame_allocator_context_t frame_allocator_context_t
 

Functions

 MODULE ("turnstone.kernel.memory.frame")
 
int8_t frame_allocator_cmp_by_size (const void *data1, const void *data2)
 
int8_t frame_allocator_cmp_by_address (const void *data1, const void *data2)
 
int8_t fa_reserve_system_frames (frame_allocator_t *self, frame_t *f)
 
int8_t fa_allocate_frame_by_count (frame_allocator_t *self, uint64_t count, frame_allocation_type_t fa_type, frame_t **fs, uint64_t *alloc_list_size)
 
int8_t fa_allocate_frame (frame_allocator_t *self, frame_t *f)
 
int8_t fa_release_frame (frame_allocator_t *self, frame_t *f)
 
int8_t fa_release_acpi_reclaim_memory (frame_allocator_t *self)
 
int8_t fa_cleanup (frame_allocator_t *self)
 
frame_tfa_get_reserved_frames_of_address (frame_allocator_t *self, void *address)
 
frame_type_t fa_get_fa_type (efi_memory_type_t efi_m_type)
 
uint64_t fa_get_total_frame_count (frame_allocator_t *self)
 
uint64_t fa_get_free_frame_count (frame_allocator_t *self)
 
uint64_t fa_get_allocated_frame_count (frame_allocator_t *self)
 
static int8_t frame_allocator_clone_key (memory_heap_t *heap, const void *key, void **out)
 
static int8_t frame_allocator_destroy_key (memory_heap_t *heap, void *key)
 
frame_allocator_tframe_allocator_new_ext (memory_heap_t *heap)
 creates a frame allocator More...
 
void frame_allocator_print (frame_allocator_t *fa)
 prints frame allocator contents More...
 
void frame_allocator_map_page_of_acpi_code_data_frames (frame_allocator_t *fa)
 map virtual pages of acpi code and data frames More...
 
frame_allocator_tframe_get_allocator (void)
 
void frame_set_allocator (frame_allocator_t *fa)
 

Variables

static frame_allocator_tframe_allocator_default = NULL
 

Detailed Description

Physical Frame allocator implementation for 64-bit systems.

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

Function Documentation

◆ frame_allocator_map_page_of_acpi_code_data_frames()

void frame_allocator_map_page_of_acpi_code_data_frames ( frame_allocator_t fa)

map virtual pages of acpi code and data frames

Parameters
[in]faframe allocator

◆ frame_allocator_new_ext()

frame_allocator_t * frame_allocator_new_ext ( memory_heap_t heap)

creates a frame allocator

Parameters
[in]heapwhere frame will be reside
Returns
frame allocator

◆ frame_allocator_print()

void frame_allocator_print ( frame_allocator_t fa)

prints frame allocator contents

Parameters
[in]faframe allocator