Aufgabe 2: Unterbrechungen
GDT::Pointer Struct Reference
Structure that describes a GDT Pointer (aka GDT Descriptor) More...
#include <machine/gdt.h>
Public Member Functions | |
template<typename T , size_t LEN> | |
constexpr | Pointer (const T(&desc)[LEN]) |
Constructor (automatic length) More... | |
constexpr | Pointer (void *desc, size_t len) |
Constructor. More... | |
void | set (void *desc, size_t len) |
Set an address. More... | |
Public Attributes | |
uint16_t | limit |
GDT size in bytes (minus 1 byte) | |
void * | base |
GDT base address. | |
Detailed Description
Structure that describes a GDT Pointer (aka GDT Descriptor)
It contains both the length (in bytes) of the GDT (minus 1 byte) and the pointer to the GDT. The pointer to the GDT can be loaded using the instruction lgdt
.
- Note
- As Intel uses little endian for representing multi-byte values, the GDT::Pointer structure can be used for 16, 32, and 64 bit descriptor tables:
* | 16 bit | 16 bit | 16 bit | 16 bit | 16 bit | * +--------+---------------------------------------+ * Pointer | limit | base (up to 64 bit) | * +--------+---------+---------+---------+---------+ * | used for 16 bit | ignored... | * | used for 32 bit | ignored... | * | used for 64 bit | *
Constructor & Destructor Documentation
template<typename T , size_t LEN>
|
inlineexplicitconstexpr |
Constructor (automatic length)
- Parameters
-
desc Array of GDT segment descriptors – must be defined in the same module!
|
inlineconstexpr |
Constructor.
- Parameters
-
desc Address of the GDT segment descriptors len Number of entries
Member Function Documentation
|
inline |
Set an address.
- Note
- On change,
lgdt
must be executed again
- Parameters
-
desc Address of the GDT segment descriptors len Number of entries
The documentation for this struct was generated from the following file:
- machine/gdt.h