nckernel  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
segment.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gdtr
 x86 의 GDTR 레지스터의 자료 구조 More...
 
struct  segment
 x86 의 Segment descriptor 자료 구조 More...
 
struct  tss
 x86 의 Task state segment 자료 구조 More...
 
struct  tss16
 x86 에서 16 Bits Task state segment descriptor 의 자료 구조 More...
 
struct  tss32
 x86 의 32 Bits Task state segment descriptor 의 자료 구조 More...
 

Macros

#define IO_BITMAP_SIZE   8192
 x86 에서 user level thread (또는 사용자 프로세스) 가 I/O 를 실행할 때 TSS 에서 가리키는 I/O Bitmap 으로 접근 권한을 확인한다. port 는 2 Bytes 로 기술되므로, 총 65536 개가 할당 될 수 있으며, 한 바이트 8 개 까지 표현 할 수 있으므로, I/O Bitmap 은 총 8 KB 크기가 된다. More...
 
#define TI(table)   ((table) << 2)
 GDT 인지 LDT 인 구분 More...
 
#define TI(table)   ((table) << 2)
 GDT 인지 LDT 인 구분 More...
 

Enumerations

enum  { KERNEL = 0, USER = 3 }
 
enum  {
  DESC_NULL = 0x00, DESC_KERNEL_CS = 0x01, DESC_KERNEL_DS = 0x02, DESC_KERNEL_SS = 0x03,
  DESC_USER_CS = 0x04, DESC_USER_DS = 0x05, DESC_USER_SS = 0x06, DESC_TSS = 0x07,
  DESC_COUNT = 0x08, SIZEOF_A_DESC = 8, SIZEOF_A_DESC_BIT = 3
}
 
enum  { GDT = 0, LDT = 1 }
 
enum  {
  ACCESSED = 0x01, WRITABLE = 0x02, EXPANSION_DOWN = 0x04, READABLE = 0x02,
  CONFORMING = 0x04, CODE = 0x08
}
 

Functions

void segment_init (void)
 세그먼테이션 초기화 함수 More...
 
unsigned char * tss_io_bitmap_get (void)
 현재 Task state segment 에 기록된 I/O Bitmap 정보를 가져온다. More...
 
void tss_update_kernel_stack (unsigned long esp)
 TSS 의 커널 레벨 스택 정보를 재 설정한다. More...
 

Variables

struct segment __PACKED