text: /* ===========================================================================
   * Orange 0.1.0
   *
   * Please refer to LICENSE for copyright information
   *
   *              Orange: A hobby OS designed for studying OS development.
   *
   *              Kernel: The main kernel
   *
   *      File    : tss.h
   *      Purpose : Task State Segment declarations
   *
   *      Notes   :
   *      Author  : Luke Smith
   * ===========================================================================
   */
  
  #ifndef _KERNEL_TSS_H
  #define _KERNEL_TSS_H 1
  
  typedef struct tss_entry {
    unsigned int prev_tss;
    unsigned int esp0;
    unsigned int ss0;
    unsigned int esp1;
    unsigned int ss1;
    unsigned int cr3;
    unsigned int eip;
    unsigned int eflags;
    unsigned int eax;
    unsigned int ecx;
    unsigned int edx;
    unsigned int ebx;
    unsigned int esp;
    unsigned int ebp;
    unsigned int esi;
    unsigned int edi;
    unsigned int es;
    unsigned int cs;
    unsigned int ss;
    unsigned int ds;
    unsigned int fs;
    unsigned int gs;
    unsigned int ldtr;
    unsigned short rsrv;
    unsigned short iomap_base;
  } __attribute__((packed)) tss_entry_t;
  
  static void write_tss(unsigned int, unsigned short, unsigned int);
  extern void tss_flush();
  
  #endif
  