Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 143 → Rev 142

/SPARTAN/trunk/arch/ia32/src/pm.c
128,7 → 128,7
}
 
 
// Clean IOPL(12,13) and NT(14) flags in EFLAGS register
 
static void clean_IOPL_NT_flags(void)
{
asm
144,24 → 144,9
);
}
 
// Clean AM(18) flag in CR0 register
static void clean_AM_flag(void)
{
asm
(
"mov %%cr0,%%eax;"
"and $0xFFFBFFFF,%%eax;"
"mov %%eax,%%cr0;"
:
:
:"%eax"
);
}
 
 
 
 
 
void pm_init(void)
{
struct descriptor *gdt_p = (struct descriptor *) PA2KA(gdtr.base);
200,6 → 185,5
*/
__asm__("ltr %0" : : "r" ((__u16) selector(TSS_DES)));
clean_IOPL_NT_flags(); //Disable I/O on nonprivileged levels
clean_AM_flag(); //Disable alignment check
clean_IOPL_NT_flags();
}
/SPARTAN/trunk/doc/TODO
12,7 → 12,7
+ save/restore floating point context on context switch
+ [ia32] lazy context switch using TS flag [DONE]
+ [ia32] MMX,SSE1-.. initialization
+ [ia32] review privilege separation [DONE]
+ [ia32] review privilege separation
+ zero IOPL in EFLAGS [DONE]
+ before IRET (from SYSCALL), zero NT in EFLAGS [DONE]
+ [ia32] review the cache controling bits in CR0 register