Edit GDT class
This commit is contained in:
parent
9b856ae4d7
commit
3b171151bd
3 changed files with 60 additions and 9 deletions
|
@ -21,13 +21,36 @@ struct gdtDescriptorStruct{
|
|||
u8 base3;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
//Typedef :
|
||||
typedef struct gdtPointerStruct gdtPointerStruct;
|
||||
typedef struct gdtDescriptorStruct gdtDescriptorStruct;
|
||||
|
||||
//Functions :
|
||||
void initGdtDesc(u32 base, u32 limit, u8 type, u8 param, gdtDescriptorStruct *descriptor);
|
||||
void initGdt();
|
||||
|
||||
//Gdt class
|
||||
class Gdt{
|
||||
|
||||
private:
|
||||
|
||||
//Data members
|
||||
gdtDescriptorStruct m_Descriptor[4];
|
||||
gdtPointerStruct m_Pointer;
|
||||
|
||||
//Methods
|
||||
void initGdtDesc(u32 base, u32 limit, u8 type, u8 param, gdtDescriptorStruct *Descriptor);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//Constructor
|
||||
Gdt();
|
||||
|
||||
//Destructor
|
||||
~Gdt();
|
||||
|
||||
//Methods
|
||||
void loadGdt();
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue