Skip to content

Commit

Permalink
Added for tss regarding #35
Browse files Browse the repository at this point in the history
  • Loading branch information
MirMohammadd committed Mar 21, 2024
1 parent 95f3d61 commit 593198c
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions include/hal/tss.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

/**
* MIT License
*
* Copyright (c) 2024 Heisenberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* @author Heisenberg
* @file tss.h
*/

#ifndef TSS_H
#define TSS_H

#include <types.h>


typedef struct tss {
uint32_t prev_tss;
uint32_t esp0;
uint32_t ss0;
uint32_t esp1;
uint32_t ss1;
uint32_t esp2;
uint32_t ss2;
uint32_t cr3;
uint32_t eip;
uint32_t eflags;
uint32_t eax;
uint32_t ecx;
uint32_t edx;
uint32_t ebx;
uint32_t esp;
uint32_t ebp;
uint32_t esi;
uint32_t edi;
uint32_t es;
uint32_t cs;
uint32_t ss;
uint32_t ds;
uint32_t fs;
uint32_t gs;
uint32_t ldtr;
uint16_t iomap;
} __attribute__((__packed__)) tss_t;

void flush_tss();
void install_tss();
void set_esp0(uint32_t esp);
#endif

0 comments on commit 593198c

Please sign in to comment.