Changeset aecf79f in mainline for kernel/arch/xen32/src/pm.c
- Timestamp:
- 2006-07-24T16:07:15Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c59dd1a2
- Parents:
- 7b0599b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/xen32/src/pm.c
r7b0599b raecf79f 74 74 /* TLS descriptor */ 75 75 { 0xffff, 0, 0, AR_PRESENT | AR_DATA | AR_WRITABLE | DPL_USER, 0xf, 0, 0, 1, 1, 0 }, 76 /* VESA Init descriptor */77 #ifdef CONFIG_FB78 { 0xffff, 0, VESA_INIT_SEGMENT>>12, AR_PRESENT | AR_CODE | DPL_KERNEL, 0xf, 0, 0, 0, 0, 0 }79 #endif80 76 }; 81 77 … … 153 149 static void clean_IOPL_NT_flags(void) 154 150 { 155 __asm__ volatile (156 "pushfl\n"157 "pop %%eax\n"158 "and $0xffff8fff, %%eax\n"159 "push %%eax\n"160 "popfl\n"161 : : : "eax"162 );151 // __asm__ volatile ( 152 // "pushfl\n" 153 // "pop %%eax\n" 154 // "and $0xffff8fff, %%eax\n" 155 // "push %%eax\n" 156 // "popfl\n" 157 // : : : "eax" 158 // ); 163 159 } 164 160 … … 166 162 static void clean_AM_flag(void) 167 163 { 168 __asm__ volatile (169 "mov %%cr0, %%eax\n"170 "and $0xfffbffff, %%eax\n"171 "mov %%eax, %%cr0\n"172 : : : "eax"173 );164 // __asm__ volatile ( 165 // "mov %%cr0, %%eax\n" 166 // "and $0xfffbffff, %%eax\n" 167 // "mov %%eax, %%cr0\n" 168 // : : : "eax" 169 // ); 174 170 } 175 171 … … 184 180 idtr.limit = sizeof(idt); 185 181 idtr.base = (uintptr_t) idt; 186 gdtr_load(&gdtr);187 idtr_load(&idtr);182 // gdtr_load(&gdtr); 183 // idtr_load(&idtr); 188 184 189 185 /* … … 192 188 */ 193 189 194 if (config.cpu_active == 1) {195 idt_init();196 /*197 * NOTE: bootstrap CPU has statically allocated TSS, because198 * the heap hasn't been initialized so far.199 */190 // if (config.cpu_active == 1) { 191 // idt_init(); 192 // /* 193 // * NOTE: bootstrap CPU has statically allocated TSS, because 194 // * the heap hasn't been initialized so far. 195 // */ 200 196 tss_p = &tss; 201 }202 else {203 tss_p = (tss_t *) malloc(sizeof(tss_t), FRAME_ATOMIC);204 if (!tss_p)205 panic("could not allocate TSS\n");206 }207 208 tss_initialize(tss_p);197 // } 198 // else { 199 // tss_p = (tss_t *) malloc(sizeof(tss_t), FRAME_ATOMIC); 200 // if (!tss_p) 201 // panic("could not allocate TSS\n"); 202 // } 203 204 // tss_initialize(tss_p); 209 205 210 206 gdt_p[TSS_DES].access = AR_PRESENT | AR_TSS | DPL_KERNEL; … … 219 215 * to its own TSS. We just need to load the TR register. 220 216 */ 221 tr_load(selector(TSS_DES));217 // tr_load(selector(TSS_DES)); 222 218 223 219 clean_IOPL_NT_flags(); /* Disable I/O on nonprivileged levels and clear NT flag. */
Note:
See TracChangeset
for help on using the changeset viewer.