XenevaOS
Loading...
Searching...
No Matches
Functions | Variables
x86_64_gdt.cpp File Reference
#include <Hal/x86_64_gdt.h>
#include <Hal/x86_64_lowlevel.h>
#include <aucon.h>
Include dependency graph for x86_64_gdt.cpp:

Functions

uint16_t x64_get_segment_register (size_t reg)
 Global Descriptor Table functions.
 
void x64_set_segment_register (size_t reg, uint16_t val)
 
void load_default_sregs ()
 
void x64_ltr (uint16_t seg)
 
 __declspec (align(4)) static gdt_entry gdt[GDT_ENTRIES]
 
void set_gdt_entry (gdt_entry &entry, size_t base, size_t limit, uint8_t access, uint8_t flags)
 
void save_sregs ()
 
void x86_64_hal_init_gdt ()
 Initialize the Global Descriptor Table.
 
void x86_64_hal_init_gdt_ap ()
 

Variables

 old_gdtr
 

Function Documentation

◆ __declspec()

__declspec ( align(4)  )

◆ load_default_sregs()

void load_default_sregs ( )

◆ save_sregs()

void save_sregs ( )

◆ set_gdt_entry()

void set_gdt_entry ( gdt_entry entry,
size_t  base,
size_t  limit,
uint8_t  access,
uint8_t  flags 
)

==========================================================================================

G L O B A L D E S C R I P T O R T A B L E

◆ x64_get_segment_register()

uint16_t x64_get_segment_register ( size_t  reg)

Global Descriptor Table functions.

BSD 2-Clause License

Copyright (c) 2022, 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.

◆ x64_ltr()

void x64_ltr ( uint16_t  seg)

◆ x64_set_segment_register()

void x64_set_segment_register ( size_t  reg,
uint16_t  val 
)

◆ x86_64_hal_init_gdt()

void x86_64_hal_init_gdt ( )

Initialize the Global Descriptor Table.

◆ x86_64_hal_init_gdt_ap()

void x86_64_hal_init_gdt_ap ( )

Variable Documentation

◆ old_gdtr

old_gdtr