forked from Bananymous/banan-os
				
			Kernel: Don't use IST on 32 bit target
This only exists in 64 bit
This commit is contained in:
		
							parent
							
								
									7a054787ca
								
							
						
					
					
						commit
						cceb066284
					
				|  | @ -65,7 +65,9 @@ namespace Kernel | ||||||
| 	{ | 	{ | ||||||
| 		memset(&m_tss, 0x00, sizeof(TaskStateSegment)); | 		memset(&m_tss, 0x00, sizeof(TaskStateSegment)); | ||||||
| 		m_tss.iopb = sizeof(TaskStateSegment); | 		m_tss.iopb = sizeof(TaskStateSegment); | ||||||
|  | #if ARCH(x86_64) | ||||||
| 		m_tss.ist1 = reinterpret_cast<vaddr_t>(g_boot_stack_top); | 		m_tss.ist1 = reinterpret_cast<vaddr_t>(g_boot_stack_top); | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
| 		uintptr_t base = reinterpret_cast<uintptr_t>(&m_tss); | 		uintptr_t base = reinterpret_cast<uintptr_t>(&m_tss); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -410,9 +410,11 @@ namespace Kernel | ||||||
| 		desc.offset1 = (uint16_t)((uintptr_t)handler >> 16); | 		desc.offset1 = (uint16_t)((uintptr_t)handler >> 16); | ||||||
| #if ARCH(x86_64) | #if ARCH(x86_64) | ||||||
| 		desc.offset2 = (uint32_t)((uintptr_t)handler >> 32); | 		desc.offset2 = (uint32_t)((uintptr_t)handler >> 32); | ||||||
|  | 		desc.IST = ist; | ||||||
|  | #else | ||||||
|  | 		(void)ist; | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| 		desc.IST = ist; |  | ||||||
| 		desc.selector = 0x08; | 		desc.selector = 0x08; | ||||||
| 		desc.flags = 0x8E; | 		desc.flags = 0x8E; | ||||||
| 	} | 	} | ||||||
|  | @ -454,8 +456,10 @@ namespace Kernel | ||||||
| 		ISR_LIST_X | 		ISR_LIST_X | ||||||
| #undef X | #undef X | ||||||
| 
 | 
 | ||||||
|  | #if ARCH(x86_64) | ||||||
| 		idt->register_interrupt_handler(DoubleFault, isr8, 1); | 		idt->register_interrupt_handler(DoubleFault, isr8, 1); | ||||||
| 		static_assert(DoubleFault == 8); | 		static_assert(DoubleFault == 8); | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
| #define X(num) idt->register_interrupt_handler(IRQ_VECTOR_BASE + num, irq ## num); | #define X(num) idt->register_interrupt_handler(IRQ_VECTOR_BASE + num, irq ## num); | ||||||
| 		IRQ_LIST_X | 		IRQ_LIST_X | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue