mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2024-11-22 06:06:52 -08:00
Fixed the last issue with gdt.c other than ljmp when you run cmake -B build
This commit is contained in:
parent
ef2537720d
commit
436ba162eb
@ -67,16 +67,17 @@ target_link_libraries(ClassicOS PRIVATE)
|
|||||||
|
|
||||||
set(CMAKE_C_COMPILER gcc)
|
set(CMAKE_C_COMPILER gcc)
|
||||||
set(CMAKE_LINKER ld)
|
set(CMAKE_LINKER ld)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-g")
|
set(CMAKE_EXE_LINKER_FLAGS "-g -s")
|
||||||
set(CMAKE_CXX_FLAGS "-g -Wall")
|
set(CMAKE_CXX_FLAGS "-g -Wall")
|
||||||
set(CMAKE_C_FLAGS "-g -Wall")
|
set(CMAKE_C_FLAGS "-g -Wall")
|
||||||
set(CMAKE_BUILD_TYPE Debug)
|
set(CMAKE_BUILD_TYPE Debug)
|
||||||
set(CMAKE_CXX_COMPILER g++)
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
set(CMAKE_ASM_COMPILER nasm)
|
set(CMAKE_ASM_COMPILER nasm)
|
||||||
set(CMAKE_SYSTEM_PROCESSOR i386)
|
set(CMAKE_SYSTEM_PROCESSOR i386)
|
||||||
|
set(CMAKE_SYSTEM_NAME None)
|
||||||
set(CMAKE_ASM_NASM_COMPILER nasm)
|
set(CMAKE_ASM_NASM_COMPILER nasm)
|
||||||
set(CMAKE_C_STANDARD 17)
|
set(CMAKE_C_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
set(CMAKE_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build)
|
set(CMAKE_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build)
|
||||||
set_target_properties(ClassicOS PROPERTIES LINK_FLAGS "-T ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld")
|
set_target_properties(ClassicOS PROPERTIES LINK_FLAGS "-T ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld")
|
||||||
|
@ -68,15 +68,15 @@ void gdt_init()
|
|||||||
// Load GDT
|
// Load GDT
|
||||||
struct gdt_ptr gdtp;
|
struct gdt_ptr gdtp;
|
||||||
gdtp.limit = gp.limit;
|
gdtp.limit = gp.limit;
|
||||||
gdtp.base = (uint32_t)gdt;
|
gdtp.base = (uintptr_t)gdt;
|
||||||
__asm__ volatile("lgdt %0" : : "m"(gdtp));
|
__asm__ volatile("lgdt %0" : : "m"(gdtp));
|
||||||
__asm__ volatile("mov $0x10, %ax\n\t"
|
__asm__ volatile("mov $0x10, %ax\n\t"
|
||||||
"mov %ax, %ds\n\t"
|
"mov %ax, %ds\n\t"
|
||||||
"mov %ax, %es\n\t"
|
"mov %ax, %es\n\t"
|
||||||
"mov %ax, %fs\n\t"
|
"mov %ax, %fs\n\t"
|
||||||
"mov %ax, %gs\n\t"
|
"mov %ax, %gs\n\t"
|
||||||
"ljmp $0x08, $next\n\t"
|
"ljmp $0x08, $next_label\n\t"
|
||||||
"next:");
|
"next_label:");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exception handlers
|
// Exception handlers
|
||||||
|
Loading…
Reference in New Issue
Block a user