mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2024-11-24 14:56:51 -08:00
Compare commits
No commits in common. "73ad94400be4dbf7aaf9b0434dbdf88d6d7a024b" and "3554f240a8d8214fd53e9d4afad536b6fa304a4a" have entirely different histories.
73ad94400b
...
3554f240a8
BIN
.vscode/browse.vc.db
vendored
BIN
.vscode/browse.vc.db
vendored
Binary file not shown.
BIN
.vscode/browse.vc.db-shm
vendored
BIN
.vscode/browse.vc.db-shm
vendored
Binary file not shown.
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -7,7 +7,7 @@
|
|||||||
"C_Cpp.configurationWarnings": "enabled",
|
"C_Cpp.configurationWarnings": "enabled",
|
||||||
"C_Cpp.default.browse.limitSymbolsToIncludedHeaders": false,
|
"C_Cpp.default.browse.limitSymbolsToIncludedHeaders": false,
|
||||||
"C_Cpp.default.cStandard": "c11",
|
"C_Cpp.default.cStandard": "c11",
|
||||||
"C_Cpp.default.compilerPath": "/usr/bin/gcc",
|
"C_Cpp.default.compilerPath": "",
|
||||||
"C_Cpp.default.cppStandard": "c++11",
|
"C_Cpp.default.cppStandard": "c++11",
|
||||||
"C_Cpp.default.enableConfigurationSquiggles": true,
|
"C_Cpp.default.enableConfigurationSquiggles": true,
|
||||||
"C_Cpp.errorSquiggles": "enabledIfIncludesResolve",
|
"C_Cpp.errorSquiggles": "enabledIfIncludesResolve",
|
||||||
@ -62,5 +62,5 @@
|
|||||||
],
|
],
|
||||||
"C_Cpp.default.browse.databaseFilename": "${workspaceFolder}/.vscode/browse.vc.db",
|
"C_Cpp.default.browse.databaseFilename": "${workspaceFolder}/.vscode/browse.vc.db",
|
||||||
"C_Cpp.default.configurationProvider": "ms-vscode.cpptools",
|
"C_Cpp.default.configurationProvider": "ms-vscode.cpptools",
|
||||||
"C_Cpp.default.intelliSenseMode": "linux-gcc-x64"
|
"C_Cpp.default.intelliSenseMode": "linux-gcc-x64",
|
||||||
}
|
}
|
130
ask.txt
130
ask.txt
@ -1,25 +1,4 @@
|
|||||||
I am making a fully custom x86 32 bit IA32 Operating System in Visual Studio Code 1.81 for Debian Linux. This will not be a linux based OS. It's also not posix, linux, unix, windows, bsd or any other derivitive thereof but does use the same concepts. The system I am developing on has a Intel i7-3770k and is an x86_64 bit and runs Debian 10 Buster Linux with Linux Kernel version 4.19.0-25-amd64 (supports UNIX 98 PTY) and Bash 5.0.3 and the drive has an ext4 partition and a tempfs partition. I have the extension ms-vscode.cpptools installed on VSCode. I also have both gcc 8.3.0 and clang 7.0.1-8+deb10u2 installed. All of my compilers, debuggers, linkers are in /usr/bin. I have Coreutils 8.30, Binutils 2.31.1, Bison 3.3.2, Diffutils 3.7, Findutils 4.6.0.225, Gawk 4.2.1, Grep 3.3, Gzip 1.9, M4 1.4.18, Make 4.2.1, Patch 2.7.6, Perl 5.28.1, Python 3.7.3, Sed 4.7, Tar 1.30, Texinfo 6.5, Xz 5.2.4. The operating system would run on any system that has a 386 CPU up to a 32 bit only Prescott Pentium 4 released in 2004 including i386, i486, i586 and i686. I am using gcc to compile, ld to link, gdb to debug, nasm to do the assembly and qemu to emulate the system. it has a two stage bootloader. The os should boot from floppy, hard drive and optical media.
|
I am making a fully custom x86 32 bit IA32 Operating System in Visual Studio Code 1.81 for Debian Linux. This will not be a linux based OS. It's also not posix, linux, unix, windows, bsd or any other derivitive thereof but does use the same concepts. The system I am developing on has a Intel i7-3770k and is an x86_64 bit and runs Debian 10 Buster Linux with Linux Kernel version 4.19.0-25-amd64 (supports UNIX 98 PTY) and Bash 5.0.3 and the drive has an ext4 partition and a tempfs partition. I have the extension ms-vscode.cpptools installed on VSCode. I also have both gcc 8.3.0 and clang 7.0.1-8+deb10u2 installed. All of my compilers, debuggers, linkers are in /usr/bin. I have Coreutils 8.30, Binutils 2.31.1, Bison 3.3.2, Diffutils 3.7, Findutils 4.6.0.225, Gawk 4.2.1, Grep 3.3, Gzip 1.9, M4 1.4.18, Make 4.2.1, Patch 2.7.6, Perl 5.28.1, Python 3.7.3, Sed 4.7, Tar 1.30, Texinfo 6.5, Xz 5.2.4. The operating system would run on any system that has a 386 CPU up to a 32 bit only Prescott Pentium 4 released in 2004. I am using gcc to compile, ld to link, gdb to debug, nasm to do the assembly and qemu to emulate the system. it has a two stage bootloader. The os should boot from floppy, hard drive and optical media.
|
||||||
|
|
||||||
Here is the system ,emory map
|
|
||||||
BIOS: The Basic Input/Output System often resides in the lower 64KB (first 65536 bytes) of memory.
|
|
||||||
MBR (Master Boot Record): The first sector of the boot disk (usually 512 bytes) is typically located at 0x00007C00.
|
|
||||||
VGA Memory: The memory used for graphics display might be mapped in this region (e.g., 0xB8000 for text mode).
|
|
||||||
Legacy Device Memory: Memory-mapped I/O (MMIO) regions for legacy devices like keyboard, mouse, or floppy controller could be present.
|
|
||||||
Lower 1GB of RAM: This is the main usable memory region for the kernel, applications, and data. The kernel might load itself here after being booted by the bootloader.
|
|
||||||
|
|
||||||
the kernel.c should be kernel_main() and
|
|
||||||
|
|
||||||
Kernel Stack Implementation:
|
|
||||||
|
|
||||||
Memory Allocation: The kernel reserves a dedicated memory region for the kernel stack during boot or early initialization. This region typically resides within the usable portion of memory allocated for the kernel itself (often within the first 1GB on IA32 systems).
|
|
||||||
|
|
||||||
Stack Pointer (ESP): The kernel maintains a stack pointer register (often ESP or RSP on x86 architectures) that points to the top of the kernel stack. Initially, this pointer is set to the end of the allocated stack memory region, indicating an empty stack.
|
|
||||||
|
|
||||||
Stack Growth: When a function is called in kernel space, the required data (arguments, local variables, return address) is pushed onto the stack. This decrements the stack pointer value, effectively "growing" the stack downwards in memory.
|
|
||||||
|
|
||||||
Stack Protection: The kernel sets up memory protection mechanisms to ensure the stack doesn't grow beyond its allocated region or overwrite other critical kernel data structures.
|
|
||||||
|
|
||||||
Stack Overflow Protection: The kernel might implement stack overflow protection mechanisms to detect and handle situations where the stack grows too large and threatens to overwrite other memory areas. This can involve setting up guard pages below the allocated stack space to trigger exceptions if accessed.
|
|
||||||
|
|
||||||
here is the file structure:
|
here is the file structure:
|
||||||
|
|
||||||
@ -148,44 +127,17 @@ ClassicOS/
|
|||||||
This is my CMakeLists.txt
|
This is my CMakeLists.txt
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.13.4)
|
cmake_minimum_required(VERSION 3.13.4)
|
||||||
|
project(ClassicOS VERSION 0.0.1 LANGUAGES C)
|
||||||
set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/src)
|
|
||||||
set(CMAKE_BINARY_DIR ${CMAKE_CURRENT_LIST_DIR}/build)
|
|
||||||
|
|
||||||
include(x86-baremetal-toolchain.cmake)
|
|
||||||
|
|
||||||
project(ClassicOSBL VERSION 0.0.1 LANGUAGES ASM_NASM)
|
|
||||||
project(ClassicOS VERSION 0.0.1 LANGUAGES C CXX ASM_NASM)
|
|
||||||
|
|
||||||
enable_language(ASM_NASM)
|
|
||||||
set(CMAKE_ASM_NASM_OBJECT_FORMAT elf32)
|
|
||||||
|
|
||||||
set(IS_OS_WINDOWS FALSE)
|
|
||||||
set(IS_OS_LINUX FALSE)
|
|
||||||
set(IS_OS_MAC FALSE)
|
|
||||||
|
|
||||||
if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
|
|
||||||
set(IS_OS_WINDOWS TRUE)
|
|
||||||
message("Building on the Windows operating system.")
|
|
||||||
elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
|
|
||||||
set(IS_OS_LINUX TRUE)
|
|
||||||
message("Building on the Linux operating system.")
|
|
||||||
elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
|
|
||||||
set(IS_OS_MAC TRUE)
|
|
||||||
message("Building on the Mac operating system.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# Source files
|
# Source files
|
||||||
set(BOOT_SOURCE_FILES
|
set(BOOT_SOURCE_FILES
|
||||||
src/boot/boot.asm
|
src/boot/boot.asm
|
||||||
src/boot/linker.ld
|
src/boot/linker.ld
|
||||||
)
|
)
|
||||||
|
|
||||||
set(GRUB_SOURCE_FILES
|
set(GRUB_SOURCE_FILES
|
||||||
src/boot/grub/grub.cfg
|
src/boot/grub/grub.cfg
|
||||||
src/boot/grub/menu.lst
|
src/boot/grub/menu.lst
|
||||||
)
|
)
|
||||||
|
|
||||||
set(DRIVERS_SOURCE_FILES
|
set(DRIVERS_SOURCE_FILES
|
||||||
src/drivers/audio/audio.c
|
src/drivers/audio/audio.c
|
||||||
src/drivers/audio/audio.h
|
src/drivers/audio/audio.h
|
||||||
@ -195,7 +147,6 @@ set(DRIVERS_SOURCE_FILES
|
|||||||
src/drivers/bus/isa.h
|
src/drivers/bus/isa.h
|
||||||
src/drivers/bus/mca.c
|
src/drivers/bus/mca.c
|
||||||
src/drivers/bus/mca.h
|
src/drivers/bus/mca.h
|
||||||
#src/drivers/bus/pci.asm
|
|
||||||
src/drivers/bus/pci.c
|
src/drivers/bus/pci.c
|
||||||
src/drivers/bus/pci.h
|
src/drivers/bus/pci.h
|
||||||
src/drivers/bus/vesa.c
|
src/drivers/bus/vesa.c
|
||||||
@ -203,7 +154,6 @@ set(DRIVERS_SOURCE_FILES
|
|||||||
src/drivers/display/display.c
|
src/drivers/display/display.c
|
||||||
src/drivers/display/display.h
|
src/drivers/display/display.h
|
||||||
src/drivers/io/io.c
|
src/drivers/io/io.c
|
||||||
src/drivers/io/io.asm
|
|
||||||
src/drivers/io/io.h
|
src/drivers/io/io.h
|
||||||
src/drivers/keyboard/keyboard.c
|
src/drivers/keyboard/keyboard.c
|
||||||
src/drivers/keyboard/keyboard.h
|
src/drivers/keyboard/keyboard.h
|
||||||
@ -218,59 +168,49 @@ set(KERNEL_SOURCE_FILES
|
|||||||
src/kernel/arch/x86/include/types.h
|
src/kernel/arch/x86/include/types.h
|
||||||
src/kernel/arch/x86/memory/memory.c
|
src/kernel/arch/x86/memory/memory.c
|
||||||
src/kernel/arch/x86/gdt.c
|
src/kernel/arch/x86/gdt.c
|
||||||
src/kernel/arch/x86/gdt.asm
|
src/kernel/arch/x86/gdt.c
|
||||||
src/kernel/arch/x86/gdt.h
|
|
||||||
src/kernel/arch/x86/idt.c
|
src/kernel/arch/x86/idt.c
|
||||||
src/kernel/arch/x86/idt.asm
|
|
||||||
src/kernel/arch/x86/idt.h
|
src/kernel/arch/x86/idt.h
|
||||||
src/kernel/arch/x86/isr/isr.c
|
src/kernel/arch/x86/isr.c
|
||||||
src/kernel/arch/x86/isr/isr.h
|
src/kernel/arch/x86/isr.h
|
||||||
src/kernel/arch/x86/isr/exceptions.c
|
|
||||||
src/kernel/arch/x86/isr/exceptions.h
|
|
||||||
src/kernel/kernel.c
|
src/kernel/kernel.c
|
||||||
src/kernel/kernel.h
|
src/kernel/kernel.h
|
||||||
src/kernel/linker.ld
|
src/kernel/linker.ld
|
||||||
src/kernel/print.c
|
src/kernel/print.c
|
||||||
src/kernel/stack.c
|
|
||||||
src/kernel/stack.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(UTIL_SOURCE_FILES
|
|
||||||
src/EHS.h
|
|
||||||
src/sys/CPU.h src/sys/CPU.cpp src/sys/CPU_GCC_AMD64.asm
|
|
||||||
src/Util.h src/Util.cpp
|
|
||||||
src/Version.h src/Version.cpp
|
|
||||||
src/Serializer.h
|
|
||||||
src/Array.h
|
|
||||||
src/Vector.h
|
|
||||||
src/SArray.h
|
|
||||||
src/Str.h
|
|
||||||
src/PRNG.h
|
|
||||||
src/HRNG.h src/HRNG_GCC.s
|
|
||||||
src/Math.h src/Math.cpp src/Math_GCC_AMD64.s
|
|
||||||
src/Rect.h
|
|
||||||
src/Range.h src/Range.cpp
|
|
||||||
src/Color4.h src/Color4.cpp
|
|
||||||
src/Color3.h src/Color3.cpp
|
|
||||||
src/Quat.h
|
|
||||||
src/Vec4.h
|
|
||||||
src/Vec3.h
|
|
||||||
src/Vec2.h
|
|
||||||
src/Mat4.h
|
|
||||||
src/Mat3.h
|
|
||||||
src/Mat2.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set_source_files_properties(src/boot/boot.asm PROPERTIES LANGUAGE ASM_NASM)
|
|
||||||
|
|
||||||
add_executable(ClassicOS
|
add_executable(ClassicOS
|
||||||
${KERNEL_SOURCE_FILES}
|
|
||||||
${DRIVERS_SOURCE_FILES}
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(ClassicOSBL
|
|
||||||
${BOOT_SOURCE_FILES}
|
${BOOT_SOURCE_FILES}
|
||||||
${GRUB_SOURCE_FILES}
|
${GRUB_SOURCE_FILES}
|
||||||
|
${DRIVERS_SOURCE_FILES}
|
||||||
|
${KERNEL_SOURCE_FILES}
|
||||||
)
|
)
|
||||||
|
|
||||||
message("${CMAKE_EXE_LINKER_FLAGS}")
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
|
# Enable testing
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
|
target_link_libraries(ClassicOS PRIVATE)
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_LINKER ld)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "-g -s")
|
||||||
|
set(CMAKE_LINK_FLAGS "${CMAKE_LINK_FLAGS} -e kernel_main")
|
||||||
|
set(CMAKE_CXX_FLAGS "-g -Wall")
|
||||||
|
set(CMAKE_C_FLAGS "-g -Wall -m32")
|
||||||
|
set(CMAKE_C_FLAGS_DEBUG "-g")
|
||||||
|
set(CMAKE_BUILD_TYPE Debug)
|
||||||
|
set(CMAKE_GDB_COMMAND gdb)
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_ASM_COMPILER nasm)
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} --32")
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR i386)
|
||||||
|
set(CMAKE_SYSTEM_NAME None)
|
||||||
|
set(CMAKE_ASM_NASM_COMPILER nasm)
|
||||||
|
set(CMAKE_C_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
|
set(CMAKE_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build)
|
||||||
|
set_target_properties(ClassicOS PROPERTIES LINK_FLAGS "-T ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld")
|
||||||
|
@ -35,13 +35,15 @@ CMAKE_ASM_NASM_FLAGS_RELEASE:STRING=
|
|||||||
//Flags used by the ASM_NASM compiler during RELWITHDEBINFO builds.
|
//Flags used by the ASM_NASM compiler during RELWITHDEBINFO builds.
|
||||||
CMAKE_ASM_NASM_FLAGS_RELWITHDEBINFO:STRING=
|
CMAKE_ASM_NASM_FLAGS_RELWITHDEBINFO:STRING=
|
||||||
|
|
||||||
//Choose the type of build, options are: None Debug Release RelWithDebInfo
|
//No help, variable specified on the command line.
|
||||||
// MinSizeRel ...
|
CMAKE_BUILD_TYPE:STRING=Debug
|
||||||
CMAKE_BUILD_TYPE:STRING=
|
|
||||||
|
|
||||||
//Enable/Disable color output during build.
|
//Enable/Disable color output during build.
|
||||||
CMAKE_COLOR_MAKEFILE:BOOL=ON
|
CMAKE_COLOR_MAKEFILE:BOOL=ON
|
||||||
|
|
||||||
|
//No help, variable specified on the command line.
|
||||||
|
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++
|
||||||
|
|
||||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||||
// for the GCC compiler
|
// for the GCC compiler
|
||||||
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-8
|
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-8
|
||||||
@ -65,6 +67,9 @@ CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
|||||||
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
|
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
|
||||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||||
|
|
||||||
|
//No help, variable specified on the command line.
|
||||||
|
CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc
|
||||||
|
|
||||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||||
// for the GCC compiler
|
// for the GCC compiler
|
||||||
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-8
|
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-8
|
||||||
@ -103,8 +108,8 @@ CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
|
|||||||
//Flags used by the linker during RELWITHDEBINFO builds.
|
//Flags used by the linker during RELWITHDEBINFO builds.
|
||||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||||
|
|
||||||
//Enable/Disable output of compile commands during generation.
|
//No help, variable specified on the command line.
|
||||||
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
|
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
|
||||||
|
|
||||||
//Install path prefix, prepended onto install directories.
|
//Install path prefix, prepended onto install directories.
|
||||||
CMAKE_INSTALL_PREFIX:PATH=/usr/local
|
CMAKE_INSTALL_PREFIX:PATH=/usr/local
|
||||||
|
@ -69,5 +69,5 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
|
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
|
||||||
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/8/32;/usr/x86_64-linux-gnu/lib32;/usr/lib/i386-linux-gnu;/usr/lib32;/lib/i386-linux-gnu;/lib32;/usr/lib/gcc/x86_64-linux-gnu/8;/usr/x86_64-linux-gnu/lib;/usr/lib")
|
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/8/32;/usr/lib/i386-linux-gnu;/usr/lib32;/lib/i386-linux-gnu;/lib32;/usr/lib/gcc/x86_64-linux-gnu/8;/usr/lib")
|
||||||
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
||||||
|
@ -72,5 +72,5 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
|
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
|
||||||
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/8/32;/usr/x86_64-linux-gnu/lib32;/usr/lib/i386-linux-gnu;/usr/lib32;/lib/i386-linux-gnu;/lib32;/usr/lib/gcc/x86_64-linux-gnu/8;/usr/x86_64-linux-gnu/lib;/usr/lib")
|
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/8/32;/usr/lib/i386-linux-gnu;/usr/lib32;/lib/i386-linux-gnu;/lib32;/usr/lib/gcc/x86_64-linux-gnu/8;/usr/lib")
|
||||||
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
Checking whether the ASM_NASM compiler is GNU using "--version" terminated after 10 s due to timeout.Checking whether the ASM_NASM compiler is Clang using "--version" terminated after 10 s due to timeout.Checking whether the ASM_NASM compiler is AppleClang using "--version" did not match "(Apple LLVM version)":
|
Checking whether the ASM_NASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
|
||||||
|
NASM version 2.14
|
||||||
|
Checking whether the ASM_NASM compiler is Clang using "--version" did not match "(clang version)":
|
||||||
|
NASM version 2.14
|
||||||
|
Checking whether the ASM_NASM compiler is AppleClang using "--version" did not match "(Apple LLVM version)":
|
||||||
NASM version 2.14
|
NASM version 2.14
|
||||||
Checking whether the ASM_NASM compiler is HP using "-V" did not match "HP C":
|
Checking whether the ASM_NASM compiler is HP using "-V" did not match "HP C":
|
||||||
nasm:error: unrecognised option `-V'
|
nasm:error: unrecognised option `-V'
|
||||||
|
@ -32,14 +32,14 @@ The CXX compiler identification is GNU, found in "/home/gbowne1/Documents/Classi
|
|||||||
Determining if the C compiler works passed with the following output:
|
Determining if the C compiler works passed with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_950ed/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_3f008/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_950ed.dir/build.make CMakeFiles/cmTC_950ed.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_3f008.dir/build.make CMakeFiles/cmTC_3f008.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building C object CMakeFiles/cmTC_950ed.dir/testCCompiler.c.o
|
Building C object CMakeFiles/cmTC_3f008.dir/testCCompiler.c.o
|
||||||
/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=gnu11 -o CMakeFiles/cmTC_950ed.dir/testCCompiler.c.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp/testCCompiler.c
|
/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=gnu11 -o CMakeFiles/cmTC_3f008.dir/testCCompiler.c.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp/testCCompiler.c
|
||||||
Linking C executable cmTC_950ed
|
Linking C executable cmTC_3f008
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_950ed.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3f008.dir/link.txt --verbose=1
|
||||||
/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_950ed.dir/testCCompiler.c.o -o cmTC_950ed
|
/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_3f008.dir/testCCompiler.c.o -o cmTC_3f008
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
@ -47,14 +47,14 @@ make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/C
|
|||||||
Detecting C compiler ABI info compiled with the following output:
|
Detecting C compiler ABI info compiled with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_50241/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_e0e28/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_50241.dir/build.make CMakeFiles/cmTC_50241.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_e0e28.dir/build.make CMakeFiles/cmTC_e0e28.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building C object CMakeFiles/cmTC_50241.dir/CMakeCCompilerABI.c.o
|
Building C object CMakeFiles/cmTC_e0e28.dir/CMakeCCompilerABI.c.o
|
||||||
/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=gnu11 -o CMakeFiles/cmTC_50241.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.13/Modules/CMakeCCompilerABI.c
|
/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=gnu11 -o CMakeFiles/cmTC_e0e28.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.13/Modules/CMakeCCompilerABI.c
|
||||||
Linking C executable cmTC_50241
|
Linking C executable cmTC_e0e28
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_50241.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e0e28.dir/link.txt --verbose=1
|
||||||
/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack -v CMakeFiles/cmTC_50241.dir/CMakeCCompilerABI.c.o -o cmTC_50241
|
/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack -v CMakeFiles/cmTC_e0e28.dir/CMakeCCompilerABI.c.o -o cmTC_e0e28
|
||||||
Using built-in specs.
|
Using built-in specs.
|
||||||
COLLECT_GCC=/usr/bin/gcc
|
COLLECT_GCC=/usr/bin/gcc
|
||||||
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
|
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
|
||||||
@ -65,11 +65,11 @@ Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-6' --with-b
|
|||||||
Thread model: posix
|
Thread model: posix
|
||||||
gcc version 8.3.0 (Debian 8.3.0-6)
|
gcc version 8.3.0 (Debian 8.3.0-6)
|
||||||
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/
|
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/
|
||||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32/:/lib/i386-linux-gnu/:/lib/../lib32/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../:/lib/i386-linux-gnu/:/lib/:/usr/lib/i386-linux-gnu/:/usr/lib/
|
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32/:/lib/i386-linux-gnu/:/lib/../lib32/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../:/lib/i386-linux-gnu/:/lib/:/usr/lib/i386-linux-gnu/:/usr/lib/
|
||||||
COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_50241' '-mtune=generic' '-march=i686'
|
COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_e0e28' '-mtune=generic' '-march=i686'
|
||||||
/usr/lib/gcc/x86_64-linux-gnu/8/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccSAGcU0.res --build-id --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -pie -o cmTC_50241 -e kernel_main -z noexecstack -L/usr/lib/gcc/x86_64-linux-gnu/8/32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32 -L/lib/i386-linux-gnu -L/lib/../lib32 -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../.. -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu CMakeFiles/cmTC_50241.dir/CMakeCCompilerABI.c.o -T /home/gbowne1/Documents/ClassicOS/linker.ld
|
/usr/lib/gcc/x86_64-linux-gnu/8/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper -plugin-opt=-fresolution=/tmp/cc8gDg1y.res --build-id --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -pie -o cmTC_e0e28 -e kernel_main -z noexecstack -L/usr/lib/gcc/x86_64-linux-gnu/8/32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32 -L/lib/i386-linux-gnu -L/lib/../lib32 -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../.. -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu CMakeFiles/cmTC_e0e28.dir/CMakeCCompilerABI.c.o -T /home/gbowne1/Documents/ClassicOS/linker.ld
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_50241' '-mtune=generic' '-march=i686'
|
COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_e0e28' '-mtune=generic' '-march=i686'
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
|
|
||||||
@ -77,14 +77,14 @@ Parsed C implicit link information from above output:
|
|||||||
link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
||||||
ignore line: [Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp]
|
ignore line: [Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp]
|
||||||
ignore line: []
|
ignore line: []
|
||||||
ignore line: [Run Build Command:"/usr/bin/make" "cmTC_50241/fast"]
|
ignore line: [Run Build Command:"/usr/bin/make" "cmTC_e0e28/fast"]
|
||||||
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_50241.dir/build.make CMakeFiles/cmTC_50241.dir/build]
|
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_e0e28.dir/build.make CMakeFiles/cmTC_e0e28.dir/build]
|
||||||
ignore line: [make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp']
|
ignore line: [make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp']
|
||||||
ignore line: [Building C object CMakeFiles/cmTC_50241.dir/CMakeCCompilerABI.c.o]
|
ignore line: [Building C object CMakeFiles/cmTC_e0e28.dir/CMakeCCompilerABI.c.o]
|
||||||
ignore line: [/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=gnu11 -o CMakeFiles/cmTC_50241.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.13/Modules/CMakeCCompilerABI.c]
|
ignore line: [/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=gnu11 -o CMakeFiles/cmTC_e0e28.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.13/Modules/CMakeCCompilerABI.c]
|
||||||
ignore line: [Linking C executable cmTC_50241]
|
ignore line: [Linking C executable cmTC_e0e28]
|
||||||
ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_50241.dir/link.txt --verbose=1]
|
ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e0e28.dir/link.txt --verbose=1]
|
||||||
ignore line: [/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack -v CMakeFiles/cmTC_50241.dir/CMakeCCompilerABI.c.o -o cmTC_50241 ]
|
ignore line: [/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack -v CMakeFiles/cmTC_e0e28.dir/CMakeCCompilerABI.c.o -o cmTC_e0e28 ]
|
||||||
ignore line: [Using built-in specs.]
|
ignore line: [Using built-in specs.]
|
||||||
ignore line: [COLLECT_GCC=/usr/bin/gcc]
|
ignore line: [COLLECT_GCC=/usr/bin/gcc]
|
||||||
ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper]
|
ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper]
|
||||||
@ -95,14 +95,14 @@ Parsed C implicit link information from above output:
|
|||||||
ignore line: [Thread model: posix]
|
ignore line: [Thread model: posix]
|
||||||
ignore line: [gcc version 8.3.0 (Debian 8.3.0-6) ]
|
ignore line: [gcc version 8.3.0 (Debian 8.3.0-6) ]
|
||||||
ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/]
|
ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/]
|
||||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32/:/lib/i386-linux-gnu/:/lib/../lib32/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../:/lib/i386-linux-gnu/:/lib/:/usr/lib/i386-linux-gnu/:/usr/lib/]
|
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32/:/lib/i386-linux-gnu/:/lib/../lib32/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../:/lib/i386-linux-gnu/:/lib/:/usr/lib/i386-linux-gnu/:/usr/lib/]
|
||||||
ignore line: [COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_50241' '-mtune=generic' '-march=i686']
|
ignore line: [COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_e0e28' '-mtune=generic' '-march=i686']
|
||||||
link line: [ /usr/lib/gcc/x86_64-linux-gnu/8/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccSAGcU0.res --build-id --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -pie -o cmTC_50241 -e kernel_main -z noexecstack -L/usr/lib/gcc/x86_64-linux-gnu/8/32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32 -L/lib/i386-linux-gnu -L/lib/../lib32 -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../.. -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu CMakeFiles/cmTC_50241.dir/CMakeCCompilerABI.c.o -T /home/gbowne1/Documents/ClassicOS/linker.ld]
|
link line: [ /usr/lib/gcc/x86_64-linux-gnu/8/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper -plugin-opt=-fresolution=/tmp/cc8gDg1y.res --build-id --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -pie -o cmTC_e0e28 -e kernel_main -z noexecstack -L/usr/lib/gcc/x86_64-linux-gnu/8/32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32 -L/lib/i386-linux-gnu -L/lib/../lib32 -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../.. -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu CMakeFiles/cmTC_e0e28.dir/CMakeCCompilerABI.c.o -T /home/gbowne1/Documents/ClassicOS/linker.ld]
|
||||||
arg [/usr/lib/gcc/x86_64-linux-gnu/8/collect2] ==> ignore
|
arg [/usr/lib/gcc/x86_64-linux-gnu/8/collect2] ==> ignore
|
||||||
arg [-plugin] ==> ignore
|
arg [-plugin] ==> ignore
|
||||||
arg [/usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so] ==> ignore
|
arg [/usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so] ==> ignore
|
||||||
arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper] ==> ignore
|
arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper] ==> ignore
|
||||||
arg [-plugin-opt=-fresolution=/tmp/ccSAGcU0.res] ==> ignore
|
arg [-plugin-opt=-fresolution=/tmp/cc8gDg1y.res] ==> ignore
|
||||||
arg [--build-id] ==> ignore
|
arg [--build-id] ==> ignore
|
||||||
arg [--eh-frame-hdr] ==> ignore
|
arg [--eh-frame-hdr] ==> ignore
|
||||||
arg [-m] ==> ignore
|
arg [-m] ==> ignore
|
||||||
@ -112,12 +112,11 @@ Parsed C implicit link information from above output:
|
|||||||
arg [/lib/ld-linux.so.2] ==> ignore
|
arg [/lib/ld-linux.so.2] ==> ignore
|
||||||
arg [-pie] ==> ignore
|
arg [-pie] ==> ignore
|
||||||
arg [-o] ==> ignore
|
arg [-o] ==> ignore
|
||||||
arg [cmTC_50241] ==> ignore
|
arg [cmTC_e0e28] ==> ignore
|
||||||
arg [-e] ==> ignore
|
arg [-e] ==> ignore
|
||||||
arg [kernel_main] ==> ignore
|
arg [kernel_main] ==> ignore
|
||||||
arg [-znoexecstack] ==> ignore
|
arg [-znoexecstack] ==> ignore
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/32] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/32]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/32] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/32]
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32]
|
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu]
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32]
|
||||||
arg [-L/lib/i386-linux-gnu] ==> dir [/lib/i386-linux-gnu]
|
arg [-L/lib/i386-linux-gnu] ==> dir [/lib/i386-linux-gnu]
|
||||||
@ -125,16 +124,14 @@ Parsed C implicit link information from above output:
|
|||||||
arg [-L/usr/lib/i386-linux-gnu] ==> dir [/usr/lib/i386-linux-gnu]
|
arg [-L/usr/lib/i386-linux-gnu] ==> dir [/usr/lib/i386-linux-gnu]
|
||||||
arg [-L/usr/lib/../lib32] ==> dir [/usr/lib/../lib32]
|
arg [-L/usr/lib/../lib32] ==> dir [/usr/lib/../lib32]
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8]
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib]
|
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu]
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../..]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../..]
|
||||||
arg [-L/lib/i386-linux-gnu] ==> dir [/lib/i386-linux-gnu]
|
arg [-L/lib/i386-linux-gnu] ==> dir [/lib/i386-linux-gnu]
|
||||||
arg [-L/usr/lib/i386-linux-gnu] ==> dir [/usr/lib/i386-linux-gnu]
|
arg [-L/usr/lib/i386-linux-gnu] ==> dir [/usr/lib/i386-linux-gnu]
|
||||||
arg [CMakeFiles/cmTC_50241.dir/CMakeCCompilerABI.c.o] ==> ignore
|
arg [CMakeFiles/cmTC_e0e28.dir/CMakeCCompilerABI.c.o] ==> ignore
|
||||||
arg [-T] ==> ignore
|
arg [-T] ==> ignore
|
||||||
arg [/home/gbowne1/Documents/ClassicOS/linker.ld] ==> ignore
|
arg [/home/gbowne1/Documents/ClassicOS/linker.ld] ==> ignore
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/32] ==> [/usr/lib/gcc/x86_64-linux-gnu/8/32]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/32] ==> [/usr/lib/gcc/x86_64-linux-gnu/8/32]
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32] ==> [/usr/x86_64-linux-gnu/lib32]
|
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32] ==> [/usr/lib32]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32] ==> [/usr/lib32]
|
||||||
collapse library dir [/lib/i386-linux-gnu] ==> [/lib/i386-linux-gnu]
|
collapse library dir [/lib/i386-linux-gnu] ==> [/lib/i386-linux-gnu]
|
||||||
@ -142,13 +139,12 @@ Parsed C implicit link information from above output:
|
|||||||
collapse library dir [/usr/lib/i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
collapse library dir [/usr/lib/i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
||||||
collapse library dir [/usr/lib/../lib32] ==> [/usr/lib32]
|
collapse library dir [/usr/lib/../lib32] ==> [/usr/lib32]
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8] ==> [/usr/lib/gcc/x86_64-linux-gnu/8]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8] ==> [/usr/lib/gcc/x86_64-linux-gnu/8]
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib] ==> [/usr/x86_64-linux-gnu/lib]
|
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../..] ==> [/usr/lib]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../..] ==> [/usr/lib]
|
||||||
collapse library dir [/lib/i386-linux-gnu] ==> [/lib/i386-linux-gnu]
|
collapse library dir [/lib/i386-linux-gnu] ==> [/lib/i386-linux-gnu]
|
||||||
collapse library dir [/usr/lib/i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
collapse library dir [/usr/lib/i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
||||||
implicit libs: []
|
implicit libs: []
|
||||||
implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/8/32;/usr/x86_64-linux-gnu/lib32;/usr/lib/i386-linux-gnu;/usr/lib32;/lib/i386-linux-gnu;/lib32;/usr/lib/gcc/x86_64-linux-gnu/8;/usr/x86_64-linux-gnu/lib;/usr/lib]
|
implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/8/32;/usr/lib/i386-linux-gnu;/usr/lib32;/lib/i386-linux-gnu;/lib32;/usr/lib/gcc/x86_64-linux-gnu/8;/usr/lib]
|
||||||
implicit fwks: []
|
implicit fwks: []
|
||||||
|
|
||||||
|
|
||||||
@ -157,14 +153,14 @@ Parsed C implicit link information from above output:
|
|||||||
Detecting C [-std=c11] compiler features compiled with the following output:
|
Detecting C [-std=c11] compiler features compiled with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_a8f4a/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_ba45b/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_a8f4a.dir/build.make CMakeFiles/cmTC_a8f4a.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_ba45b.dir/build.make CMakeFiles/cmTC_ba45b.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building C object CMakeFiles/cmTC_a8f4a.dir/feature_tests.c.o
|
Building C object CMakeFiles/cmTC_ba45b.dir/feature_tests.c.o
|
||||||
/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=c11 -std=gnu11 -o CMakeFiles/cmTC_a8f4a.dir/feature_tests.c.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.c
|
/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=c11 -std=gnu11 -o CMakeFiles/cmTC_ba45b.dir/feature_tests.c.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.c
|
||||||
Linking C executable cmTC_a8f4a
|
Linking C executable cmTC_ba45b
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a8f4a.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ba45b.dir/link.txt --verbose=1
|
||||||
/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_a8f4a.dir/feature_tests.c.o -o cmTC_a8f4a
|
/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_ba45b.dir/feature_tests.c.o -o cmTC_ba45b
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
@ -178,14 +174,14 @@ make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/C
|
|||||||
Detecting C [-std=c99] compiler features compiled with the following output:
|
Detecting C [-std=c99] compiler features compiled with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_3fc08/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_3b6b2/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_3fc08.dir/build.make CMakeFiles/cmTC_3fc08.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_3b6b2.dir/build.make CMakeFiles/cmTC_3b6b2.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building C object CMakeFiles/cmTC_3fc08.dir/feature_tests.c.o
|
Building C object CMakeFiles/cmTC_3b6b2.dir/feature_tests.c.o
|
||||||
/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=c99 -std=gnu11 -o CMakeFiles/cmTC_3fc08.dir/feature_tests.c.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.c
|
/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=c99 -std=gnu11 -o CMakeFiles/cmTC_3b6b2.dir/feature_tests.c.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.c
|
||||||
Linking C executable cmTC_3fc08
|
Linking C executable cmTC_3b6b2
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3fc08.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3b6b2.dir/link.txt --verbose=1
|
||||||
/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_3fc08.dir/feature_tests.c.o -o cmTC_3fc08
|
/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_3b6b2.dir/feature_tests.c.o -o cmTC_3b6b2
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
@ -199,14 +195,14 @@ make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/C
|
|||||||
Detecting C [-std=c90] compiler features compiled with the following output:
|
Detecting C [-std=c90] compiler features compiled with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_f007b/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_513a6/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_f007b.dir/build.make CMakeFiles/cmTC_f007b.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_513a6.dir/build.make CMakeFiles/cmTC_513a6.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building C object CMakeFiles/cmTC_f007b.dir/feature_tests.c.o
|
Building C object CMakeFiles/cmTC_513a6.dir/feature_tests.c.o
|
||||||
/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=c90 -std=gnu11 -o CMakeFiles/cmTC_f007b.dir/feature_tests.c.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.c
|
/usr/bin/gcc -m32 -ffreestanding -nostdlib -std=c90 -std=gnu11 -o CMakeFiles/cmTC_513a6.dir/feature_tests.c.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.c
|
||||||
Linking C executable cmTC_f007b
|
Linking C executable cmTC_513a6
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f007b.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_513a6.dir/link.txt --verbose=1
|
||||||
/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_f007b.dir/feature_tests.c.o -o cmTC_f007b
|
/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_513a6.dir/feature_tests.c.o -o cmTC_513a6
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
@ -218,14 +214,14 @@ make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/C
|
|||||||
Determining if the CXX compiler works passed with the following output:
|
Determining if the CXX compiler works passed with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_3279a/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_6e8ec/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_3279a.dir/build.make CMakeFiles/cmTC_3279a.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_6e8ec.dir/build.make CMakeFiles/cmTC_6e8ec.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building CXX object CMakeFiles/cmTC_3279a.dir/testCXXCompiler.cxx.o
|
Building CXX object CMakeFiles/cmTC_6e8ec.dir/testCXXCompiler.cxx.o
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=gnu++11 -o CMakeFiles/cmTC_3279a.dir/testCXXCompiler.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=gnu++11 -o CMakeFiles/cmTC_6e8ec.dir/testCXXCompiler.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
|
||||||
Linking CXX executable cmTC_3279a
|
Linking CXX executable cmTC_6e8ec
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3279a.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6e8ec.dir/link.txt --verbose=1
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_3279a.dir/testCXXCompiler.cxx.o -o cmTC_3279a
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_6e8ec.dir/testCXXCompiler.cxx.o -o cmTC_6e8ec
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
@ -233,14 +229,14 @@ make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/C
|
|||||||
Detecting CXX compiler ABI info compiled with the following output:
|
Detecting CXX compiler ABI info compiled with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_8ccc6/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_f2925/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_8ccc6.dir/build.make CMakeFiles/cmTC_8ccc6.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_f2925.dir/build.make CMakeFiles/cmTC_f2925.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building CXX object CMakeFiles/cmTC_8ccc6.dir/CMakeCXXCompilerABI.cpp.o
|
Building CXX object CMakeFiles/cmTC_f2925.dir/CMakeCXXCompilerABI.cpp.o
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=gnu++11 -o CMakeFiles/cmTC_8ccc6.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.13/Modules/CMakeCXXCompilerABI.cpp
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=gnu++11 -o CMakeFiles/cmTC_f2925.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.13/Modules/CMakeCXXCompilerABI.cpp
|
||||||
Linking CXX executable cmTC_8ccc6
|
Linking CXX executable cmTC_f2925
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8ccc6.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f2925.dir/link.txt --verbose=1
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack -v CMakeFiles/cmTC_8ccc6.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_8ccc6
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack -v CMakeFiles/cmTC_f2925.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_f2925
|
||||||
Using built-in specs.
|
Using built-in specs.
|
||||||
COLLECT_GCC=/usr/bin/g++
|
COLLECT_GCC=/usr/bin/g++
|
||||||
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
|
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
|
||||||
@ -251,11 +247,11 @@ Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-6' --with-b
|
|||||||
Thread model: posix
|
Thread model: posix
|
||||||
gcc version 8.3.0 (Debian 8.3.0-6)
|
gcc version 8.3.0 (Debian 8.3.0-6)
|
||||||
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/
|
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/
|
||||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32/:/lib/i386-linux-gnu/:/lib/../lib32/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../:/lib/i386-linux-gnu/:/lib/:/usr/lib/i386-linux-gnu/:/usr/lib/
|
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32/:/lib/i386-linux-gnu/:/lib/../lib32/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../:/lib/i386-linux-gnu/:/lib/:/usr/lib/i386-linux-gnu/:/usr/lib/
|
||||||
COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_8ccc6' '-shared-libgcc' '-mtune=generic' '-march=i686'
|
COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_f2925' '-shared-libgcc' '-mtune=generic' '-march=i686'
|
||||||
/usr/lib/gcc/x86_64-linux-gnu/8/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccCahleH.res --build-id --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -pie -o cmTC_8ccc6 -e kernel_main -z noexecstack -L/usr/lib/gcc/x86_64-linux-gnu/8/32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32 -L/lib/i386-linux-gnu -L/lib/../lib32 -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../.. -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu CMakeFiles/cmTC_8ccc6.dir/CMakeCXXCompilerABI.cpp.o -T /home/gbowne1/Documents/ClassicOS/linker.ld
|
/usr/lib/gcc/x86_64-linux-gnu/8/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccyGHeAT.res --build-id --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -pie -o cmTC_f2925 -e kernel_main -z noexecstack -L/usr/lib/gcc/x86_64-linux-gnu/8/32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32 -L/lib/i386-linux-gnu -L/lib/../lib32 -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../.. -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu CMakeFiles/cmTC_f2925.dir/CMakeCXXCompilerABI.cpp.o -T /home/gbowne1/Documents/ClassicOS/linker.ld
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_8ccc6' '-shared-libgcc' '-mtune=generic' '-march=i686'
|
COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_f2925' '-shared-libgcc' '-mtune=generic' '-march=i686'
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
|
|
||||||
@ -263,14 +259,14 @@ Parsed CXX implicit link information from above output:
|
|||||||
link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
||||||
ignore line: [Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp]
|
ignore line: [Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp]
|
||||||
ignore line: []
|
ignore line: []
|
||||||
ignore line: [Run Build Command:"/usr/bin/make" "cmTC_8ccc6/fast"]
|
ignore line: [Run Build Command:"/usr/bin/make" "cmTC_f2925/fast"]
|
||||||
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_8ccc6.dir/build.make CMakeFiles/cmTC_8ccc6.dir/build]
|
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_f2925.dir/build.make CMakeFiles/cmTC_f2925.dir/build]
|
||||||
ignore line: [make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp']
|
ignore line: [make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp']
|
||||||
ignore line: [Building CXX object CMakeFiles/cmTC_8ccc6.dir/CMakeCXXCompilerABI.cpp.o]
|
ignore line: [Building CXX object CMakeFiles/cmTC_f2925.dir/CMakeCXXCompilerABI.cpp.o]
|
||||||
ignore line: [/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=gnu++11 -o CMakeFiles/cmTC_8ccc6.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.13/Modules/CMakeCXXCompilerABI.cpp]
|
ignore line: [/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=gnu++11 -o CMakeFiles/cmTC_f2925.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.13/Modules/CMakeCXXCompilerABI.cpp]
|
||||||
ignore line: [Linking CXX executable cmTC_8ccc6]
|
ignore line: [Linking CXX executable cmTC_f2925]
|
||||||
ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8ccc6.dir/link.txt --verbose=1]
|
ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f2925.dir/link.txt --verbose=1]
|
||||||
ignore line: [/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack -v CMakeFiles/cmTC_8ccc6.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_8ccc6 ]
|
ignore line: [/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack -v CMakeFiles/cmTC_f2925.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_f2925 ]
|
||||||
ignore line: [Using built-in specs.]
|
ignore line: [Using built-in specs.]
|
||||||
ignore line: [COLLECT_GCC=/usr/bin/g++]
|
ignore line: [COLLECT_GCC=/usr/bin/g++]
|
||||||
ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper]
|
ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper]
|
||||||
@ -281,14 +277,14 @@ Parsed CXX implicit link information from above output:
|
|||||||
ignore line: [Thread model: posix]
|
ignore line: [Thread model: posix]
|
||||||
ignore line: [gcc version 8.3.0 (Debian 8.3.0-6) ]
|
ignore line: [gcc version 8.3.0 (Debian 8.3.0-6) ]
|
||||||
ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/]
|
ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/]
|
||||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32/:/lib/i386-linux-gnu/:/lib/../lib32/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../:/lib/i386-linux-gnu/:/lib/:/usr/lib/i386-linux-gnu/:/usr/lib/]
|
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/32/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32/:/lib/i386-linux-gnu/:/lib/../lib32/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../:/lib/i386-linux-gnu/:/lib/:/usr/lib/i386-linux-gnu/:/usr/lib/]
|
||||||
ignore line: [COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_8ccc6' '-shared-libgcc' '-mtune=generic' '-march=i686']
|
ignore line: [COLLECT_GCC_OPTIONS='-ffreestanding' '-nostdlib' '-e' 'kernel_main' '-T' '/home/gbowne1/Documents/ClassicOS/linker.ld' '-m32' '-z' 'noexecstack' '-v' '-o' 'cmTC_f2925' '-shared-libgcc' '-mtune=generic' '-march=i686']
|
||||||
link line: [ /usr/lib/gcc/x86_64-linux-gnu/8/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccCahleH.res --build-id --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -pie -o cmTC_8ccc6 -e kernel_main -z noexecstack -L/usr/lib/gcc/x86_64-linux-gnu/8/32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32 -L/lib/i386-linux-gnu -L/lib/../lib32 -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../.. -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu CMakeFiles/cmTC_8ccc6.dir/CMakeCXXCompilerABI.cpp.o -T /home/gbowne1/Documents/ClassicOS/linker.ld]
|
link line: [ /usr/lib/gcc/x86_64-linux-gnu/8/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccyGHeAT.res --build-id --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -pie -o cmTC_f2925 -e kernel_main -z noexecstack -L/usr/lib/gcc/x86_64-linux-gnu/8/32 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32 -L/lib/i386-linux-gnu -L/lib/../lib32 -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../.. -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu CMakeFiles/cmTC_f2925.dir/CMakeCXXCompilerABI.cpp.o -T /home/gbowne1/Documents/ClassicOS/linker.ld]
|
||||||
arg [/usr/lib/gcc/x86_64-linux-gnu/8/collect2] ==> ignore
|
arg [/usr/lib/gcc/x86_64-linux-gnu/8/collect2] ==> ignore
|
||||||
arg [-plugin] ==> ignore
|
arg [-plugin] ==> ignore
|
||||||
arg [/usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so] ==> ignore
|
arg [/usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so] ==> ignore
|
||||||
arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper] ==> ignore
|
arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper] ==> ignore
|
||||||
arg [-plugin-opt=-fresolution=/tmp/ccCahleH.res] ==> ignore
|
arg [-plugin-opt=-fresolution=/tmp/ccyGHeAT.res] ==> ignore
|
||||||
arg [--build-id] ==> ignore
|
arg [--build-id] ==> ignore
|
||||||
arg [--eh-frame-hdr] ==> ignore
|
arg [--eh-frame-hdr] ==> ignore
|
||||||
arg [-m] ==> ignore
|
arg [-m] ==> ignore
|
||||||
@ -298,12 +294,11 @@ Parsed CXX implicit link information from above output:
|
|||||||
arg [/lib/ld-linux.so.2] ==> ignore
|
arg [/lib/ld-linux.so.2] ==> ignore
|
||||||
arg [-pie] ==> ignore
|
arg [-pie] ==> ignore
|
||||||
arg [-o] ==> ignore
|
arg [-o] ==> ignore
|
||||||
arg [cmTC_8ccc6] ==> ignore
|
arg [cmTC_f2925] ==> ignore
|
||||||
arg [-e] ==> ignore
|
arg [-e] ==> ignore
|
||||||
arg [kernel_main] ==> ignore
|
arg [kernel_main] ==> ignore
|
||||||
arg [-znoexecstack] ==> ignore
|
arg [-znoexecstack] ==> ignore
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/32] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/32]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/32] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/32]
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32]
|
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu]
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32]
|
||||||
arg [-L/lib/i386-linux-gnu] ==> dir [/lib/i386-linux-gnu]
|
arg [-L/lib/i386-linux-gnu] ==> dir [/lib/i386-linux-gnu]
|
||||||
@ -311,16 +306,14 @@ Parsed CXX implicit link information from above output:
|
|||||||
arg [-L/usr/lib/i386-linux-gnu] ==> dir [/usr/lib/i386-linux-gnu]
|
arg [-L/usr/lib/i386-linux-gnu] ==> dir [/usr/lib/i386-linux-gnu]
|
||||||
arg [-L/usr/lib/../lib32] ==> dir [/usr/lib/../lib32]
|
arg [-L/usr/lib/../lib32] ==> dir [/usr/lib/../lib32]
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8]
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib]
|
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu]
|
||||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../..]
|
arg [-L/usr/lib/gcc/x86_64-linux-gnu/8/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../..]
|
||||||
arg [-L/lib/i386-linux-gnu] ==> dir [/lib/i386-linux-gnu]
|
arg [-L/lib/i386-linux-gnu] ==> dir [/lib/i386-linux-gnu]
|
||||||
arg [-L/usr/lib/i386-linux-gnu] ==> dir [/usr/lib/i386-linux-gnu]
|
arg [-L/usr/lib/i386-linux-gnu] ==> dir [/usr/lib/i386-linux-gnu]
|
||||||
arg [CMakeFiles/cmTC_8ccc6.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
|
arg [CMakeFiles/cmTC_f2925.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
|
||||||
arg [-T] ==> ignore
|
arg [-T] ==> ignore
|
||||||
arg [/home/gbowne1/Documents/ClassicOS/linker.ld] ==> ignore
|
arg [/home/gbowne1/Documents/ClassicOS/linker.ld] ==> ignore
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/32] ==> [/usr/lib/gcc/x86_64-linux-gnu/8/32]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/32] ==> [/usr/lib/gcc/x86_64-linux-gnu/8/32]
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib32] ==> [/usr/x86_64-linux-gnu/lib32]
|
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32] ==> [/usr/lib32]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib32] ==> [/usr/lib32]
|
||||||
collapse library dir [/lib/i386-linux-gnu] ==> [/lib/i386-linux-gnu]
|
collapse library dir [/lib/i386-linux-gnu] ==> [/lib/i386-linux-gnu]
|
||||||
@ -328,13 +321,12 @@ Parsed CXX implicit link information from above output:
|
|||||||
collapse library dir [/usr/lib/i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
collapse library dir [/usr/lib/i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
||||||
collapse library dir [/usr/lib/../lib32] ==> [/usr/lib32]
|
collapse library dir [/usr/lib/../lib32] ==> [/usr/lib32]
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8] ==> [/usr/lib/gcc/x86_64-linux-gnu/8]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8] ==> [/usr/lib/gcc/x86_64-linux-gnu/8]
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib] ==> [/usr/x86_64-linux-gnu/lib]
|
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../../i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
||||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../..] ==> [/usr/lib]
|
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/8/../../..] ==> [/usr/lib]
|
||||||
collapse library dir [/lib/i386-linux-gnu] ==> [/lib/i386-linux-gnu]
|
collapse library dir [/lib/i386-linux-gnu] ==> [/lib/i386-linux-gnu]
|
||||||
collapse library dir [/usr/lib/i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
collapse library dir [/usr/lib/i386-linux-gnu] ==> [/usr/lib/i386-linux-gnu]
|
||||||
implicit libs: []
|
implicit libs: []
|
||||||
implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/8/32;/usr/x86_64-linux-gnu/lib32;/usr/lib/i386-linux-gnu;/usr/lib32;/lib/i386-linux-gnu;/lib32;/usr/lib/gcc/x86_64-linux-gnu/8;/usr/x86_64-linux-gnu/lib;/usr/lib]
|
implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/8/32;/usr/lib/i386-linux-gnu;/usr/lib32;/lib/i386-linux-gnu;/lib32;/usr/lib/gcc/x86_64-linux-gnu/8;/usr/lib]
|
||||||
implicit fwks: []
|
implicit fwks: []
|
||||||
|
|
||||||
|
|
||||||
@ -343,14 +335,14 @@ Parsed CXX implicit link information from above output:
|
|||||||
Detecting CXX [-std=c++2a] compiler features compiled with the following output:
|
Detecting CXX [-std=c++2a] compiler features compiled with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_c3946/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_1ddb5/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_c3946.dir/build.make CMakeFiles/cmTC_c3946.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_1ddb5.dir/build.make CMakeFiles/cmTC_1ddb5.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building CXX object CMakeFiles/cmTC_c3946.dir/feature_tests.cxx.o
|
Building CXX object CMakeFiles/cmTC_1ddb5.dir/feature_tests.cxx.o
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=c++2a -std=gnu++11 -o CMakeFiles/cmTC_c3946.dir/feature_tests.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.cxx
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=c++2a -std=gnu++11 -o CMakeFiles/cmTC_1ddb5.dir/feature_tests.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.cxx
|
||||||
Linking CXX executable cmTC_c3946
|
Linking CXX executable cmTC_1ddb5
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c3946.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1ddb5.dir/link.txt --verbose=1
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_c3946.dir/feature_tests.cxx.o -o cmTC_c3946
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_1ddb5.dir/feature_tests.cxx.o -o cmTC_1ddb5
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
@ -417,14 +409,14 @@ make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/C
|
|||||||
Detecting CXX [-std=c++17] compiler features compiled with the following output:
|
Detecting CXX [-std=c++17] compiler features compiled with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_3ec97/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_c33b8/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_3ec97.dir/build.make CMakeFiles/cmTC_3ec97.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_c33b8.dir/build.make CMakeFiles/cmTC_c33b8.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building CXX object CMakeFiles/cmTC_3ec97.dir/feature_tests.cxx.o
|
Building CXX object CMakeFiles/cmTC_c33b8.dir/feature_tests.cxx.o
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=c++17 -std=gnu++11 -o CMakeFiles/cmTC_3ec97.dir/feature_tests.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.cxx
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=c++17 -std=gnu++11 -o CMakeFiles/cmTC_c33b8.dir/feature_tests.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.cxx
|
||||||
Linking CXX executable cmTC_3ec97
|
Linking CXX executable cmTC_c33b8
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3ec97.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c33b8.dir/link.txt --verbose=1
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_3ec97.dir/feature_tests.cxx.o -o cmTC_3ec97
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_c33b8.dir/feature_tests.cxx.o -o cmTC_c33b8
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
@ -491,14 +483,14 @@ make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/C
|
|||||||
Detecting CXX [-std=c++14] compiler features compiled with the following output:
|
Detecting CXX [-std=c++14] compiler features compiled with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_3c0b3/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_ec388/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_3c0b3.dir/build.make CMakeFiles/cmTC_3c0b3.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_ec388.dir/build.make CMakeFiles/cmTC_ec388.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building CXX object CMakeFiles/cmTC_3c0b3.dir/feature_tests.cxx.o
|
Building CXX object CMakeFiles/cmTC_ec388.dir/feature_tests.cxx.o
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=c++14 -std=gnu++11 -o CMakeFiles/cmTC_3c0b3.dir/feature_tests.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.cxx
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=c++14 -std=gnu++11 -o CMakeFiles/cmTC_ec388.dir/feature_tests.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.cxx
|
||||||
Linking CXX executable cmTC_3c0b3
|
Linking CXX executable cmTC_ec388
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3c0b3.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ec388.dir/link.txt --verbose=1
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_3c0b3.dir/feature_tests.cxx.o -o cmTC_3c0b3
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_ec388.dir/feature_tests.cxx.o -o cmTC_ec388
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
@ -565,14 +557,14 @@ make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/C
|
|||||||
Detecting CXX [-std=c++11] compiler features compiled with the following output:
|
Detecting CXX [-std=c++11] compiler features compiled with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_b477f/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_50cb0/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_b477f.dir/build.make CMakeFiles/cmTC_b477f.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_50cb0.dir/build.make CMakeFiles/cmTC_50cb0.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building CXX object CMakeFiles/cmTC_b477f.dir/feature_tests.cxx.o
|
Building CXX object CMakeFiles/cmTC_50cb0.dir/feature_tests.cxx.o
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=c++11 -std=gnu++11 -o CMakeFiles/cmTC_b477f.dir/feature_tests.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.cxx
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=c++11 -std=gnu++11 -o CMakeFiles/cmTC_50cb0.dir/feature_tests.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.cxx
|
||||||
Linking CXX executable cmTC_b477f
|
Linking CXX executable cmTC_50cb0
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b477f.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_50cb0.dir/link.txt --verbose=1
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_b477f.dir/feature_tests.cxx.o -o cmTC_b477f
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_50cb0.dir/feature_tests.cxx.o -o cmTC_50cb0
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
@ -639,14 +631,14 @@ make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/C
|
|||||||
Detecting CXX [-std=c++98] compiler features compiled with the following output:
|
Detecting CXX [-std=c++98] compiler features compiled with the following output:
|
||||||
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
Change Dir: /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
Run Build Command:"/usr/bin/make" "cmTC_35b7b/fast"
|
Run Build Command:"/usr/bin/make" "cmTC_00553/fast"
|
||||||
/usr/bin/make -f CMakeFiles/cmTC_35b7b.dir/build.make CMakeFiles/cmTC_35b7b.dir/build
|
/usr/bin/make -f CMakeFiles/cmTC_00553.dir/build.make CMakeFiles/cmTC_00553.dir/build
|
||||||
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Entering directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
Building CXX object CMakeFiles/cmTC_35b7b.dir/feature_tests.cxx.o
|
Building CXX object CMakeFiles/cmTC_00553.dir/feature_tests.cxx.o
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=c++98 -std=gnu++11 -o CMakeFiles/cmTC_35b7b.dir/feature_tests.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.cxx
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -std=c++98 -std=gnu++11 -o CMakeFiles/cmTC_00553.dir/feature_tests.cxx.o -c /home/gbowne1/Documents/ClassicOS/build/CMakeFiles/feature_tests.cxx
|
||||||
Linking CXX executable cmTC_35b7b
|
Linking CXX executable cmTC_00553
|
||||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_35b7b.dir/link.txt --verbose=1
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_00553.dir/link.txt --verbose=1
|
||||||
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_35b7b.dir/feature_tests.cxx.o -o cmTC_35b7b
|
/usr/bin/g++ -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/cmTC_00553.dir/feature_tests.cxx.o -o cmTC_00553
|
||||||
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
/usr/bin/ld: warning: cannot find entry symbol kernel_main; defaulting to 0000000000100000
|
||||||
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
make[1]: Leaving directory '/home/gbowne1/Documents/ClassicOS/build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
|
@ -6,28 +6,222 @@
|
|||||||
|
|
||||||
#IncludeRegexTransform:
|
#IncludeRegexTransform:
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/gdt.h
|
/home/gbowne1/Documents/ClassicOS/src/drivers/audio/audio.c
|
||||||
|
audio.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/audio/audio.h
|
||||||
stdbool.h
|
stdbool.h
|
||||||
-
|
-
|
||||||
stdint.h
|
|
||||||
-
|
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/idt.h
|
|
||||||
include/types.h
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/include/types.h
|
|
||||||
stdbool.h
|
|
||||||
-
|
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/include/memory.h
|
|
||||||
stddef.h
|
stddef.h
|
||||||
-
|
-
|
||||||
stdint.h
|
stdint.h
|
||||||
-
|
-
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/include/types.h
|
/home/gbowne1/Documents/ClassicOS/src/drivers/audio/audio.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
stdint.h
|
stdint.h
|
||||||
-
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/eisa.c
|
||||||
|
eisa.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/eisa.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
stdio.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/eisa.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
stdio.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/isa.c
|
||||||
|
isa.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/isa.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/isa.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/mca.c
|
||||||
|
mca.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/mca.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/mca.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/pci.c
|
||||||
|
pci.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/pci.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/pci.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/vesa.c
|
||||||
|
vesa.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/vesa.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/bus/vesa.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/display/display.c
|
||||||
|
display.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/display/display.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/display/display.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/io/io.c
|
||||||
|
io.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/io/io.h
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/io/io.h
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/keyboard/keyboard.c
|
||||||
|
keyboard.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/keyboard/keyboard.h
|
||||||
|
../io/io.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/io/io.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/keyboard/keyboard.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/screen/screen.c
|
||||||
|
screen.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/screen/screen.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
stdio.h
|
||||||
|
-
|
||||||
|
stdlib.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/screen/screen.h
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
stdio.h
|
||||||
|
-
|
||||||
|
stdlib.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/tty/./tty.h
|
||||||
|
stdio.h
|
||||||
|
-
|
||||||
|
stdlib.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/tty/tty.c
|
||||||
|
stdbool.h
|
||||||
|
-
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
|
-
|
||||||
|
stdio.h
|
||||||
|
-
|
||||||
|
stdlib.h
|
||||||
|
-
|
||||||
|
../display/display.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/display/display.h
|
||||||
|
../io/io.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/io/io.h
|
||||||
|
../keyboard/keyboard.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/keyboard/keyboard.h
|
||||||
|
../screen/screen.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/screen/screen.h
|
||||||
|
./tty.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/tty/./tty.h
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/gdt.c
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/gdt.c
|
||||||
gdt.h
|
gdt.h
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/gdt.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/gdt.h
|
||||||
@ -53,60 +247,68 @@ sys/cdefs.h
|
|||||||
-
|
-
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/gdt.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/gdt.h
|
||||||
stdbool.h
|
|
||||||
-
|
|
||||||
stdint.h
|
stdint.h
|
||||||
-
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/idt.c
|
||||||
|
idt.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/idt.h
|
||||||
|
isr/isr.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/isr/isr.h
|
||||||
|
../../../drivers/keyboard/keyboard.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/drivers/keyboard/keyboard.h
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/idt.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/idt.h
|
||||||
include/types.h
|
include/types.h
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/include/types.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/include/types.h
|
||||||
stdbool.h
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/include/memory.h
|
||||||
|
stddef.h
|
||||||
|
-
|
||||||
|
stdint.h
|
||||||
-
|
-
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/include/types.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/include/types.h
|
||||||
stdint.h
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/isr/exceptions.c
|
||||||
|
exceptions.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/isr/exceptions.h
|
||||||
|
stdio.h
|
||||||
-
|
-
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/isr/exceptions.h
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/isr/isr.c
|
||||||
|
isr.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/isr/isr.h
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/isr/isr.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/isr/isr.h
|
||||||
../include/types.h
|
../include/types.h
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/include/types.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/include/types.h
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.c
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/memory/memory.c
|
||||||
kernel.h
|
../include/memory.h
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/include/memory.h
|
||||||
../kernel/malloc/kmalloc.h
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/malloc/kmalloc.h
|
|
||||||
../kernel/malloc/malloc.h
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/malloc/malloc.h
|
|
||||||
./arch/x86/gdt.h
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/gdt.h
|
|
||||||
./arch/x86/idt.h
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/idt.h
|
|
||||||
./arch/x86/include/memory.h
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/include/memory.h
|
|
||||||
stdbool.h
|
|
||||||
-
|
|
||||||
stddef.h
|
stddef.h
|
||||||
-
|
-
|
||||||
stdint.h
|
|
||||||
-
|
|
||||||
stdio.h
|
|
||||||
-
|
|
||||||
string.h
|
string.h
|
||||||
-
|
-
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.c
|
||||||
kernel.h
|
kernel.h
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.h
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/malloc/kmalloc.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.h
|
||||||
stdint.h
|
|
||||||
-
|
/home/gbowne1/Documents/ClassicOS/src/kernel/print.c
|
||||||
stddef.h
|
kernel.h
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.h
|
||||||
|
stdio.h
|
||||||
-
|
-
|
||||||
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/malloc/malloc.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/stack.c
|
||||||
stddef.h
|
stack.h
|
||||||
-
|
/home/gbowne1/Documents/ClassicOS/src/kernel/stack.h
|
||||||
|
|
||||||
|
/home/gbowne1/Documents/ClassicOS/src/kernel/stack.h
|
||||||
|
|
||||||
|
@ -62,14 +62,8 @@ CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/memory/memory.c.o
|
|||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/include/memory.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/include/memory.h
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/memory/memory.c
|
/home/gbowne1/Documents/ClassicOS/src/kernel/arch/x86/memory/memory.c
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o
|
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/gdt.h
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/idt.h
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/include/memory.h
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/./arch/x86/include/types.h
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.c
|
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.c
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.h
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/malloc/kmalloc.h
|
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/malloc/malloc.h
|
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/print.c.o
|
CMakeFiles/ClassicOS.dir/src/kernel/print.c.o
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.h
|
/home/gbowne1/Documents/ClassicOS/src/kernel/kernel.h
|
||||||
/home/gbowne1/Documents/ClassicOS/src/kernel/print.c
|
/home/gbowne1/Documents/ClassicOS/src/kernel/print.c
|
||||||
|
@ -61,14 +61,8 @@ CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/isr/isr.c.o: ../src/kernel/arch/x86
|
|||||||
CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/memory/memory.c.o: ../src/kernel/arch/x86/include/memory.h
|
CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/memory/memory.c.o: ../src/kernel/arch/x86/include/memory.h
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/memory/memory.c.o: ../src/kernel/arch/x86/memory/memory.c
|
CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/memory/memory.c.o: ../src/kernel/arch/x86/memory/memory.c
|
||||||
|
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o: ../src/kernel/./arch/x86/gdt.h
|
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o: ../src/kernel/./arch/x86/idt.h
|
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o: ../src/kernel/./arch/x86/include/memory.h
|
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o: ../src/kernel/./arch/x86/include/types.h
|
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o: ../src/kernel/kernel.c
|
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o: ../src/kernel/kernel.c
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o: ../src/kernel/kernel.h
|
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o: ../src/kernel/kernel.h
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o: ../src/kernel/malloc/kmalloc.h
|
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o: ../src/kernel/malloc/malloc.h
|
|
||||||
|
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/print.c.o: ../src/kernel/kernel.h
|
CMakeFiles/ClassicOS.dir/src/kernel/print.c.o: ../src/kernel/kernel.h
|
||||||
CMakeFiles/ClassicOS.dir/src/kernel/print.c.o: ../src/kernel/print.c
|
CMakeFiles/ClassicOS.dir/src/kernel/print.c.o: ../src/kernel/print.c
|
||||||
|
@ -9,7 +9,7 @@ ASM_NASM_DEFINES =
|
|||||||
|
|
||||||
ASM_NASM_INCLUDES =
|
ASM_NASM_INCLUDES =
|
||||||
|
|
||||||
C_FLAGS = -m32 -ffreestanding -nostdlib -std=gnu11
|
C_FLAGS = -m32 -ffreestanding -nostdlib -g -std=gnu11
|
||||||
|
|
||||||
C_DEFINES =
|
C_DEFINES =
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
/usr/bin/gcc -m32 -ffreestanding -nostdlib -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/memory/memory.c.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/gdt.c.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/gdt.asm.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/idt.c.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/idt.asm.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/isr/isr.c.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/isr/exceptions.c.o CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o CMakeFiles/ClassicOS.dir/src/kernel/print.c.o CMakeFiles/ClassicOS.dir/src/kernel/stack.c.o CMakeFiles/ClassicOS.dir/src/drivers/audio/audio.c.o CMakeFiles/ClassicOS.dir/src/drivers/bus/eisa.c.o CMakeFiles/ClassicOS.dir/src/drivers/bus/isa.c.o CMakeFiles/ClassicOS.dir/src/drivers/bus/mca.c.o CMakeFiles/ClassicOS.dir/src/drivers/bus/pci.c.o CMakeFiles/ClassicOS.dir/src/drivers/bus/vesa.c.o CMakeFiles/ClassicOS.dir/src/drivers/display/display.c.o CMakeFiles/ClassicOS.dir/src/drivers/io/io.c.o CMakeFiles/ClassicOS.dir/src/drivers/io/io.asm.o CMakeFiles/ClassicOS.dir/src/drivers/keyboard/keyboard.c.o CMakeFiles/ClassicOS.dir/src/drivers/screen/screen.c.o CMakeFiles/ClassicOS.dir/src/drivers/tty/tty.c.o -o ClassicOS
|
/usr/bin/gcc -m32 -ffreestanding -nostdlib -g -e kernel_main -T/home/gbowne1/Documents/ClassicOS/linker.ld -m32 -z noexecstack CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/memory/memory.c.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/gdt.c.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/gdt.asm.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/idt.c.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/idt.asm.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/isr/isr.c.o CMakeFiles/ClassicOS.dir/src/kernel/arch/x86/isr/exceptions.c.o CMakeFiles/ClassicOS.dir/src/kernel/kernel.c.o CMakeFiles/ClassicOS.dir/src/kernel/print.c.o CMakeFiles/ClassicOS.dir/src/kernel/stack.c.o CMakeFiles/ClassicOS.dir/src/drivers/audio/audio.c.o CMakeFiles/ClassicOS.dir/src/drivers/bus/eisa.c.o CMakeFiles/ClassicOS.dir/src/drivers/bus/isa.c.o CMakeFiles/ClassicOS.dir/src/drivers/bus/mca.c.o CMakeFiles/ClassicOS.dir/src/drivers/bus/pci.c.o CMakeFiles/ClassicOS.dir/src/drivers/bus/vesa.c.o CMakeFiles/ClassicOS.dir/src/drivers/display/display.c.o CMakeFiles/ClassicOS.dir/src/drivers/io/io.c.o CMakeFiles/ClassicOS.dir/src/drivers/io/io.asm.o CMakeFiles/ClassicOS.dir/src/drivers/keyboard/keyboard.c.o CMakeFiles/ClassicOS.dir/src/drivers/screen/screen.c.o CMakeFiles/ClassicOS.dir/src/drivers/tty/tty.c.o -o ClassicOS
|
||||||
|
3
build/CMakeFiles/ClassicOSBL.dir/depend.internal
Normal file
3
build/CMakeFiles/ClassicOSBL.dir/depend.internal
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# CMAKE generated file: DO NOT EDIT!
|
||||||
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.13
|
||||||
|
|
@ -1,2 +1,3 @@
|
|||||||
# Empty dependencies file for ClassicOSBL.
|
# CMAKE generated file: DO NOT EDIT!
|
||||||
# This may be replaced when dependencies are built.
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.13
|
||||||
|
|
||||||
|
@ -12,93 +12,21 @@ set(CMAKE_MAKEFILE_DEPENDS
|
|||||||
"CMakeFiles/3.13.4/CMakeCCompiler.cmake"
|
"CMakeFiles/3.13.4/CMakeCCompiler.cmake"
|
||||||
"CMakeFiles/3.13.4/CMakeCXXCompiler.cmake"
|
"CMakeFiles/3.13.4/CMakeCXXCompiler.cmake"
|
||||||
"CMakeFiles/3.13.4/CMakeSystem.cmake"
|
"CMakeFiles/3.13.4/CMakeSystem.cmake"
|
||||||
"CMakeFiles/feature_tests.c"
|
|
||||||
"CMakeFiles/feature_tests.cxx"
|
|
||||||
"../x86-baremetal-toolchain.cmake"
|
"../x86-baremetal-toolchain.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeASMCompiler.cmake.in"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeASMInformation.cmake"
|
"/usr/share/cmake-3.13/Modules/CMakeASMInformation.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeASM_NASMInformation.cmake"
|
"/usr/share/cmake-3.13/Modules/CMakeASM_NASMInformation.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeCCompiler.cmake.in"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeCCompilerABI.c"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeCInformation.cmake"
|
"/usr/share/cmake-3.13/Modules/CMakeCInformation.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeCXXCompiler.cmake.in"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeCXXCompilerABI.cpp"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeCXXInformation.cmake"
|
"/usr/share/cmake-3.13/Modules/CMakeCXXInformation.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeCommonLanguageInclude.cmake"
|
"/usr/share/cmake-3.13/Modules/CMakeCommonLanguageInclude.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeCompilerIdDetection.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeDetermineASMCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeDetermineASM_NASMCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeDetermineCompileFeatures.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeDetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeDetermineCompilerABI.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeDetermineSystem.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeFindBinUtils.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeGenericSystem.cmake"
|
"/usr/share/cmake-3.13/Modules/CMakeGenericSystem.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeInitializeConfigs.cmake"
|
"/usr/share/cmake-3.13/Modules/CMakeInitializeConfigs.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeLanguageInformation.cmake"
|
"/usr/share/cmake-3.13/Modules/CMakeLanguageInformation.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeParseImplicitLinkInfo.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeSystem.cmake.in"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeSystemSpecificInformation.cmake"
|
"/usr/share/cmake-3.13/Modules/CMakeSystemSpecificInformation.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeSystemSpecificInitialize.cmake"
|
"/usr/share/cmake-3.13/Modules/CMakeSystemSpecificInitialize.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeTestASMCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeTestASM_NASMCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeTestCXXCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeTestCompilerCommon.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/CMakeUnixFindMake.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/ADSP-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Borland-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Bruce-C-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
|
"/usr/share/cmake-3.13/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Clang-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Cray-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/GHS-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/GNU-C-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/GNU-C-FeatureTests.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/GNU-C.cmake"
|
"/usr/share/cmake-3.13/Modules/Compiler/GNU-C.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/GNU-CXX-FeatureTests.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/GNU-CXX.cmake"
|
"/usr/share/cmake-3.13/Modules/Compiler/GNU-CXX.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/GNU-FindBinUtils.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/GNU.cmake"
|
"/usr/share/cmake-3.13/Modules/Compiler/GNU.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/HP-C-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/HP-CXX-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/IAR-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Intel-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/MIPSpro-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/MSVC-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/PGI-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/PathScale-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/SCO-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/TI-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/Watcom-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/XL-C-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/XL-CXX-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Internal/FeatureTesting.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Platform/Linux-Determine-CXX.cmake"
|
|
||||||
"/usr/share/cmake-3.13/Modules/Platform/Linux-GNU-C.cmake"
|
"/usr/share/cmake-3.13/Modules/Platform/Linux-GNU-C.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/Platform/Linux-GNU-CXX.cmake"
|
"/usr/share/cmake-3.13/Modules/Platform/Linux-GNU-CXX.cmake"
|
||||||
"/usr/share/cmake-3.13/Modules/Platform/Linux-GNU.cmake"
|
"/usr/share/cmake-3.13/Modules/Platform/Linux-GNU.cmake"
|
||||||
@ -114,12 +42,6 @@ set(CMAKE_MAKEFILE_OUTPUTS
|
|||||||
|
|
||||||
# Byproducts of CMake generate step:
|
# Byproducts of CMake generate step:
|
||||||
set(CMAKE_MAKEFILE_PRODUCTS
|
set(CMAKE_MAKEFILE_PRODUCTS
|
||||||
"CMakeFiles/3.13.4/CMakeSystem.cmake"
|
|
||||||
"CMakeFiles/3.13.4/CMakeASM_NASMCompiler.cmake"
|
|
||||||
"CMakeFiles/3.13.4/CMakeCCompiler.cmake"
|
|
||||||
"CMakeFiles/3.13.4/CMakeCXXCompiler.cmake"
|
|
||||||
"CMakeFiles/3.13.4/CMakeCCompiler.cmake"
|
|
||||||
"CMakeFiles/3.13.4/CMakeCXXCompiler.cmake"
|
|
||||||
"CMakeFiles/CMakeDirectoryInformation.cmake"
|
"CMakeFiles/CMakeDirectoryInformation.cmake"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
1
build/CMakeFiles/Progress/1
Normal file
1
build/CMakeFiles/Progress/1
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/10
Normal file
1
build/CMakeFiles/Progress/10
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/11
Normal file
1
build/CMakeFiles/Progress/11
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/12
Normal file
1
build/CMakeFiles/Progress/12
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/13
Normal file
1
build/CMakeFiles/Progress/13
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/14
Normal file
1
build/CMakeFiles/Progress/14
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/15
Normal file
1
build/CMakeFiles/Progress/15
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/16
Normal file
1
build/CMakeFiles/Progress/16
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/17
Normal file
1
build/CMakeFiles/Progress/17
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/18
Normal file
1
build/CMakeFiles/Progress/18
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/19
Normal file
1
build/CMakeFiles/Progress/19
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/2
Normal file
1
build/CMakeFiles/Progress/2
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/20
Normal file
1
build/CMakeFiles/Progress/20
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/21
Normal file
1
build/CMakeFiles/Progress/21
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/22
Normal file
1
build/CMakeFiles/Progress/22
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/23
Normal file
1
build/CMakeFiles/Progress/23
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/24
Normal file
1
build/CMakeFiles/Progress/24
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/4
Normal file
1
build/CMakeFiles/Progress/4
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
1
build/CMakeFiles/Progress/9
Normal file
1
build/CMakeFiles/Progress/9
Normal file
@ -0,0 +1 @@
|
|||||||
|
empty
|
BIN
build/ClassicOS
Executable file
BIN
build/ClassicOS
Executable file
Binary file not shown.
@ -12,7 +12,7 @@ if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
|||||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||||
else()
|
else()
|
||||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
set(CMAKE_INSTALL_CONFIG_NAME "Debug")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||||
endif()
|
endif()
|
||||||
|
@ -21,45 +21,43 @@ start:
|
|||||||
EnableA20Gate:
|
EnableA20Gate:
|
||||||
call TestA20
|
call TestA20
|
||||||
cmp ax, 1
|
cmp ax, 1
|
||||||
jne A20Disabled
|
je A20Enabled
|
||||||
|
|
||||||
; A20 is already enabled, skip further checks
|
|
||||||
jmp A20Enabled
|
|
||||||
|
|
||||||
tryUsingBIOS:
|
tryUsingBIOS:
|
||||||
mov ax, 0x2401
|
mov ax, 0x2401
|
||||||
int 0x15
|
int 0x15
|
||||||
call TestA20
|
call TestA20
|
||||||
cmp ax, 1
|
cmp ax, 1
|
||||||
jne A20Disabled
|
je A20Enabled
|
||||||
|
|
||||||
tryUsingKeyboardController:
|
tryUsingKeyboardController:
|
||||||
cli
|
cli
|
||||||
call WaitCommand
|
call WaitCommand
|
||||||
mov al, 0xAD
|
mov al, 0xAD ;Disable the keyboard
|
||||||
out 0x64, al
|
out 0x64, al
|
||||||
|
|
||||||
call WaitCommand
|
call WaitCommand
|
||||||
mov al, 0xD0
|
mov al, 0xD0 ;Read from input
|
||||||
out 0x64, al
|
out 0x64, al
|
||||||
|
|
||||||
call WaitData
|
call WaitData
|
||||||
in al, 0x60
|
in al, 0x60 ;Read input from keyboard
|
||||||
push ax
|
push ax ;Save it
|
||||||
|
|
||||||
call WaitCommand
|
call WaitCommand
|
||||||
mov al, 0xD1
|
mov al, 0xD1 ;Write to output
|
||||||
out 0x64, al
|
out 0x64, al
|
||||||
|
|
||||||
call WaitCommand
|
call WaitCommand
|
||||||
pop ax
|
pop ax ;Write to input back with bit #2 set
|
||||||
or al, 2
|
or al, 2
|
||||||
out 0x60, al
|
out 0x60, al
|
||||||
|
|
||||||
call WaitCommand
|
call WaitCommand
|
||||||
mov al, 0xAE
|
mov al, 0xAE ;Enable Keyboard
|
||||||
out 0x64, al
|
out 0x64, al
|
||||||
|
|
||||||
|
call WaitCommand
|
||||||
sti
|
sti
|
||||||
jmp A20KeyboardCheck
|
jmp A20KeyboardCheck
|
||||||
|
|
||||||
@ -78,7 +76,7 @@ WaitData:
|
|||||||
A20KeyboardCheck:
|
A20KeyboardCheck:
|
||||||
call TestA20
|
call TestA20
|
||||||
cmp ax, 1
|
cmp ax, 1
|
||||||
jne A20Disabled
|
je A20Enabled
|
||||||
|
|
||||||
UseFastA20Method:
|
UseFastA20Method:
|
||||||
in al, 0x92
|
in al, 0x92
|
||||||
@ -86,7 +84,7 @@ UseFastA20Method:
|
|||||||
out 0x92, al
|
out 0x92, al
|
||||||
call TestA20
|
call TestA20
|
||||||
cmp ax, 1
|
cmp ax, 1
|
||||||
jne A20Disabled
|
je A20Enabled
|
||||||
|
|
||||||
;Else bail out, A20 cannot be enabled, maybe :)
|
;Else bail out, A20 cannot be enabled, maybe :)
|
||||||
A20Error:
|
A20Error:
|
||||||
@ -98,34 +96,26 @@ A20Error:
|
|||||||
int 19h
|
int 19h
|
||||||
|
|
||||||
jmp $
|
jmp $
|
||||||
|
|
||||||
A20Disabled:
|
|
||||||
jmp A20Error
|
|
||||||
;If we ever get here, A20 is enabled!
|
;If we ever get here, A20 is enabled!
|
||||||
A20Enabled:
|
A20Enabled:
|
||||||
|
|
||||||
LoadSecondStage:
|
LoadSecondStage:
|
||||||
push es
|
push es
|
||||||
mov ax, 0x7E0
|
mov ax, 0x7e0
|
||||||
mov es, ax
|
mov es, ax
|
||||||
|
|
||||||
stc
|
stc
|
||||||
mov dh, 0
|
mov dh, 0
|
||||||
mov ah, 0x02
|
mov ah, 0x02
|
||||||
mov al, 2
|
mov al, 2 ;load 2 sectors
|
||||||
mov ch, 0
|
mov ch, 0
|
||||||
mov cl, 2
|
mov cl, 2
|
||||||
|
|
||||||
mov dl, [bootdev]
|
mov dl, [bootdev]
|
||||||
|
|
||||||
xor bx, bx
|
xor bx, bx ; [es:bx] = 0x07e0:0x0000
|
||||||
int 13h
|
int 13h
|
||||||
|
|
||||||
jc disk_error
|
jnc load_success
|
||||||
|
|
||||||
pop es
|
|
||||||
mov dl, [bootdev]
|
|
||||||
jmp 0x7E0:0x0000
|
|
||||||
|
|
||||||
disk_error:
|
disk_error:
|
||||||
mov si, disk_read_error_msg
|
mov si, disk_read_error_msg
|
||||||
@ -216,8 +206,8 @@ A20Exit:
|
|||||||
;;;;;;End of function;;;;;;;;;;;;
|
;;;;;;End of function;;;;;;;;;;;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
disk_read_error_msg db 'Disk read error. Boot failed.', 0
|
disk_read_error_msg db 'Error Reading disk. Press any key to reboot. Code : 0x01', 0
|
||||||
A20_error_msg db 'Failed to enable A20 line. Boot aborted.', 0
|
A20_error_msg db 'An Internal error occured. Press any key to reboot. Code: 0x02', 0
|
||||||
bootdev db 0
|
bootdev db 0
|
||||||
|
|
||||||
times 442 - ($-$$) db 0
|
times 442 - ($-$$) db 0
|
||||||
|
BIN
src/cpu/cpu
BIN
src/cpu/cpu
Binary file not shown.
109
src/cpu/cpu.c
109
src/cpu/cpu.c
@ -1,46 +1,83 @@
|
|||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
// Existing functions
|
// Function to read a 32-bit value from a CPU register
|
||||||
uint32_t read_register(uint8_t reg) { /*...*/ }
|
uint32_t read_register(uint8_t reg) {
|
||||||
void write_register(uint8_t reg, uint32_t value) { /*...*/ }
|
uint32_t value;
|
||||||
void switch_to_protected_mode() { /*...*/ }
|
__asm__ volatile("mov %0, %%" : "+r"(value) : "c"(reg));
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
// Integrated cpuid function
|
// Function to write a 32-bit value to a CPU register
|
||||||
/*void cpuid(uint32_t function, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
|
void write_register(uint8_t reg, uint32_t value) {
|
||||||
|
__asm__ volatile("mov %0, %%" : : "c"(reg), "r"(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to read the value of the CR0 register
|
||||||
|
uint32_t read_cr0()
|
||||||
{
|
{
|
||||||
asm volatile(
|
uint32_t value;
|
||||||
"cpuid"
|
__asm__ volatile("mov %%cr0, %0" : "=r"(value));
|
||||||
: "=a"(*eax),
|
return value;
|
||||||
"=b"(*ebx),
|
|
||||||
"=c"(*ecx),
|
|
||||||
"=d"(*edx)
|
|
||||||
: "a"(function));
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// Optionally, integrate identify_cpu function
|
// Function to write a value to the CR0 register
|
||||||
void identify_cpu()
|
void write_cr0(uint32_t value)
|
||||||
{
|
{
|
||||||
uint32_t max_leaf;
|
__asm__ volatile("mov %0, %%cr0" : : "r"(value));
|
||||||
uint32_t vendor_id[4];
|
|
||||||
uint32_t eax, ebx, ecx, edx;
|
|
||||||
|
|
||||||
cpuid(0, &eax, &ebx, &ecx, &edx);
|
|
||||||
max_leaf = eax;
|
|
||||||
|
|
||||||
cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
|
|
||||||
vendor_id[0] = eax;
|
|
||||||
vendor_id[1] = ebx;
|
|
||||||
vendor_id[2] = ecx;
|
|
||||||
vendor_id[3] = edx;
|
|
||||||
|
|
||||||
printf("Vendor ID: %.4s%.4s\n", (char *)&vendor_id[0], (char *)&vendor_id[1]);
|
|
||||||
printf("Maximum leaf value: %u\n", max_leaf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
// Function to switch from real mode to protected mode
|
||||||
identify_cpu();
|
void switch_to_protected_mode()
|
||||||
return 0;
|
{
|
||||||
|
uint32_t cr0 = read_cr0();
|
||||||
|
cr0 |= 0x1; // Set the PE bit to switch to protected mode
|
||||||
|
write_cr0(cr0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write a byte to a port
|
||||||
|
void outb(uint16_t port, uint8_t value)
|
||||||
|
{
|
||||||
|
__asm__ volatile ("outb %0, %1" : : "a"(value), "Nd"(port));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read a byte from a port
|
||||||
|
uint8_t inb(uint16_t port)
|
||||||
|
{
|
||||||
|
uint8_t value;
|
||||||
|
__asm__ volatile ("inb %1, %0" : "=a"(value) : "Nd"(port));
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write a word to a port
|
||||||
|
void outw(uint16_t port, uint16_t value)
|
||||||
|
{
|
||||||
|
__asm__ volatile ("outw %0, %1" : : "a"(value), "Nd"(port));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read a word from a port
|
||||||
|
uint16_t inw(uint16_t port)
|
||||||
|
{
|
||||||
|
uint16_t value;
|
||||||
|
__asm__ volatile ("inw %1, %0" : "=a"(value) : "Nd"(port));
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write a double word to a port
|
||||||
|
void outl(uint16_t port, uint32_t value)
|
||||||
|
{
|
||||||
|
__asm__ volatile ("outl %0, %1" : : "a"(value), "Nd"(port));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read a double word from a port
|
||||||
|
uint32_t inl(uint16_t port)
|
||||||
|
{
|
||||||
|
uint32_t value;
|
||||||
|
__asm__ volatile ("inl %1, %0" : "=a"(value) : "Nd"(port));
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute the CPUID instruction
|
||||||
|
void cpuid(uint32_t code, uint32_t *a, uint32_t *d)
|
||||||
|
{
|
||||||
|
__asm__ volatile ("cpuid" : "=a"(*a), "=d"(*d) : "a"(code) : "ecx", "ebx");
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,30 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// Existing declarations
|
// Function to read a 32-bit value from a CPU register
|
||||||
uint32_t read_register(uint8_t reg);
|
uint32_t read_register(uint8_t reg);
|
||||||
|
|
||||||
|
// Function to write a 32-bit value to a CPU register
|
||||||
void write_register(uint8_t reg, uint32_t value);
|
void write_register(uint8_t reg, uint32_t value);
|
||||||
|
|
||||||
|
// Function to read the value of the CR0 register
|
||||||
|
uint32_t read_cr0();
|
||||||
|
|
||||||
|
// Function to write a value to the CR0 register
|
||||||
|
void write_cr0(uint32_t value);
|
||||||
|
|
||||||
|
// Function to switch from real mode to protected mode
|
||||||
void switch_to_protected_mode();
|
void switch_to_protected_mode();
|
||||||
|
|
||||||
// New declaration for cpuid
|
void outb(uint16_t port, uint8_t value);
|
||||||
void cpuid(uint32_t function, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx);
|
uint8_t inb(uint16_t port);
|
||||||
|
|
||||||
#endif // CPU_H
|
void outw(uint16_t port, uint16_t value);
|
||||||
|
uint16_t inw(uint16_t port);
|
||||||
|
|
||||||
|
void outl(uint16_t port, uint32_t value);
|
||||||
|
uint32_t inl(uint16_t port);
|
||||||
|
|
||||||
|
void cpuid(uint32_t code, uint32_t *a, uint32_t *d);
|
||||||
|
|
||||||
|
#endif
|
@ -1,14 +0,0 @@
|
|||||||
.global cpuid
|
|
||||||
.type cpuid, @function
|
|
||||||
cpuid:
|
|
||||||
push %rbp
|
|
||||||
mov %rsp, %rbp
|
|
||||||
sub $16, %rsp
|
|
||||||
mov %rdi, %rax
|
|
||||||
cpuid
|
|
||||||
mov %rax, 8(%rbp)
|
|
||||||
mov %rbx, 12(%rbp)
|
|
||||||
mov %rcx, 16(%rbp)
|
|
||||||
mov %rdx, 20(%rbp)
|
|
||||||
leave
|
|
||||||
ret
|
|
32
src/cpu/cpuid.asm
Normal file
32
src/cpu/cpuid.asm
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
[bits 32]
|
||||||
|
|
||||||
|
global cpuid
|
||||||
|
|
||||||
|
cpuid:
|
||||||
|
; Save registers
|
||||||
|
push ebp
|
||||||
|
mov ebp, esp
|
||||||
|
push ebx
|
||||||
|
push edi
|
||||||
|
push esi
|
||||||
|
|
||||||
|
; Input parameter in EAX register
|
||||||
|
mov eax, [ebp + 8] ; Assuming the input is passed on the stack
|
||||||
|
|
||||||
|
; Call CPUID instruction (clobbers EAX, EBX, ECX, EDX)
|
||||||
|
cpuid
|
||||||
|
|
||||||
|
; Move output values to the appropriate registers
|
||||||
|
mov esi, eax ; Output EAX
|
||||||
|
mov edi, ebx ; Output EBX
|
||||||
|
mov ecx, ecx ; Output ECX
|
||||||
|
mov edx, edx ; Output EDX
|
||||||
|
|
||||||
|
; Restore registers and clean up the stack
|
||||||
|
pop esi
|
||||||
|
pop edi
|
||||||
|
pop ebx
|
||||||
|
mov esp, ebp
|
||||||
|
pop ebp
|
||||||
|
|
||||||
|
ret
|
36
src/cpu/cpuid.c
Normal file
36
src/cpu/cpuid.c
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#include "cpuid.h"
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
void cpuid(uint32_t code, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) {
|
||||||
|
asm volatile ("cpuid" : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) : "a" (code));
|
||||||
|
}
|
||||||
|
|
||||||
|
void identify_cpu() {
|
||||||
|
uint32_t max_leaf;
|
||||||
|
uint32_t vendor_id[4];
|
||||||
|
uint32_t eax, ebx, ecx, edx;
|
||||||
|
|
||||||
|
// Get the maximum supported leaf value (CPUID function)
|
||||||
|
cpuid(0, &eax, &ebx, &ecx, &edx);
|
||||||
|
max_leaf = eax;
|
||||||
|
|
||||||
|
// Get the vendor ID string
|
||||||
|
cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
|
||||||
|
vendor_id[0] = eax;
|
||||||
|
vendor_id[1] = ebx;
|
||||||
|
vendor_id[2] = ecx;
|
||||||
|
vendor_id[3] = edx;
|
||||||
|
|
||||||
|
// Print the vendor ID string (assuming ASCII characters)
|
||||||
|
printf("Vendor ID: %.4s%.4s\n", (char *)&vendor_id[0], (char *)&vendor_id[1]);
|
||||||
|
|
||||||
|
// Identify basic features based on CPUID information (optional, needs further logic)
|
||||||
|
// ... (code to check specific CPU features using max_leaf and additional CPUID calls) ...
|
||||||
|
|
||||||
|
printf("Maximum leaf value: %u\n", max_leaf);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
identify_cpu();
|
||||||
|
return 0;
|
||||||
|
}
|
7
src/cpu/cpuid.h
Normal file
7
src/cpu/cpuid.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#ifndef CPUID_H
|
||||||
|
#define CPUID_H
|
||||||
|
|
||||||
|
// Function prototypes for CPUID instruction
|
||||||
|
void cpuid(uint32_t code, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx);
|
||||||
|
|
||||||
|
#endif
|
@ -1,83 +1,32 @@
|
|||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include <time.h>
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
// Audio controller base address
|
// Audio controller base address
|
||||||
#define AUDIO_BASE_ADDRESS 0x0000
|
#define AUDIO_BASE_ADDRESS 0x0000
|
||||||
|
|
||||||
// Audio controller register offsets
|
// Audio controller data port
|
||||||
#define AUDIO_DATA_PORT 0x00
|
#define AUDIO_DATA_PORT 0x00
|
||||||
|
|
||||||
|
// Audio controller command port
|
||||||
#define AUDIO_COMMAND_PORT 0x01
|
#define AUDIO_COMMAND_PORT 0x01
|
||||||
#define AUDIO_STATUS_PORT 0x02
|
|
||||||
#define AUDIO_VOLUME_PORT 0x03
|
|
||||||
|
|
||||||
#define AUDIO_REG(offset) (*((volatile uint32_t *)(AUDIO_BASE_ADDRESS + (offset))))
|
// Initialize the audio driver
|
||||||
#define AUDIO_TIMEOUT_MS 1000
|
void audio_init()
|
||||||
#define AUDIO_READY_BIT 0x01
|
{
|
||||||
|
// Add any necessary initialization code here
|
||||||
static audio_status_t audio_wait_for_ready() {
|
|
||||||
clock_t start = clock();
|
|
||||||
while (!(AUDIO_REG(AUDIO_STATUS_PORT) & AUDIO_READY_BIT)) {
|
|
||||||
if ((clock() - start) * 1000 / CLOCKS_PER_SEC > AUDIO_TIMEOUT_MS) {
|
|
||||||
return AUDIO_ERROR_TIMEOUT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return AUDIO_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
audio_status_t audio_init(const audio_config_t *config) {
|
// Play audio from a buffer
|
||||||
if (config == NULL) {
|
void audio_play(const uint8_t *buffer, size_t size)
|
||||||
return AUDIO_ERROR_INIT;
|
{
|
||||||
|
// Add any necessary code to play audio from the buffer here
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset the audio controller
|
// Stop audio playback
|
||||||
AUDIO_REG(AUDIO_COMMAND_PORT) = 0x12345678; // Placeholder reset command
|
void audio_stop()
|
||||||
|
{
|
||||||
// Set sample rate
|
// Add any necessary code to stop audio playback here
|
||||||
AUDIO_REG(AUDIO_COMMAND_PORT) = config->sample_rate;
|
|
||||||
|
|
||||||
// Set bit depth and channels
|
|
||||||
uint32_t format = (config->bit_depth << 8) | config->channels;
|
|
||||||
AUDIO_REG(AUDIO_COMMAND_PORT) = format;
|
|
||||||
|
|
||||||
// Enable audio interrupt (placeholder)
|
|
||||||
AUDIO_REG(AUDIO_COMMAND_PORT) = 0x87654321;
|
|
||||||
|
|
||||||
return audio_wait_for_ready();
|
|
||||||
}
|
|
||||||
|
|
||||||
audio_status_t audio_play(const uint8_t *buffer, size_t size) {
|
|
||||||
if (buffer == NULL || size == 0) {
|
|
||||||
return AUDIO_ERROR_PLAY;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set buffer address and size
|
|
||||||
AUDIO_REG(AUDIO_DATA_PORT) = (uint32_t)buffer;
|
|
||||||
AUDIO_REG(AUDIO_DATA_PORT + 4) = size;
|
|
||||||
|
|
||||||
// Start playback
|
|
||||||
AUDIO_REG(AUDIO_COMMAND_PORT) = 0xABCD1234; // Placeholder play command
|
|
||||||
|
|
||||||
return audio_wait_for_ready();
|
|
||||||
}
|
|
||||||
|
|
||||||
audio_status_t audio_stop() {
|
|
||||||
AUDIO_REG(AUDIO_COMMAND_PORT) = 0x87654321; // Placeholder stop command
|
|
||||||
return audio_wait_for_ready();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Implement the rest of the functions here...
|
|
||||||
|
|
||||||
void audio_interrupt_handler() {
|
|
||||||
// Handle various interrupt scenarios (e.g., buffer underrun, playback complete)
|
|
||||||
uint32_t status = AUDIO_REG(AUDIO_STATUS_PORT);
|
|
||||||
|
|
||||||
if (status & 0x01) { // Example: Buffer underrun
|
|
||||||
// Handle buffer underrun
|
|
||||||
}
|
|
||||||
if (status & 0x02) { // Example: Playback complete
|
|
||||||
// Handle playback complete
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clear interrupt flags
|
|
||||||
AUDIO_REG(AUDIO_STATUS_PORT) = status;
|
|
||||||
}
|
}
|
||||||
|
@ -1,30 +1,17 @@
|
|||||||
#ifndef AUDIO_H
|
#ifndef AUDIO_H
|
||||||
#define AUDIO_H
|
#define AUDIO_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef enum {
|
// Initialize the audio driver
|
||||||
AUDIO_OK,
|
void audio_init();
|
||||||
AUDIO_ERROR_INIT,
|
|
||||||
AUDIO_ERROR_PLAY,
|
|
||||||
AUDIO_ERROR_STOP,
|
|
||||||
AUDIO_ERROR_TIMEOUT
|
|
||||||
} audio_status_t;
|
|
||||||
|
|
||||||
typedef struct {
|
// Play audio from a buffer
|
||||||
uint32_t sample_rate;
|
void audio_play(const uint8_t* buffer, size_t size);
|
||||||
uint8_t bit_depth;
|
|
||||||
uint8_t channels;
|
|
||||||
} audio_config_t;
|
|
||||||
|
|
||||||
audio_status_t audio_init(const audio_config_t *config);
|
// Stop audio playback
|
||||||
audio_status_t audio_play(const uint8_t *buffer, size_t size);
|
void audio_stop();
|
||||||
audio_status_t audio_stop();
|
|
||||||
audio_status_t audio_queue_buffer(const uint8_t *buffer, size_t size);
|
|
||||||
audio_status_t audio_get_buffer_status(size_t *remaining_bytes);
|
|
||||||
audio_status_t audio_set_volume(uint8_t volume);
|
|
||||||
audio_status_t audio_get_volume(uint8_t *volume);
|
|
||||||
void audio_interrupt_handler();
|
|
||||||
|
|
||||||
#endif // AUDIO_H
|
#endif
|
@ -1,6 +1,5 @@
|
|||||||
#include "eisa.h"
|
#include "eisa.h"
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -19,36 +18,10 @@
|
|||||||
// EISA bus controller command port
|
// EISA bus controller command port
|
||||||
#define EISA_COMMAND_PORT 0x01
|
#define EISA_COMMAND_PORT 0x01
|
||||||
|
|
||||||
// EISA bus controller interrupt control port
|
|
||||||
#define EISA_INTERRUPT_CONTROL_PORT 0x03 // Placeholder, replace with actual address
|
|
||||||
|
|
||||||
// EISA bus controller DMA channel configuration port
|
|
||||||
#define EISA_DMA_CHANNEL_CONFIG_PORT 0x04 // Placeholder, replace with actual address
|
|
||||||
|
|
||||||
// Initialize the EISA bus
|
// Initialize the EISA bus
|
||||||
void eisa_init()
|
void eisa_init()
|
||||||
{
|
{
|
||||||
// Reset the EISA bus controller (if supported)
|
// Add any necessary initialization code here
|
||||||
eisa_write(EISA_COMMAND_PORT, 0xFF); // Example: Send a reset command
|
|
||||||
|
|
||||||
// Configure base address registers (if needed)
|
|
||||||
eisa_write(EISA_BASE_ADDRESS + 1, 0x0000); // Example: Set base address register
|
|
||||||
eisa_write(EISA_BASE_ADDRESS + 2, 0x0000); // Example: Set another base address register
|
|
||||||
|
|
||||||
// Set up interrupts (example)
|
|
||||||
eisa_write(EISA_INTERRUPT_CONTROL_PORT, 0x00); // Enable/disable interrupts
|
|
||||||
|
|
||||||
// Configure DMA channels (example)
|
|
||||||
eisa_write(EISA_DMA_CHANNEL_CONFIG_PORT, 0x00); // Configure DMA channels
|
|
||||||
// Other hardware-specific initialization...
|
|
||||||
}
|
|
||||||
|
|
||||||
void log_error(const char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
va_start(args, format);
|
|
||||||
vprintf(format, args);
|
|
||||||
va_end(args);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detect and configure EISA devices
|
// Detect and configure EISA devices
|
||||||
@ -56,7 +29,6 @@ void eisa_detect_devices()
|
|||||||
{
|
{
|
||||||
uint32_t bus, slot, func;
|
uint32_t bus, slot, func;
|
||||||
uint16_t vendor_id, device_id, class_code;
|
uint16_t vendor_id, device_id, class_code;
|
||||||
uint8_t dma_channel;
|
|
||||||
|
|
||||||
for (bus = 0; bus < 256; bus++)
|
for (bus = 0; bus < 256; bus++)
|
||||||
{
|
{
|
||||||
@ -69,41 +41,39 @@ void eisa_detect_devices()
|
|||||||
vendor_id = id & 0xFFFF;
|
vendor_id = id & 0xFFFF;
|
||||||
device_id = (id >> 16) & 0xFFFF;
|
device_id = (id >> 16) & 0xFFFF;
|
||||||
class_code = eisa_read_config_word(address, 10);
|
class_code = eisa_read_config_word(address, 10);
|
||||||
|
|
||||||
if (vendor_id != 0xFFFF)
|
if (vendor_id != 0xFFFF)
|
||||||
{
|
{
|
||||||
|
// Device detected, do something with it
|
||||||
if (vendor_id == MY_DEVICE_VENDOR_ID &&
|
if (vendor_id == MY_DEVICE_VENDOR_ID &&
|
||||||
device_id == MY_DEVICE_DEVICE_ID &&
|
device_id == MY_DEVICE_DEVICE_ID &&
|
||||||
class_code == MY_DEVICE_CLASS_CODE)
|
class_code == MY_DEVICE_CLASS_CODE)
|
||||||
{
|
{
|
||||||
|
// This is my device, configure it
|
||||||
uint32_t config1 = eisa_read_config_dword(address, 4);
|
uint32_t config1 = eisa_read_config_dword(address, 4);
|
||||||
uint32_t config2 = eisa_read_config_dword(address, 8);
|
uint32_t config2 = eisa_read_config_dword(address, 8);
|
||||||
|
|
||||||
if ((config1 & 0x00000010) == 0)
|
//printf("Config1: %u\n", config1);
|
||||||
{
|
//printf("Config2: %u\n", config2);
|
||||||
dma_channel = (config1 >> 4) & 0x03;
|
// Do something with the configuration data
|
||||||
// Replace 0xspecific_port_2 with the actual port number
|
|
||||||
eisa_write(0x02, dma_channel); // Example: Assuming 0x02 is the correct port number
|
// Check for specific bits in config1
|
||||||
log_error("Failed to enable feature 1");
|
if (config1 & 0x00000001) {
|
||||||
|
// Enable feature 1 based on bit 0 of config1
|
||||||
|
eisa_write(0xspecific_port_1, 0xvalue_to_enable_feature_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dma_channel)
|
if (config1 & 0x00000010) {
|
||||||
{
|
// Set DMA channel based on bits 4-5 of config1
|
||||||
log_error("Failed to set DMA channel");
|
uint8_t dma_channel = (config1 >> 4) & 0x03;
|
||||||
|
eisa_write(0xspecific_port_2, dma_channel);
|
||||||
}
|
}
|
||||||
if (!(config2 & 0x00000001))
|
|
||||||
{
|
// Check for specific bits in config2
|
||||||
log_error("Failed to configure interrupt line");
|
if (config2 & 0x00000001) {
|
||||||
|
// Configure interrupt line based on bit 0 of config2
|
||||||
|
eisa_write(0xspecific_port_3, 0xinterrupt_line_number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
log_error("Unknown device detected at address: 0x%04X", address);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
log_error("No device found at address: 0x%04X", address);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
// Initialize the EISA bus
|
// Initialize the EISA bus
|
||||||
void eisa_init();
|
void eisa_init();
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
#include "isa.h"
|
#include "isa.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdarg.h> // Include for va_list and related functions
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
// ISA bus controller base address
|
// ISA bus controller base address
|
||||||
#define ISA_BASE_ADDRESS 0x0000
|
#define ISA_BASE_ADDRESS 0x0000
|
||||||
@ -32,26 +30,8 @@ uint8_t isa_read(uint16_t port)
|
|||||||
{
|
{
|
||||||
uint8_t value;
|
uint8_t value;
|
||||||
|
|
||||||
// Check for invalid port
|
// Read from the specified port
|
||||||
if (port > 0xFF)
|
__asm__ volatile("inb %1, %0" : "=a"(value) : "dN"(port));
|
||||||
{
|
|
||||||
// Prepare a buffer to hold the formatted string
|
|
||||||
char buffer[64];
|
|
||||||
va_list args;
|
|
||||||
va_start(args, port);
|
|
||||||
vsnprintf(buffer, sizeof(buffer), "Invalid port address: 0x%x\n", port);
|
|
||||||
va_end(args);
|
|
||||||
|
|
||||||
// Use vfprintf to print the contents of the buffer to stderr
|
|
||||||
vfprintf(stderr, buffer, NULL);
|
|
||||||
return 0xFF; // Indicate error
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read from the specified port with improved assembly attributes
|
|
||||||
__asm__ volatile("inb %1, %0"
|
|
||||||
: "=r"(value)
|
|
||||||
: "Nd"(port)
|
|
||||||
: "memory");
|
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@ -59,24 +39,6 @@ uint8_t isa_read(uint16_t port)
|
|||||||
// Write to an ISA device
|
// Write to an ISA device
|
||||||
void isa_write(uint16_t port, uint8_t value)
|
void isa_write(uint16_t port, uint8_t value)
|
||||||
{
|
{
|
||||||
// Check for invalid port
|
// Write the specified value to the specified port
|
||||||
if (port > 0xFF)
|
__asm__ volatile("outb %0, %1" : : "a"(value), "dN"(port));
|
||||||
{
|
|
||||||
// Prepare a buffer to hold the formatted string
|
|
||||||
char buffer[64];
|
|
||||||
va_list args;
|
|
||||||
va_start(args, port);
|
|
||||||
vsnprintf(buffer, sizeof(buffer), "Invalid port address: 0x%x\n", port);
|
|
||||||
va_end(args);
|
|
||||||
|
|
||||||
// Use vfprintf to print the contents of the buffer to stderr
|
|
||||||
vfprintf(stderr, buffer, NULL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write to the specified port with improved assembly attributes
|
|
||||||
__asm__ volatile("outb %0, %1"
|
|
||||||
:
|
|
||||||
: "r"(value), "Nd"(port)
|
|
||||||
: "memory");
|
|
||||||
}
|
}
|
@ -3,17 +3,6 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// Inline assembly implementations for I/O operations
|
|
||||||
static inline void outb(uint16_t port, uint8_t val) {
|
|
||||||
asm volatile ("outb %0, %1" : : "a"(val), "Nd"(port));
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline uint8_t inb(uint16_t port) {
|
|
||||||
uint8_t ret;
|
|
||||||
asm volatile ("inb %1, %0" : "=a"(ret) : "Nd"(port));
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Function to initialize the COM and LPT ports
|
// Function to initialize the COM and LPT ports
|
||||||
void io_init(uint16_t port);
|
void io_init(uint16_t port);
|
||||||
|
|
||||||
@ -29,7 +18,11 @@ char io_read_lpt();
|
|||||||
// Function to write to the LPT port
|
// Function to write to the LPT port
|
||||||
void io_write_lpt(char data);
|
void io_write_lpt(char data);
|
||||||
|
|
||||||
// Function declaration for interrupt handler installation
|
// Function declarations for keyboard.c
|
||||||
|
extern uint8_t inb(uint16_t port);
|
||||||
|
|
||||||
|
extern void outb(uint16_t port, uint8_t data);
|
||||||
|
|
||||||
void install_interrupt_handler(uint8_t interrupt, void (*handler)(void));
|
void install_interrupt_handler(uint8_t interrupt, void (*handler)(void));
|
||||||
|
|
||||||
#endif /* IO_H */
|
#endif /* IO_H */
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "io.h" // Include the new I/O header
|
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -3,11 +3,10 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// Function prototypes
|
|
||||||
void init_serial(uint16_t com);
|
void init_serial(uint16_t com);
|
||||||
int serial_received(uint16_t com);
|
int serial_received(uint16_t com);
|
||||||
char read_serial(uint16_t com);
|
char read_serial(uint16_t com);
|
||||||
int is_transmit_empty(uint16_t com);
|
int is_transmit_empty(uint16_t com);
|
||||||
void write_serial(uint16_t com, char a);
|
void write_serial(uint16_t com, char a);
|
||||||
|
|
||||||
#endif // SERIAL_H
|
#endif
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
// Keyboard input buffer
|
// Keyboard input buffer
|
||||||
#define KEYBOARD_BUFFER_SIZE 32
|
#define KEYBOARD_BUFFER_SIZE 32
|
||||||
@ -15,98 +14,6 @@
|
|||||||
#define KEYBOARD_ACKNOWLEDGE_SCANCODE 0xFA
|
#define KEYBOARD_ACKNOWLEDGE_SCANCODE 0xFA
|
||||||
#define KEYCODE_UNKNOWN 0xFF
|
#define KEYCODE_UNKNOWN 0xFF
|
||||||
#define KEYCODE_C 0x03
|
#define KEYCODE_C 0x03
|
||||||
#define KEYCODE_ESC 0x01
|
|
||||||
#define KEYCODE_1 0x02
|
|
||||||
#define KEYCODE_2 0x03
|
|
||||||
#define KEYCODE_3 0x04
|
|
||||||
#define KEYCODE_4 0x05
|
|
||||||
#define KEYCODE_5 0x06
|
|
||||||
#define KEYCODE_6 0x07
|
|
||||||
#define KEYCODE_7 0x08
|
|
||||||
#define KEYCODE_8 0x09
|
|
||||||
#define KEYCODE_9 0x0A
|
|
||||||
#define KEYCODE_0 0x0B
|
|
||||||
#define KEYCODE_MINUS 0x0C
|
|
||||||
#define KEYCODE_EQUALS 0x0D
|
|
||||||
#define KEYCODE_BACKSPACE 0x0E
|
|
||||||
#define KEYCODE_TAB 0x0F
|
|
||||||
#define KEYCODE_Q 0x10
|
|
||||||
#define KEYCODE_W 0x11
|
|
||||||
#define KEYCODE_E 0x12
|
|
||||||
#define KEYCODE_R 0x13
|
|
||||||
#define KEYCODE_T 0x14
|
|
||||||
#define KEYCODE_Y 0x15
|
|
||||||
#define KEYCODE_U 0x16
|
|
||||||
#define KEYCODE_I 0x17
|
|
||||||
#define KEYCODE_O 0x18
|
|
||||||
#define KEYCODE_P 0x19
|
|
||||||
#define KEYCODE_LEFT_BRACKET 0x1A
|
|
||||||
#define KEYCODE_RIGHT_BRACKET 0x1B
|
|
||||||
#define KEYCODE_ENTER 0x1C
|
|
||||||
#define KEYCODE_LEFT_CTRL 0x1D
|
|
||||||
#define KEYCODE_A 0x1E
|
|
||||||
#define KEYCODE_S 0x1F
|
|
||||||
#define KEYCODE_D 0x20
|
|
||||||
#define KEYCODE_F 0x21
|
|
||||||
#define KEYCODE_G 0x22
|
|
||||||
#define KEYCODE_H 0x23
|
|
||||||
#define KEYCODE_J 0x24
|
|
||||||
#define KEYCODE_K 0x25
|
|
||||||
#define KEYCODE_L 0x26
|
|
||||||
#define KEYCODE_SEMICOLON 0x27
|
|
||||||
#define KEYCODE_APOSTROPHE 0x28
|
|
||||||
#define KEYCODE_GRAVE_ACCENT 0x29
|
|
||||||
#define KEYCODE_LEFT_SHIFT 0x2A
|
|
||||||
#define KEYCODE_BACKSLASH 0x2B
|
|
||||||
#define KEYCODE_Z 0x2C
|
|
||||||
#define KEYCODE_X 0x2D
|
|
||||||
#define KEYCODE_V 0x2F
|
|
||||||
#define KEYCODE_B 0x30
|
|
||||||
#define KEYCODE_N 0x31
|
|
||||||
#define KEYCODE_M 0x32
|
|
||||||
#define KEYCODE_COMMA 0x33
|
|
||||||
#define KEYCODE_DOT 0x34
|
|
||||||
#define KEYCODE_FORWARD_SLASH 0x35
|
|
||||||
#define KEYCODE_RIGHT_SHIFT 0x36
|
|
||||||
#define KEYCODE_PRINT_SCREEN 0x37
|
|
||||||
#define KEYCODE_LEFT_ALT 0x38
|
|
||||||
#define KEYCODE_SPACE 0x39
|
|
||||||
#define KEYCODE_CAPS_LOCK 0x3A
|
|
||||||
#define KEYCODE_F1 0x3B
|
|
||||||
#define KEYCODE_F2 0x3C
|
|
||||||
#define KEYCODE_F3 0x3D
|
|
||||||
#define KEYCODE_F4 0x3E
|
|
||||||
#define KEYCODE_F5 0x3F
|
|
||||||
#define KEYCODE_F6 0x40
|
|
||||||
#define KEYCODE_F7 0x41
|
|
||||||
#define KEYCODE_F8 0x42
|
|
||||||
#define KEYCODE_F9 0x43
|
|
||||||
#define KEYCODE_F10 0x44
|
|
||||||
#define KEYCODE_NUM_LOCK 0x45
|
|
||||||
#define KEYCODE_SCROLL_LOCK 0x46
|
|
||||||
#define KEYCODE_HOME 0x47
|
|
||||||
#define KEYCODE_UP 0x48
|
|
||||||
#define KEYCODE_PAGE_UP 0x49
|
|
||||||
#define KEYCODE_MINUS_PAD 0x4A
|
|
||||||
#define KEYCODE_LEFT_ARROW 0x4B
|
|
||||||
#define KEYCODE_5_PAD 0x4C
|
|
||||||
#define KEYCODE_RIGHT_ARROW 0x4D
|
|
||||||
#define KEYCODE_PLUS_PAD 0x4E
|
|
||||||
#define KEYCODE_END 0x4F
|
|
||||||
#define KEYCODE_DOWN_ARROW 0x50
|
|
||||||
#define KEYCODE_PAGE_DOWN 0x51
|
|
||||||
#define KEYCODE_INSERT 0x52
|
|
||||||
#define KEYCODE_DELETE 0x53
|
|
||||||
#define KEYCODE_LEFT_CTRL_BREAK 0x57
|
|
||||||
#define KEYCODE_PAUSE 0x5F
|
|
||||||
#define KEYCODE_RIGHT 0x62
|
|
||||||
#define KEYCODE_DOWN 0x64
|
|
||||||
#define KEYCODE_F11 0x66
|
|
||||||
#define KEYCODE_F12 0x67
|
|
||||||
#define KEYCODE_LED_NUM_LOCK 0x69
|
|
||||||
#define KEYCODE_LED_CAPS_LOCK 0x6A
|
|
||||||
#define KEYCODE_LED_SCROLL_LOCK 0x6B
|
|
||||||
#define KEYCODE_EXTENDED 0xE0
|
|
||||||
|
|
||||||
static uint8_t keyboard_buffer[KEYBOARD_BUFFER_SIZE];
|
static uint8_t keyboard_buffer[KEYBOARD_BUFFER_SIZE];
|
||||||
static size_t keyboard_buffer_head = 0;
|
static size_t keyboard_buffer_head = 0;
|
||||||
@ -114,59 +21,23 @@ static size_t keyboard_buffer_tail = 0;
|
|||||||
|
|
||||||
void set_interrupt_vector(uint8_t vector, void (*handler)());
|
void set_interrupt_vector(uint8_t vector, void (*handler)());
|
||||||
void enable_interrupt(uint8_t vector);
|
void enable_interrupt(uint8_t vector);
|
||||||
void keyboard_init();
|
|
||||||
bool keyboard_buffer_empty();
|
|
||||||
uint8_t keyboard_read_scancode();
|
|
||||||
uint8_t translate_scancode_to_keycode(uint8_t scancode);
|
|
||||||
|
|
||||||
bool keyboard_buffer_full()
|
bool keyboard_buffer_full()
|
||||||
{
|
{
|
||||||
return (keyboard_buffer_head + 1) % KEYBOARD_BUFFER_SIZE == keyboard_buffer_tail;
|
return (keyboard_buffer_head + 1) % KEYBOARD_BUFFER_SIZE == keyboard_buffer_tail;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyboardInterruptHandler()
|
void KeyboardInterruptHandler()
|
||||||
{
|
{
|
||||||
if (!keyboard_buffer_full())
|
if (!keyboard_buffer_full())
|
||||||
{
|
{uint8_t scancode = inb(KEYBOARD_DATA_PORT);
|
||||||
uint8_t scancode = inb(KEYBOARD_DATA_PORT);
|
|
||||||
uint8_t keycode = translate_scancode_to_keycode(scancode);
|
uint8_t keycode = translate_scancode_to_keycode(scancode);
|
||||||
|
|
||||||
// Use the keycode for further processing
|
|
||||||
process_keycode(keycode);
|
|
||||||
|
|
||||||
// Or log the keycode for debugging
|
|
||||||
log_keycode(keycode);
|
|
||||||
|
|
||||||
// Add scancode to buffer
|
// Add scancode to buffer
|
||||||
keyboard_buffer[keyboard_buffer_head] = scancode;
|
keyboard_buffer[keyboard_buffer_head] = scancode;
|
||||||
keyboard_buffer_head = (keyboard_buffer_head + 1) % KEYBOARD_BUFFER_SIZE;
|
keyboard_buffer_head = (keyboard_buffer_head + 1) % KEYBOARD_BUFFER_SIZE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void process_keycode(uint8_t keycode)
|
|
||||||
{
|
|
||||||
// Add your keycode processing logic here
|
|
||||||
// For example, you could update the system state based on specific key presses
|
|
||||||
switch(keycode)
|
|
||||||
{
|
|
||||||
case KEYCODE_ESC:
|
|
||||||
// Handle ESC key press
|
|
||||||
break;
|
|
||||||
case KEYCODE_ENTER:
|
|
||||||
// Handle ENTER key press
|
|
||||||
break;
|
|
||||||
// Add more cases as needed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Example function to log the keycode
|
|
||||||
void log_keycode(uint8_t keycode)
|
|
||||||
{
|
|
||||||
// Add your logging logic here
|
|
||||||
// For example, you could print the keycode to a debug console or write it to a log file
|
|
||||||
printf("Keycode pressed: 0x%02X\n", keycode);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Function to translate the combined extended scancode (first byte + second byte)
|
// Function to translate the combined extended scancode (first byte + second byte)
|
||||||
uint8_t translate_extended_scancode(uint8_t second_scancode)
|
uint8_t translate_extended_scancode(uint8_t second_scancode)
|
||||||
{
|
{
|
||||||
@ -184,7 +55,7 @@ uint8_t translate_extended_scancode(uint8_t second_scancode)
|
|||||||
|
|
||||||
uint8_t translate_scancode_to_keycode(uint8_t scancode)
|
uint8_t translate_scancode_to_keycode(uint8_t scancode)
|
||||||
{
|
{
|
||||||
static uint8_t keycode_map[256] = {
|
static uint8_t keycode_map[128] = {
|
||||||
[0x01] = KEYCODE_ESC,
|
[0x01] = KEYCODE_ESC,
|
||||||
[0x02] = KEYCODE_1,
|
[0x02] = KEYCODE_1,
|
||||||
[0x03] = KEYCODE_2,
|
[0x03] = KEYCODE_2,
|
||||||
@ -250,6 +121,7 @@ uint8_t translate_scancode_to_keycode(uint8_t scancode)
|
|||||||
[0x3F] = KEYCODE_F5,
|
[0x3F] = KEYCODE_F5,
|
||||||
[0x40] = KEYCODE_F6,
|
[0x40] = KEYCODE_F6,
|
||||||
[0x41] = KEYCODE_F7,
|
[0x41] = KEYCODE_F7,
|
||||||
|
[0x41] = KEYCODE_F7,
|
||||||
[0x42] = KEYCODE_F8,
|
[0x42] = KEYCODE_F8,
|
||||||
[0x43] = KEYCODE_F9,
|
[0x43] = KEYCODE_F9,
|
||||||
[0x44] = KEYCODE_F10,
|
[0x44] = KEYCODE_F10,
|
||||||
@ -291,7 +163,7 @@ uint8_t translate_scancode_to_keycode(uint8_t scancode)
|
|||||||
[0x68] = KEYCODE_UNKNOWN, // (unused)
|
[0x68] = KEYCODE_UNKNOWN, // (unused)
|
||||||
[0x69] = KEYCODE_LED_NUM_LOCK, // Num Lock LED status
|
[0x69] = KEYCODE_LED_NUM_LOCK, // Num Lock LED status
|
||||||
[0x6A] = KEYCODE_LED_CAPS_LOCK, // Caps Lock LED status
|
[0x6A] = KEYCODE_LED_CAPS_LOCK, // Caps Lock LED status
|
||||||
[0x6B] = KEYCODE_LED_SCROLL_LOCK,
|
[0x6B] = KEYCODE_LED_SCROLL_LOCK
|
||||||
// ... (complete the rest based on the scancode table)
|
// ... (complete the rest based on the scancode table)
|
||||||
[0xE0] = 0, // Handle extended scancodes (e.g., Print Screen) separately
|
[0xE0] = 0, // Handle extended scancodes (e.g., Print Screen) separately
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,4 @@ void set_interrupt_vector(uint8_t vector, void (*handler)());
|
|||||||
void enable_interrupt(uint8_t vector);
|
void enable_interrupt(uint8_t vector);
|
||||||
uint8_t translate_scancode_to_keycode(uint8_t scancode);
|
uint8_t translate_scancode_to_keycode(uint8_t scancode);
|
||||||
uint8_t translate_extended_scancode(uint8_t second_scancode);
|
uint8_t translate_extended_scancode(uint8_t second_scancode);
|
||||||
void process_keycode(uint8_t keycode);
|
|
||||||
void log_keycode(uint8_t keycode);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
#include "mouse.h"
|
#include "mouse.h"
|
||||||
#include "ps2.h"
|
#include "ps2.h"
|
||||||
#include "../io/serial.h"
|
#include "serial.h"
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
#include "../io/io.h"
|
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define MOUSE_COM 1
|
#define MOUSE_COM 1
|
||||||
#define PORT_BASE 0x3F8 // Add this if it's not defined elsewhere
|
|
||||||
|
|
||||||
void init_mouse(uint16_t com)
|
void init_mouse(uint16_t com)
|
||||||
{
|
{
|
||||||
@ -44,7 +42,7 @@ int mouse_received(uint16_t com)
|
|||||||
|
|
||||||
mouse_data_t read_mouse(uint16_t com)
|
mouse_data_t read_mouse(uint16_t com)
|
||||||
{
|
{
|
||||||
mouse_data_t data = {0}; // Initialize to zero
|
mouse_data_t data;
|
||||||
|
|
||||||
if (usb_mouse_detected())
|
if (usb_mouse_detected())
|
||||||
{
|
{
|
||||||
@ -56,18 +54,32 @@ mouse_data_t read_mouse(uint16_t com)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
data.x = 0;
|
||||||
|
data.y = 0;
|
||||||
|
data.buttons = 0;
|
||||||
|
|
||||||
while (mouse_received(com) == 0)
|
while (mouse_received(com) == 0)
|
||||||
;
|
;
|
||||||
|
|
||||||
uint8_t status = inb(PORT_BASE + 8 * (com - 1) + 5);
|
uint8_t status = inb(PORT_BASE + 8 * (com - 1) + 5);
|
||||||
|
|
||||||
data.buttons = 0;
|
if (status & 0x01)
|
||||||
if (status & 0x01) data.buttons |= 0x01;
|
{
|
||||||
if (status & 0x02) data.buttons |= 0x02;
|
data.buttons |= 0x01;
|
||||||
if (status & 0x04) data.buttons |= 0x04;
|
}
|
||||||
|
|
||||||
data.x = (int16_t)inb(PORT_BASE + 8 * (com - 1));
|
if (status & 0x02)
|
||||||
data.y = (int16_t)inb(PORT_BASE + 8 * (com - 1) + 1);
|
{
|
||||||
|
data.buttons |= 0x02;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status & 0x04)
|
||||||
|
{
|
||||||
|
data.buttons |= 0x04;
|
||||||
|
}
|
||||||
|
|
||||||
|
data.x = inb(PORT_BASE + 8 * (com - 1));
|
||||||
|
data.y = inb(PORT_BASE + 8 * (com - 1) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
@ -9,7 +9,6 @@ typedef struct {
|
|||||||
uint8_t buttons;
|
uint8_t buttons;
|
||||||
} mouse_data_t;
|
} mouse_data_t;
|
||||||
|
|
||||||
|
|
||||||
void init_mouse(uint16_t com);
|
void init_mouse(uint16_t com);
|
||||||
int mouse_received(uint16_t com);
|
int mouse_received(uint16_t com);
|
||||||
mouse_data_t read_mouse(uint16_t com);
|
mouse_data_t read_mouse(uint16_t com);
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
#ifndef PS2_H
|
|
||||||
#define PS2_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
// PS/2 Controller Ports
|
|
||||||
#define PS2_DATA_PORT 0x60
|
|
||||||
#define PS2_STATUS_PORT 0x64
|
|
||||||
#define PS2_COMMAND_PORT 0x64
|
|
||||||
|
|
||||||
// PS/2 Controller Commands
|
|
||||||
#define PS2_CMD_READ_CONFIG 0x20
|
|
||||||
#define PS2_CMD_WRITE_CONFIG 0x60
|
|
||||||
#define PS2_CMD_DISABLE_PORT2 0xA7
|
|
||||||
#define PS2_CMD_ENABLE_PORT2 0xA8
|
|
||||||
#define PS2_CMD_TEST_PORT2 0xA9
|
|
||||||
#define PS2_CMD_TEST_CONTROLLER 0xAA
|
|
||||||
#define PS2_CMD_TEST_PORT1 0xAB
|
|
||||||
#define PS2_CMD_DISABLE_PORT1 0xAD
|
|
||||||
#define PS2_CMD_ENABLE_PORT1 0xAE
|
|
||||||
|
|
||||||
// Function prototypes
|
|
||||||
bool ps2_init(void);
|
|
||||||
uint8_t ps2_read_data(void);
|
|
||||||
void ps2_write_data(uint8_t data);
|
|
||||||
uint8_t ps2_read_status(void);
|
|
||||||
void ps2_write_command(uint8_t command);
|
|
||||||
bool ps2_wait_for_read(void);
|
|
||||||
bool ps2_wait_for_write(void);
|
|
||||||
|
|
||||||
// PS/2 device specific functions
|
|
||||||
bool ps2_keyboard_init(void);
|
|
||||||
bool ps2_mouse_init(void);
|
|
||||||
|
|
||||||
#endif // PS2_H
|
|
@ -1,48 +0,0 @@
|
|||||||
#ifndef USB_H
|
|
||||||
#define USB_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include "./mouse.h"
|
|
||||||
|
|
||||||
// USB Version definitions
|
|
||||||
#define USB_VERSION_1_0 0x100
|
|
||||||
#define USB_VERSION_1_1 0x110
|
|
||||||
#define USB_VERSION_2_0 0x200
|
|
||||||
#define USB_VERSION_2_1 0x210
|
|
||||||
|
|
||||||
// USB device classes
|
|
||||||
#define USB_CLASS_HID 0x03
|
|
||||||
|
|
||||||
// HID subclasses
|
|
||||||
#define USB_SUBCLASS_BOOT 0x01
|
|
||||||
|
|
||||||
// HID protocols
|
|
||||||
#define USB_PROTOCOL_KEYBOARD 0x01
|
|
||||||
#define USB_PROTOCOL_MOUSE 0x02
|
|
||||||
|
|
||||||
// Function prototypes
|
|
||||||
mouse_data_t usb_read_mouse(void);
|
|
||||||
bool usb_mouse_detected(void);
|
|
||||||
bool usb_mouse_received(void);
|
|
||||||
bool usb_init(void);
|
|
||||||
bool usb_detect_version(uint16_t *version);
|
|
||||||
bool usb_enumerate_devices(void);
|
|
||||||
|
|
||||||
// HID device specific functions
|
|
||||||
bool usb_hid_init(void);
|
|
||||||
bool usb_keyboard_init(void);
|
|
||||||
bool usb_mouse_init(void);
|
|
||||||
|
|
||||||
// USB transfer functions
|
|
||||||
bool usb_control_transfer(/* parameters */);
|
|
||||||
bool usb_interrupt_transfer(/* parameters */);
|
|
||||||
bool usb_bulk_transfer(/* parameters */);
|
|
||||||
|
|
||||||
// USB host controller interface functions
|
|
||||||
bool uhci_init(void); // USB 1.x
|
|
||||||
bool ohci_init(void); // USB 1.x
|
|
||||||
bool ehci_init(void); // USB 2.0
|
|
||||||
bool xhci_init(void); // USB 3.0+ (for future use)
|
|
||||||
|
|
||||||
#endif // USB_H
|
|
@ -1,7 +1,7 @@
|
|||||||
#include "fat16.h"
|
#include "fat16.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "fat16_io.h"
|
#include "fat16_io.h"
|
||||||
#include "../../kernel/arch/x86/disk/ata.h"
|
#include "src/kernel/arch/x86/disk/ata.h"
|
||||||
// Implementation of read_sector and write_sector functions (replace with actual disk I/O)
|
// Implementation of read_sector and write_sector functions (replace with actual disk I/O)
|
||||||
int read_sector(uint32_t sector_number, void *buffer)
|
int read_sector(uint32_t sector_number, void *buffer)
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "../../kernel/arch/x86/disk/ata.h"
|
#include "../../ata.h"
|
||||||
|
|
||||||
// Define constants for sector size, cluster size, etc. (replace with actual values)
|
// Define constants for sector size, cluster size, etc. (replace with actual values)
|
||||||
#define SECTOR_SIZE 512
|
#define SECTOR_SIZE 512
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "fat16_io.h"
|
#include "fat16_io.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "../../kernel/arch/x86/disk/ata.h"
|
#include "src/kernel/arch/x86/disk/ata.h"
|
||||||
#include "fat16.h"
|
#include "fat16.h"
|
||||||
// I/O port addresses for IDE controller (replace with actual values if needed)
|
// I/O port addresses for IDE controller (replace with actual values if needed)
|
||||||
#define PRIMARY_DATA_REGISTER 0x1F0
|
#define PRIMARY_DATA_REGISTER 0x1F0
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "fat16.h"
|
#include "fat16.h"
|
||||||
#include "../../kernel/arch/x86/disk/ata.h"
|
#include "src/kernel/arch/x86/disk/ata.h"
|
||||||
|
|
||||||
// I/O port addresses for IDE controller (replace with actual values if needed)
|
// I/O port addresses for IDE controller (replace with actual values if needed)
|
||||||
#define PRIMARY_DATA_REGISTER 0x1F0
|
#define PRIMARY_DATA_REGISTER 0x1F0
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
# GUI
|
|
||||||
|
|
||||||
Use QEMU for emulation during development
|
|
||||||
|
|
||||||
Implement efficient memory allocation for GUI elements.
|
|
||||||
Develop drivers and event systems for keyboard and mouse input handling
|
|
||||||
Choose between bitmap fonts or implement a basic vector font renderer.
|
|
||||||
Decide on a compositing strategy for overlapping windows.
|
|
||||||
Implement blitting and compositing in optimized assembly.
|
|
||||||
|
|
||||||
Implement performance-critical routines in assembly.
|
|
||||||
|
|
||||||
Implement a simple compositing system. Use a z-order list to manage window stacking and redraw only changed areas for efficiency.
|
|
||||||
|
|
||||||
the development environment will be in
|
|
||||||
|
|
||||||
debian 10 buster with kernel Linux gregbowne 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux and gnu 8.3.0 and yes using gcc and nasm
|
|
||||||
on vscode
|
|
||||||
|
|
||||||
Implement basic clipping to improve rendering performance.
|
|
||||||
|
|
||||||
Implement double buffering to reduce screen flicker.
|
|
||||||
|
|
||||||
Start with simple widgets like buttons and text fields.
|
|
||||||
Gradually add more complex elements like scrollbars and menus.
|
|
||||||
|
|
||||||
Optimize critical paths using inline assembly or full assembly routines.
|
|
||||||
Implement double buffering to reduce screen flicker.
|
|
||||||
Use a simple event system for GUI interactions.
|
|
||||||
|
|
||||||
Implement modes:
|
|
||||||
VGA/SVGA Mode
|
|
||||||
|
|
||||||
Use VGA mode 13h (320x200, 256 colors) for maximum compatibility.
|
|
||||||
Implement VESA VBE support for higher resolutions on capable hardware.
|
|
||||||
|
|
||||||
Framebuffer
|
|
||||||
|
|
||||||
Set up a linear framebuffer in protected mode for more flexible graphics.
|
|
||||||
|
|
||||||
Use SIMD operations.
|
|
@ -1,10 +0,0 @@
|
|||||||
section .text
|
|
||||||
global set_custom_video_mode
|
|
||||||
|
|
||||||
set_custom_video_mode:
|
|
||||||
mov eax, 0x4F01
|
|
||||||
mov cx, %1
|
|
||||||
mov dx, 0x000A0000
|
|
||||||
mov bx, 0x8000
|
|
||||||
int 0x10
|
|
||||||
ret
|
|
241
src/gui/gui.c
241
src/gui/gui.c
@ -1,238 +1,3 @@
|
|||||||
#include <errno.h>
|
/*
|
||||||
#include <fcntl.h>
|
gui goes here
|
||||||
#include <stdbool.h>
|
*/
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
// Custom OS-specific structures
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int x, y;
|
|
||||||
int width, height;
|
|
||||||
uint32_t color;
|
|
||||||
void *address; // Address of the frame buffer
|
|
||||||
int pitch; // Pitch of the frame buffer
|
|
||||||
} Window;
|
|
||||||
|
|
||||||
// Event structure
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
EVENT_KEY_PRESS,
|
|
||||||
EVENT_MOUSE_MOVE,
|
|
||||||
// Add more events as needed
|
|
||||||
} EventType;
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
EventType type;
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
int key_code;
|
|
||||||
} key_press;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
int x, y;
|
|
||||||
} mouse_move;
|
|
||||||
// Add more event types as needed
|
|
||||||
};
|
|
||||||
} Event;
|
|
||||||
|
|
||||||
// Function prototypes
|
|
||||||
void init_gui(void);
|
|
||||||
void render_framebuffer(void *fb);
|
|
||||||
void handle_events(void);
|
|
||||||
Window *create_window(int x, int y, int width, int height, uint32_t color);
|
|
||||||
void destroy_window(Window *win);
|
|
||||||
void update_window(Window *win);
|
|
||||||
void draw_text(const char *text, int x, int y, uint32_t color);
|
|
||||||
void draw_button(const char *label, int x, int y, int width, int height, uint32_t color);
|
|
||||||
void handle_event(Event *ev);
|
|
||||||
|
|
||||||
// Global variables
|
|
||||||
void *framebuffer = NULL;
|
|
||||||
int fb_pitch = 0;
|
|
||||||
int fb_fd = -1;
|
|
||||||
|
|
||||||
// Custom OS-specific functions
|
|
||||||
void init_video_mode(void);
|
|
||||||
void get_framebuffer_info(void);
|
|
||||||
void set_custom_video_mode(void);
|
|
||||||
|
|
||||||
// Helper functions
|
|
||||||
void print_error(const char *message);
|
|
||||||
void check_mmap_result(void *ptr, const char *filename);
|
|
||||||
void check_open_result(int fd, const char *filename);
|
|
||||||
void check_ioctl_result(int result, const char *func_name);
|
|
||||||
|
|
||||||
// Function implementations
|
|
||||||
|
|
||||||
void init_gui(void)
|
|
||||||
{
|
|
||||||
// Set up graphics mode
|
|
||||||
init_video_mode();
|
|
||||||
|
|
||||||
// Get framebuffer info
|
|
||||||
get_framebuffer_info();
|
|
||||||
|
|
||||||
// Open framebuffer device
|
|
||||||
fb_fd = open("/dev/fb0", O_RDWR);
|
|
||||||
if (fb_fd == -1)
|
|
||||||
{
|
|
||||||
check_open_result(fb_fd, "/dev/fb0");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Map framebuffer to user space
|
|
||||||
framebuffer = mmap(NULL, finfo.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fb_fd, 0);
|
|
||||||
if (framebuffer == MAP_FAILED)
|
|
||||||
{
|
|
||||||
check_mmap_result(framebuffer, "/dev/fb0");
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("GUI initialized\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
void render_framebuffer(void *fb)
|
|
||||||
{
|
|
||||||
// Implement rendering logic here
|
|
||||||
// This will depend on how your custom system handles graphics
|
|
||||||
}
|
|
||||||
|
|
||||||
void handle_events(void)
|
|
||||||
{
|
|
||||||
// Implement event handling logic here
|
|
||||||
// This will depend on how your custom system handles input events
|
|
||||||
}
|
|
||||||
|
|
||||||
Window *create_window(int x, int y, int width, int height, uint32_t color)
|
|
||||||
{
|
|
||||||
Window *win = malloc(sizeof(Window));
|
|
||||||
win->x = x;
|
|
||||||
win->y = y;
|
|
||||||
win->width = width;
|
|
||||||
win->height = height;
|
|
||||||
win->color = color;
|
|
||||||
win->address = framebuffer;
|
|
||||||
win->pitch = fb_pitch;
|
|
||||||
return win;
|
|
||||||
}
|
|
||||||
|
|
||||||
void destroy_window(Window *win)
|
|
||||||
{
|
|
||||||
free(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
void update_window(Window *win)
|
|
||||||
{
|
|
||||||
// Implement window updating logic here
|
|
||||||
printf("Updating window %p\n", win);
|
|
||||||
}
|
|
||||||
|
|
||||||
void draw_text(const char *text, int x, int y, uint32_t color)
|
|
||||||
{
|
|
||||||
// Implement text drawing logic here
|
|
||||||
printf("Drawing text at (%d,%d): %s\n", x, y, text);
|
|
||||||
}
|
|
||||||
|
|
||||||
void draw_button(const char *label, int x, int y, int width, int height, uint32_t color)
|
|
||||||
{
|
|
||||||
// Implement button drawing logic here
|
|
||||||
printf("Drawing button at (%d,%d): %s\n", x, y, label);
|
|
||||||
}
|
|
||||||
|
|
||||||
void handle_event(Event *ev)
|
|
||||||
{
|
|
||||||
// Implement event handling logic here
|
|
||||||
printf("Handling event of type %d\n", ev->type);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Assembly code for custom graphics mode setup
|
|
||||||
static void __attribute__((naked)) set_custom_video_mode(void)
|
|
||||||
{
|
|
||||||
// Implement platform-specific video mode setting
|
|
||||||
// This will depend on your custom system architecture
|
|
||||||
}
|
|
||||||
|
|
||||||
// Helper functions
|
|
||||||
|
|
||||||
void print_error(const char *message)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "%s\n", message);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void check_mmap_result(void *ptr, const char *filename)
|
|
||||||
{
|
|
||||||
if (ptr == MAP_FAILED)
|
|
||||||
{
|
|
||||||
print_error("Failed to map memory for file: ");
|
|
||||||
print_error(filename);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void check_open_result(int fd, const char *filename)
|
|
||||||
{
|
|
||||||
if (fd == -1)
|
|
||||||
{
|
|
||||||
print_error("Failed to open file: ");
|
|
||||||
print_error(filename);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void check_ioctl_result(int result, const char *func_name)
|
|
||||||
{
|
|
||||||
if (result != 0)
|
|
||||||
{
|
|
||||||
print_error("Failed to execute ioctl call: ");
|
|
||||||
print_error(func_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Custom OS-specific functions
|
|
||||||
|
|
||||||
void init_video_mode(void)
|
|
||||||
{
|
|
||||||
set_custom_video_mode();
|
|
||||||
}
|
|
||||||
|
|
||||||
void get_framebuffer_info(void)
|
|
||||||
{
|
|
||||||
// Implement platform-specific framebuffer info retrieval
|
|
||||||
// This will depend on your custom system architecture
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_custom_video_mode(void)
|
|
||||||
{
|
|
||||||
// Implement platform-specific video mode setting
|
|
||||||
// This will depend on your custom system architecture
|
|
||||||
}
|
|
||||||
|
|
||||||
// Example usage
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
init_gui();
|
|
||||||
|
|
||||||
// Create a window
|
|
||||||
Window *win = create_window(50, 50, 100, 100, 0xFF0000);
|
|
||||||
|
|
||||||
// Draw something
|
|
||||||
draw_text("Hello, World!", 60, 60);
|
|
||||||
|
|
||||||
// Handle events
|
|
||||||
handle_events();
|
|
||||||
|
|
||||||
// Keep the program running
|
|
||||||
while (1)
|
|
||||||
{
|
|
||||||
usleep(10000); // Sleep for 10ms
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,70 +1,4 @@
|
|||||||
#ifndef GUI_H
|
/*
|
||||||
#define GUI_H
|
gui goes here
|
||||||
|
|
||||||
#include <stdint.h>
|
*/
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
// Forward declarations
|
|
||||||
struct Window;
|
|
||||||
enum EventType;
|
|
||||||
|
|
||||||
#define VGA_MODE 0x800x600
|
|
||||||
#define VGA_WIDTH 640
|
|
||||||
#define VGA_HEIGHT 480
|
|
||||||
#define VGA_BPP 32
|
|
||||||
|
|
||||||
// Event structure
|
|
||||||
typedef struct {
|
|
||||||
enum EventType type;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
int key_code;
|
|
||||||
} key_press;
|
|
||||||
struct {
|
|
||||||
int x, y;
|
|
||||||
} mouse_move;
|
|
||||||
// Add more event types as needed
|
|
||||||
};
|
|
||||||
} Event;
|
|
||||||
|
|
||||||
// Function prototypes
|
|
||||||
void init_gui(void);
|
|
||||||
void render_framebuffer(void* fb);
|
|
||||||
void handle_events(void);
|
|
||||||
struct Window* create_window(int x, int y, int width, int height, uint32_t color);
|
|
||||||
void destroy_window(struct Window* win);
|
|
||||||
void update_window(struct Window* win);
|
|
||||||
void draw_text(const char* text, int x, int y);
|
|
||||||
void draw_button(const char* label, int x, int y, uint32_t color);
|
|
||||||
void handle_event(Event* ev);
|
|
||||||
|
|
||||||
// Global variables
|
|
||||||
extern void* framebuffer;
|
|
||||||
extern int fb_pitch;
|
|
||||||
extern int fb_fd;
|
|
||||||
|
|
||||||
// Custom OS-specific functions
|
|
||||||
void init_video_mode(void);
|
|
||||||
void get_framebuffer_info(void);
|
|
||||||
void set_custom_video_mode(void);
|
|
||||||
// Helper functions
|
|
||||||
void print_error(const char* message);
|
|
||||||
void check_mmap_result(void* ptr, const char* filename);
|
|
||||||
void check_open_result(int fd, const char* filename);
|
|
||||||
void check_ioctl_result(int result, const char* func_name);
|
|
||||||
|
|
||||||
// Custom OS-specific structures
|
|
||||||
typedef struct {
|
|
||||||
int x, y;
|
|
||||||
int width, height;
|
|
||||||
uint32_t color;
|
|
||||||
void* address; // Address of the frame buffer
|
|
||||||
int pitch; // Pitch of the frame buffer
|
|
||||||
} Window;
|
|
||||||
|
|
||||||
#endif // GUI_H
|
|
@ -1,21 +0,0 @@
|
|||||||
#include "gui.h"
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
init_gui();
|
|
||||||
|
|
||||||
// Create a window
|
|
||||||
Window* win = create_window(50, 50, 100, 100, 0xFF0000);
|
|
||||||
|
|
||||||
// Draw something
|
|
||||||
draw_text("Hello, World!", 60, 60, 0xFFFFFF);
|
|
||||||
|
|
||||||
// Handle events
|
|
||||||
handle_events();
|
|
||||||
|
|
||||||
// Keep the program running
|
|
||||||
while (1) {
|
|
||||||
usleep(10000); // Sleep for 10ms
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,8 +1,6 @@
|
|||||||
#include "acpi.h"
|
#include "acpi.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
// Function prototypes (implementations below)
|
// Function prototypes (implementations below)
|
||||||
acpi_fadt_t *acpi_find_fadt();
|
acpi_fadt_t *acpi_find_fadt();
|
||||||
@ -15,7 +13,7 @@ acpi_fadt_t *acpi_find_fadt() {
|
|||||||
// Read the RSDP (Root System Description Pointer) signature and checksum
|
// Read the RSDP (Root System Description Pointer) signature and checksum
|
||||||
// at the ACPI base address.
|
// at the ACPI base address.
|
||||||
acpi_fadt_t *rsdp = (acpi_fadt_t *)ACPI_BASE;
|
acpi_fadt_t *rsdp = (acpi_fadt_t *)ACPI_BASE;
|
||||||
if (memcmp(&rsdp->signature, "RSDT", 4) != 0 && memcmp(&rsdp->signature, "XSDT", 4) != 0) {
|
if (rsdp->signature != *(uint32_t *)"RSDT" && rsdp->signature != *(uint32_t *)"XSDT") {
|
||||||
return NULL; // Not a valid ACPI signature
|
return NULL; // Not a valid ACPI signature
|
||||||
}
|
}
|
||||||
if (rsdp->checksum != 0) {
|
if (rsdp->checksum != 0) {
|
||||||
|
@ -3,10 +3,6 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifndef NULL
|
|
||||||
#define NULL ((void*)0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ACPI base address (replace with actual value)
|
// ACPI base address (replace with actual value)
|
||||||
#define ACPI_BASE 0xE0000000
|
#define ACPI_BASE 0xE0000000
|
||||||
|
|
||||||
|
@ -2,16 +2,5 @@ global LoadGDT
|
|||||||
|
|
||||||
section .text
|
section .text
|
||||||
LoadGDT:
|
LoadGDT:
|
||||||
|
LGDT [ESP + 32]
|
||||||
mov eax, [esp+4] ; Get the pointer to the GDT pointer structure
|
RET
|
||||||
lgdt [eax] ; Load the GDT
|
|
||||||
mov ax, 0x10 ; Set the kernel data segment selector
|
|
||||||
mov ds, ax
|
|
||||||
mov es, ax
|
|
||||||
mov fs, ax
|
|
||||||
mov gs, ax
|
|
||||||
mov ss, ax ; Set the kernel stack segment selector
|
|
||||||
jmp 0x08:.flush ; Flush the instruction cache
|
|
||||||
|
|
||||||
.flush:
|
|
||||||
ret
|
|
@ -38,6 +38,8 @@ enum GDT_BASE_LIMIT
|
|||||||
GDT_LIMIT_MASK = 0xFFFF
|
GDT_LIMIT_MASK = 0xFFFF
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern void LoadGDT(struct gdt_ptr* gdt);
|
||||||
|
|
||||||
// Initialize a GDT entry
|
// Initialize a GDT entry
|
||||||
void gdt_set_gate(uint32_t num, uint32_t base, uint32_t limit, uint8_t access,
|
void gdt_set_gate(uint32_t num, uint32_t base, uint32_t limit, uint8_t access,
|
||||||
uint8_t gran, struct gdt_entry *const gdt)
|
uint8_t gran, struct gdt_entry *const gdt)
|
||||||
@ -52,12 +54,13 @@ void gdt_set_gate(uint32_t num, uint32_t base, uint32_t limit, uint8_t access,
|
|||||||
gdt[num].access = access;
|
gdt[num].access = access;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern bool gdt_init(void)
|
void gdt_init()
|
||||||
{
|
{
|
||||||
// Set up GDT pointer
|
// Set up GDT pointer
|
||||||
struct gdt_ptr gp;
|
struct gdt_ptr gp;
|
||||||
gp.limit = (sizeof(struct gdt_entry) * 3) - 1;
|
gp.limit = (sizeof(struct gdt_entry) * 3) - 1;
|
||||||
gp.base = (uintptr_t)&gdt_entries[0];
|
//gdt = (struct gdt_entry *)malloc(sizeof(struct gdt_entry) * 3);
|
||||||
|
//memset(gdt, 0, sizeof(struct gdt_entry) * 3);
|
||||||
|
|
||||||
// Initialize GDT entries
|
// Initialize GDT entries
|
||||||
gdt_set_gate(0, 0, 0, 0, 0, &gdt_entries[0]); // Null segment
|
gdt_set_gate(0, 0, 0, 0, 0, &gdt_entries[0]); // Null segment
|
||||||
@ -65,23 +68,21 @@ extern bool gdt_init(void)
|
|||||||
gdt_set_gate(2, 0, 0xFFFFFFFF, 0x92, 0xCF, &gdt_entries[2]); // Data segment
|
gdt_set_gate(2, 0, 0xFFFFFFFF, 0x92, 0xCF, &gdt_entries[2]); // Data segment
|
||||||
|
|
||||||
// Load GDT
|
// Load GDT
|
||||||
LoadGDT(&gp);
|
struct gdt_ptr gdtp;
|
||||||
|
gdtp.limit = gp.limit;
|
||||||
|
gdtp.base = (uintptr_t)gdt;
|
||||||
|
|
||||||
// Switch to protected mode
|
LoadGDT(&gdtp);
|
||||||
__asm__ volatile(
|
|
||||||
"movw $0x10, %%ax\n\t"
|
|
||||||
"movw %%ax, %%ds\n\t"
|
|
||||||
"movw %%ax, %%es\n\t"
|
|
||||||
"movw %%ax, %%fs\n\t"
|
|
||||||
"movw %%ax, %%gs\n\t"
|
|
||||||
"movw %%ax, %%ss\n\t"
|
|
||||||
"ljmp $0x08, $1f\n\t"
|
|
||||||
"1:\n\t"
|
|
||||||
:
|
|
||||||
:
|
|
||||||
: "ax");
|
|
||||||
|
|
||||||
return true; // Indicate successful GDT initialization
|
/*
|
||||||
|
__asm__ volatile("mov $0x10, %ax\n\t"
|
||||||
|
"mov %ax, %ds\n\t"
|
||||||
|
"mov %ax, %es\n\t"
|
||||||
|
"mov %ax, %fs\n\t"
|
||||||
|
"mov %ax, %gs\n\t"
|
||||||
|
"ljmp $0x08, $next_label\n\t"
|
||||||
|
"next_label:");
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exception handlers
|
// Exception handlers
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
// gdt.h
|
||||||
#ifndef GDT_H
|
#ifndef GDT_H
|
||||||
#define GDT_H
|
#define GDT_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// GDT entry structure
|
// GDT entry structure
|
||||||
@ -10,20 +10,20 @@ struct gdt_entry
|
|||||||
uint16_t limit_low; // The lower 16 bits of the limit
|
uint16_t limit_low; // The lower 16 bits of the limit
|
||||||
uint16_t base_low; // The lower 16 bits of the base
|
uint16_t base_low; // The lower 16 bits of the base
|
||||||
uint8_t base_middle; // The next 8 bits of the base
|
uint8_t base_middle; // The next 8 bits of the base
|
||||||
uint8_t access; // Access flags, determine what ring this segment can be used in
|
uint8_t
|
||||||
uint8_t granularity; // Granularity
|
access; // Access flags, determine what ring this segment can be used in
|
||||||
|
uint8_t granularity;
|
||||||
uint8_t base_high; // The last 8 bits of the base
|
uint8_t base_high; // The last 8 bits of the base
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
// GDT pointer structure
|
// GDT pointer structure
|
||||||
struct gdt_ptr {
|
struct gdt_ptr
|
||||||
uint16_t limit;
|
{
|
||||||
uintptr_t base;
|
uint16_t limit; // The upper 16 bits of all selector limits
|
||||||
|
uint32_t base; // The address of the first gdt_entry_t struct
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
// Function prototypes
|
// Initialize the GDT
|
||||||
extern bool gdt_init(void);
|
void gdt_init();
|
||||||
extern bool init_gdt(void);
|
|
||||||
void LoadGDT(struct gdt_ptr *gdt); // External declaration of LoadGDT
|
|
||||||
|
|
||||||
#endif // GDT_H
|
#endif
|
@ -1,10 +1,12 @@
|
|||||||
global LoadIDT ; Declare function as global
|
global LoadIDT ; Declare function as global
|
||||||
|
|
||||||
section .data
|
_offset idt db 0
|
||||||
idt_offset db 0
|
|
||||||
section .text ; Code section
|
section .text ; Code section
|
||||||
|
|
||||||
|
%include "idt.h"
|
||||||
|
|
||||||
LoadIDT:
|
LoadIDT:
|
||||||
mov eax, [esp + 4] ; Get IDT address
|
mov eax, [esp + 4] ; Get IDT address (ensure offset idt is defined)
|
||||||
lidt [eax] ; Load IDT
|
LIDT [eax] ; Load timer interrupt entry (check for correct brackets)
|
||||||
ret ; Return from function
|
RET ; Return from function
|
@ -13,35 +13,20 @@ void TimerInterruptHandler()
|
|||||||
timer_count++;
|
timer_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
union interrupt_handler_union {
|
|
||||||
void (*handler)();
|
|
||||||
struct {
|
|
||||||
uint16_t low;
|
|
||||||
uint16_t high;
|
|
||||||
} parts;
|
|
||||||
};
|
|
||||||
// Initialize the IDT
|
// Initialize the IDT
|
||||||
bool InitializeIDT()
|
void InitializeIDT()
|
||||||
{
|
{
|
||||||
union interrupt_handler_union keyboard_handler;
|
idt[KEYBOARD_INTERRUPT].base_lo = ((uint16_t *)KeyboardInterruptHandler)[0];
|
||||||
keyboard_handler.handler = KeyboardInterruptHandler;
|
|
||||||
|
|
||||||
idt[KEYBOARD_INTERRUPT].base_lo = keyboard_handler.parts.low;
|
|
||||||
idt[KEYBOARD_INTERRUPT].sel = 0x08;
|
idt[KEYBOARD_INTERRUPT].sel = 0x08;
|
||||||
idt[KEYBOARD_INTERRUPT].always0 = 0x00;
|
idt[KEYBOARD_INTERRUPT].always0 = 0x00;
|
||||||
idt[KEYBOARD_INTERRUPT].flags = 0x8E;
|
idt[KEYBOARD_INTERRUPT].flags = 0x8E;
|
||||||
idt[KEYBOARD_INTERRUPT].base_hi = keyboard_handler.parts.high;
|
idt[KEYBOARD_INTERRUPT].base_hi = ((uint16_t *)KeyboardInterruptHandler)[1];
|
||||||
|
|
||||||
union interrupt_handler_union timer_handler;
|
idt[0x33].base_lo = (uint16_t)TimerInterruptHandler;
|
||||||
timer_handler.handler = TimerInterruptHandler;
|
|
||||||
|
|
||||||
idt[0x33].base_lo = timer_handler.parts.low;
|
|
||||||
idt[0x33].sel = 0x08;
|
idt[0x33].sel = 0x08;
|
||||||
idt[0x33].always0 = 0x00;
|
idt[0x33].always0 = 0x00;
|
||||||
idt[0x33].flags = 0x8E;
|
idt[0x33].flags = 0x8E;
|
||||||
idt[0x33].base_hi = timer_handler.parts.high;
|
idt[0x33].base_hi = (uint16_t)TimerInterruptHandler >> 16;
|
||||||
|
|
||||||
LoadIDT(&idt[0]);
|
LoadIDT(&idt[0]);
|
||||||
|
|
||||||
return true; // Assuming initialization always succeeds
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#define IDT_H
|
#define IDT_H
|
||||||
|
|
||||||
#include "include/types.h"
|
#include "include/types.h"
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define IDT_ENTRY_SIZE 16
|
#define IDT_ENTRY_SIZE 16
|
||||||
|
|
||||||
@ -10,16 +9,6 @@
|
|||||||
#error "idt_entry structure size mismatch!"
|
#error "idt_entry structure size mismatch!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct idt_regs {
|
|
||||||
uint16_t cs;
|
|
||||||
uint16_t ip;
|
|
||||||
uint32_t flags;
|
|
||||||
uint32_t esp;
|
|
||||||
uint16_t ss;
|
|
||||||
uint16_t eip;
|
|
||||||
uint32_t cr2;
|
|
||||||
};
|
|
||||||
|
|
||||||
// IDT entry structure
|
// IDT entry structure
|
||||||
struct idt_entry
|
struct idt_entry
|
||||||
{
|
{
|
||||||
@ -33,14 +22,11 @@ struct idt_entry
|
|||||||
extern struct idt_entry idt[256];
|
extern struct idt_entry idt[256];
|
||||||
|
|
||||||
// Initialize the IDT
|
// Initialize the IDT
|
||||||
bool InitializeIDT();
|
void InitializeIDT();
|
||||||
|
|
||||||
extern void KeyboardInterruptHandler();
|
extern void KeyboardInterruptHandler();
|
||||||
extern void TimerInterruptHandler();
|
extern void TimerInterruptHandler();
|
||||||
|
|
||||||
extern void LoadIDT(struct idt_entry *entry);
|
extern void LoadIDT(struct idt_entry *entry);
|
||||||
|
|
||||||
void divide_error(struct idt_regs *regs);
|
|
||||||
void page_fault(struct idt_regs *regs);
|
|
||||||
|
|
||||||
#endif /* IDT_H */
|
#endif /* IDT_H */
|
||||||
|
@ -10,16 +10,4 @@ void kfree(void *ptr);
|
|||||||
void *malloc(size_t size); // Adding malloc and free declarations
|
void *malloc(size_t size); // Adding malloc and free declarations
|
||||||
void free(void *ptr);
|
void free(void *ptr);
|
||||||
|
|
||||||
extern char KERNEL_HEAP_START;
|
|
||||||
extern char KERNEL_HEAP_END;
|
|
||||||
|
|
||||||
// User heap boundaries
|
|
||||||
extern char USER_HEAP_START;
|
|
||||||
extern char USER_HEAP_END;
|
|
||||||
|
|
||||||
extern char _kernel_heap_start; // Defined by the linker script
|
|
||||||
|
|
||||||
#define KERNEL_HEAP_START (&_kernel_heap_start)
|
|
||||||
#define KERNEL_HEAP_END (KERNEL_HEAP_START + 0x100000) // Adjust the size as needed
|
|
||||||
|
|
||||||
#endif /* MEMORY_H */
|
#endif /* MEMORY_H */
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
#include "types.h"
|
#include "./types.h"
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
// Utility function to set a GDT entry
|
void gdt_set_entry(gdt_entry_t *entry, uint32_t base, uint32_t limit,
|
||||||
void gdt_set_entry(gdt_entry_t *entry, uint32_t base, uint32_t limit, uint8_t access, uint8_t flags) {
|
uint16_t flags)
|
||||||
entry->limit_low = limit & 0xFFFF;
|
{
|
||||||
entry->base_low = base & 0xFFFF;
|
entry->base = base;
|
||||||
entry->base_middle = (base >> 16) & 0xFF;
|
entry->limit = limit;
|
||||||
entry->access = access;
|
entry->flags = flags;
|
||||||
entry->limit_high = (limit >> 16) & 0x0F;
|
}
|
||||||
entry->flags = flags & 0x0F;
|
|
||||||
entry->base_high = (base >> 24) & 0xFF;
|
void idt_set_entry(idt_entry_t *entry, uint32_t base, uint16_t selector,
|
||||||
}
|
uint16_t flags)
|
||||||
|
{
|
||||||
// Utility function to set an IDT entry
|
entry->base_low = base & 0xFFFF;
|
||||||
void idt_set_entry(idt_entry_t *entry, uint32_t base, uint16_t selector, uint16_t flags) {
|
entry->base_high = (base >> 16) & 0xFFFF;
|
||||||
entry->offset_low = base & 0xFFFF;
|
entry->selector = selector;
|
||||||
entry->segment = selector;
|
|
||||||
entry->reserved = 0;
|
|
||||||
entry->flags = flags;
|
entry->flags = flags;
|
||||||
entry->offset_high = (base >> 16) & 0xFFFF;
|
|
||||||
}
|
}
|
||||||
|
@ -1,34 +1,24 @@
|
|||||||
#ifndef TYPES_H
|
#ifndef TYPES_H
|
||||||
#define TYPES_H
|
#define TYPES_H
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
// Basic integer types
|
|
||||||
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
||||||
typedef unsigned short uint16_t;
|
typedef unsigned short uint16_t;
|
||||||
typedef unsigned int uint32_t;
|
typedef unsigned int uint32_t;
|
||||||
|
|
||||||
// Attribute for packed structures
|
typedef struct
|
||||||
#define PACKED_ATTRIBUTE __attribute__((packed))
|
{
|
||||||
|
uint32_t base;
|
||||||
|
uint32_t limit;
|
||||||
|
uint16_t flags;
|
||||||
|
} gdt_entry_t;
|
||||||
|
|
||||||
// Structure for GDT entries
|
typedef struct
|
||||||
typedef struct {
|
{
|
||||||
uint16_t limit_low; // Limit lower 16 bits
|
uint16_t base_low;
|
||||||
uint16_t base_low; // Base address lower 16 bits
|
uint16_t selector;
|
||||||
uint8_t base_middle; // Base address middle 8 bits
|
uint8_t zero;
|
||||||
uint8_t access; // Access flags
|
uint8_t flags;
|
||||||
uint8_t limit_high : 4; // Limit upper 4 bits
|
uint16_t base_high;
|
||||||
uint8_t flags : 4; // Flags (4 bits)
|
} __attribute__((packed)) idt_entry_t;
|
||||||
uint8_t base_high; // Base address upper 8 bits
|
|
||||||
} PACKED_ATTRIBUTE gdt_entry_t;
|
|
||||||
|
|
||||||
// Structure for IDT entries
|
#endif /* TYPES_H */
|
||||||
typedef struct {
|
|
||||||
uint16_t offset_low; // Offset lower 16 bits
|
|
||||||
uint16_t segment; // Segment selector
|
|
||||||
uint8_t reserved; // Reserved
|
|
||||||
uint8_t flags; // Flags
|
|
||||||
uint16_t offset_high; // Offset upper 16 bits
|
|
||||||
} PACKED_ATTRIBUTE idt_entry_t;
|
|
||||||
|
|
||||||
#endif // TYPES_H
|
|
@ -9,7 +9,7 @@
|
|||||||
#define PAGE_SIZE 4096
|
#define PAGE_SIZE 4096
|
||||||
typedef struct memory_region_t
|
typedef struct memory_region_t
|
||||||
{
|
{
|
||||||
uintptr_t start_address; // Changed from void* to uintptr_t
|
void *start_address;
|
||||||
size_t size;
|
size_t size;
|
||||||
} memory_region_t;
|
} memory_region_t;
|
||||||
|
|
||||||
@ -19,9 +19,6 @@ size_t num_allocated_regions;
|
|||||||
|
|
||||||
jmp_buf page_fault_buffer;
|
jmp_buf page_fault_buffer;
|
||||||
|
|
||||||
extern memory_region_t *allocated_regions;
|
|
||||||
extern size_t num_allocated_regions;
|
|
||||||
|
|
||||||
void DivideByZero()
|
void DivideByZero()
|
||||||
{
|
{
|
||||||
// Add logic to handle Divide By Zero Exception
|
// Add logic to handle Divide By Zero Exception
|
||||||
@ -50,14 +47,12 @@ void DoubleFault()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Function to check if address is within allocated memory (example)
|
// Function to check if address is within allocated memory (example)
|
||||||
int IsAddressInRange(uintptr_t address) // Changed from uint16_t to uintptr_t
|
int IsAddressInRange(uint16_t address)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < num_allocated_regions; ++i)
|
for (size_t i = 0; i < num_allocated_regions; ++i)
|
||||||
{
|
{
|
||||||
uintptr_t region_start = allocated_regions[i].start_address;
|
if ((address >= allocated_regions[i].start_address) &&
|
||||||
uintptr_t region_end = region_start + allocated_regions[i].size;
|
(address < (allocated_regions[i].start_address + allocated_regions[i].size)))
|
||||||
|
|
||||||
if (address >= region_start && address < region_end)
|
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
#ifndef EXCEPTIONS_H
|
#ifndef EXCEPTIONS_H
|
||||||
#define EXCEPTIONS_H
|
#define EXCEPTIONS_H
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
void DivideByZero();
|
void DivideByZero();
|
||||||
|
|
||||||
void DoubleFault();
|
void DoubleFault();
|
||||||
|
|
||||||
void PageFault(uint16_t fault_address);
|
void PageFault();
|
||||||
|
|
||||||
void GeneralProtectionFault();
|
void GeneralProtectionFault();
|
||||||
|
|
||||||
|
@ -1,36 +1,20 @@
|
|||||||
#include "isr.h"
|
#include "isr.h"
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
static bool initialized = false;
|
|
||||||
|
|
||||||
// Declaration of save_state()
|
|
||||||
void save_state(void);
|
|
||||||
|
|
||||||
// Declaration of kernel_panic_or_recover()
|
|
||||||
void kernel_panic_or_recover(void);
|
|
||||||
|
|
||||||
void isr_handler(struct isr_regs regs) {
|
void isr_handler(struct isr_regs regs) {
|
||||||
if (!initialized) {
|
|
||||||
// Initialization logic
|
|
||||||
printf("Initializing ISR...\n");
|
|
||||||
|
|
||||||
// Clear all interrupt flags
|
|
||||||
clear_interrupt(DIVIDE_BY_ZERO_INTERRUPT);
|
|
||||||
clear_interrupt(DOUBLE_FAULT_INTERRUPT);
|
|
||||||
clear_interrupt(PAGE_FAULT_INTERRUPT);
|
|
||||||
clear_interrupt(GENERAL_PROTECTION_FAULT_INTERRUPT);
|
|
||||||
|
|
||||||
initialized = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(regs.int_no) {
|
switch(regs.int_no) {
|
||||||
case DIVIDE_BY_ZERO_INTERRUPT:
|
case DIVIDE_BY_ZERO_INTERRUPT:
|
||||||
// Handle Divide By Zero Interrupt
|
// Handle Divide By Zero Interrupt
|
||||||
printf("Divide by zero error occurred!\n");
|
|
||||||
save_state();
|
|
||||||
kernel_panic_or_recover();
|
|
||||||
break;
|
break;
|
||||||
// Add cases for other interrupts...
|
case DOUBLE_FAULT_INTERRUPT:
|
||||||
|
// Handle Double Fault Interrupt
|
||||||
|
break;
|
||||||
|
case PAGE_FAULT_INTERRUPT:
|
||||||
|
// Handle Page Fault Interrupt
|
||||||
|
break;
|
||||||
|
case GENERAL_PROTECTION_FAULT_INTERRUPT:
|
||||||
|
// Handle General Protection Fault Interrupt
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// Handle other interrupts or implement error handling
|
// Handle other interrupts or implement error handling
|
||||||
break;
|
break;
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
#define ISR_H
|
#define ISR_H
|
||||||
|
|
||||||
#include "../include/types.h"
|
#include "../include/types.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
enum ISR_Vector
|
enum ISR_Vector
|
||||||
{
|
{
|
||||||
EXCEPTION_START = 0x00,
|
EXCEPTION_START = 0x00,
|
||||||
DIVIDE_BY_ZERO_INTERRUPT = 0x0,
|
DIVIDE_BY_ZERO_INTERRUPT = 0x00,
|
||||||
DOUBLE_FAULT_INTERRUPT = 0x8,
|
DOUBLE_FAULT_INTERRUPT = 0x08,
|
||||||
PAGE_FAULT_INTERRUPT = 0xE,
|
PAGE_FAULT_INTERRUPT = 0x0E,
|
||||||
GENERAL_PROTECTION_FAULT_INTERRUPT = 0xD,
|
GENERAL_PROTECTION_FAULT_INTERRUPT = 0x0D,
|
||||||
EXCEPTION_END = 0x1F,
|
EXCEPTION_END = 0x1F,
|
||||||
HARDWARE_START = 0x20,
|
HARDWARE_START = 0x20,
|
||||||
TIMER_INTERRUPT = 0x20,
|
TIMER_INTERRUPT = 0x20,
|
||||||
@ -27,18 +28,23 @@ struct isr_regs
|
|||||||
uint32_t gs, fs, es, ds; // Segment selectors
|
uint32_t gs, fs, es, ds; // Segment selectors
|
||||||
uint32_t edi, esi, ebp, esp; // Pushed by pusha instruction
|
uint32_t edi, esi, ebp, esp; // Pushed by pusha instruction
|
||||||
uint32_t ebx, edx, ecx, eax; // Pushed by the interrupt handler
|
uint32_t ebx, edx, ecx, eax; // Pushed by the interrupt handler
|
||||||
uint32_t int_no, err_code; // Interrupt number and error code (if applicable)
|
uint32_t int_no,
|
||||||
uint32_t eip, cs, eflags, esp_at_signal; // Pushed by the processor automatically
|
err_code; // Interrupt number and error code (if applicable)
|
||||||
|
uint32_t eip, cs, eflags,
|
||||||
|
esp_at_signal; // Pushed by the processor automatically
|
||||||
};
|
};
|
||||||
|
|
||||||
void clear_interrupt(uint32_t interrupt_id)
|
void isr_handler(struct isr_regs regs);
|
||||||
|
// Structure for storing register values during an ISR
|
||||||
|
struct idt_regs
|
||||||
{
|
{
|
||||||
// Assuming interrupt_id maps to a specific bit in an interrupt control register
|
uint32_t ds; // Data segment selector
|
||||||
// For example, if DIVIDE_BY_ZERO_INTERRUPT corresponds to bit 0 in a register at address 0x12345678
|
uint32_t edi, esi, ebp, esp, ebx, edx, ecx,
|
||||||
uint32_t *interrupt_control_register = (uint32_t *)0x12345678;
|
eax; // Pushed by pusha instruction
|
||||||
*interrupt_control_register &= ~(1 << interrupt_id);
|
uint32_t int_no,
|
||||||
}
|
err_code; // Interrupt number and error code (if applicable)
|
||||||
|
uint32_t eip, cs, eflags, useresp,
|
||||||
extern void isr_handler(struct isr_regs regs);
|
ss; // Pushed by the processor automatically
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* ISR_H */
|
#endif /* ISR_H */
|
||||||
|
@ -1,162 +1,93 @@
|
|||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "../kernel/malloc/kmalloc.h"
|
|
||||||
#include "../kernel/malloc/malloc.h"
|
|
||||||
#include "./arch/x86/gdt.h"
|
#include "./arch/x86/gdt.h"
|
||||||
#include "./arch/x86/idt.h"
|
#include "../kernel/malloc/malloc.h"
|
||||||
|
#include "../kernel/malloc/kmalloc.h"
|
||||||
#include "./arch/x86/include/memory.h"
|
#include "./arch/x86/include/memory.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
// Debug levels
|
#define VGA_ADDRESS 0xB8000
|
||||||
typedef enum
|
#define VGA_WIDTH 80
|
||||||
{
|
#define VGA_HEIGHT 25
|
||||||
DEBUG_BASIC = 1,
|
#define VGA_COLOR_BLACK 0x0
|
||||||
DEBUG_DETAILED = 2
|
#define VGA_COLOR_WHITE 0xF
|
||||||
} debug_level_t;
|
|
||||||
|
|
||||||
// Error codes
|
uint16_t* const VGA_MEMORY = (uint16_t*) VGA_ADDRESS;
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
ERR_GDT_INIT = 1,
|
|
||||||
ERR_IDT_INIT,
|
|
||||||
ERR_KERNEL_HEAP_INIT,
|
|
||||||
ERR_USER_HEAP_INIT
|
|
||||||
} error_code_t;
|
|
||||||
|
|
||||||
#define USER_HEAP_START ((uintptr_t)0x10000000) // Example address
|
void clear_screen() {
|
||||||
#define USER_HEAP_END ((uintptr_t)0x20000000) // Example address
|
for (int i = 0; i < VGA_WIDTH * VGA_HEIGHT; i++) {
|
||||||
|
VGA_MEMORY[i] = ((uint16_t)VGA_COLOR_BLACK << 8) | ' ';
|
||||||
// Function prototypes
|
|
||||||
static void log_message(const char *message, debug_level_t level);
|
|
||||||
bool init_gdt();
|
|
||||||
|
|
||||||
bool initialize_idt(void);
|
|
||||||
int init_kernel_heap(void *start, void *end);
|
|
||||||
int init_user_heap(void *start, void *end);
|
|
||||||
static void kernel_panic(const char *message, int error_code);
|
|
||||||
extern bool (*gdt_init_ptr)(void) = (bool (*)(void))gdt_init;
|
|
||||||
|
|
||||||
debug_level_t DEBUG_LEVEL = DEBUG_BASIC;
|
|
||||||
|
|
||||||
static void log_message(const char *message, debug_level_t level)
|
|
||||||
{
|
|
||||||
if (level <= DEBUG_LEVEL)
|
|
||||||
{
|
|
||||||
printf("[LOG] %s\n", message);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern bool gdt_init(void)
|
void print(const char* message) {
|
||||||
{
|
static int row = 0;
|
||||||
log_message("Initializing GDT...", 1);
|
static int col = 0;
|
||||||
if (!init_gdt())
|
for (size_t i = 0; message[i] != '\0'; i++) {
|
||||||
{
|
if (col >= VGA_WIDTH || message[i] == '\n') {
|
||||||
log_message("Failed to initialize GDT!", 2);
|
row++;
|
||||||
return false;
|
col = 0;
|
||||||
}
|
}
|
||||||
log_message("GDT initialized successfully.", 1);
|
if (row >= VGA_HEIGHT) {
|
||||||
return true;
|
clear_screen();
|
||||||
|
row = 0;
|
||||||
}
|
}
|
||||||
|
if (message[i] != '\n') {
|
||||||
bool init_gdt()
|
VGA_MEMORY[row * VGA_WIDTH + col] = ((uint16_t)VGA_COLOR_WHITE << 8) | message[i];
|
||||||
{
|
col++;
|
||||||
// Implementation of init_gdt()
|
|
||||||
// This is just a placeholder, you'll need to implement the actual GDT initialization logic
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool initialize_idt(void)
|
|
||||||
{
|
|
||||||
// Implement your IDT initialization logic here
|
|
||||||
// This is just a placeholder implementation
|
|
||||||
log_message("Initializing IDT...", DEBUG_DETAILED);
|
|
||||||
|
|
||||||
// Your IDT initialization code goes here
|
|
||||||
// For example:
|
|
||||||
// - Set up IDT entries
|
|
||||||
// - Load the IDT using lidt instruction
|
|
||||||
|
|
||||||
// For now, let's assume it always succeeds
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool InitializeIDT()
|
|
||||||
{
|
|
||||||
log_message("Initializing IDT...", 1);
|
|
||||||
if (!initialize_idt())
|
|
||||||
{
|
|
||||||
log_message("Failed to initialize IDT!", 2);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
log_message("IDT initialized successfully.", 1);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
int init_kernel_heap(void *start, void *end)
|
|
||||||
{
|
|
||||||
log_message("Initializing kernel heap...", 1);
|
|
||||||
// Implementation here
|
|
||||||
// For now, let's assume it always succeeds
|
|
||||||
log_message("Kernel heap initialized successfully.", 1);
|
|
||||||
return 0; // Return 0 for success
|
|
||||||
}
|
|
||||||
|
|
||||||
int init_user_heap(void *start, void *end)
|
|
||||||
{
|
|
||||||
log_message("Initializing user heap...", 1);
|
|
||||||
// Implementation here
|
|
||||||
// For now, let's assume it always succeeds
|
|
||||||
log_message("User heap initialized successfully.", 1);
|
|
||||||
return 0; // Return 0 for success
|
|
||||||
}
|
|
||||||
|
|
||||||
static void kernel_panic(const char *message, int error_code)
|
|
||||||
{
|
|
||||||
printf("KERNEL PANIC: %s (Error code: %d)\n", message, error_code);
|
|
||||||
// Implement any necessary error handling or system halt procedures
|
|
||||||
while (1)
|
|
||||||
{ /* Halt the system */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
void init_memory_management() {
|
||||||
{
|
// Placeholder for actual implementation
|
||||||
log_message("Starting kernel initialization...", 1);
|
|
||||||
|
|
||||||
if (!gdt_init())
|
|
||||||
{
|
|
||||||
log_message("Initialization failed - exiting.", 2);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!InitializeIDT())
|
void init_devices() {
|
||||||
{
|
// Placeholder for actual implementation
|
||||||
log_message("Initialization failed - exiting.", 2);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (init_kernel_heap((void *)KERNEL_HEAP_START, (void *)KERNEL_HEAP_END) != 0)
|
void early_init() {
|
||||||
{
|
// ... other early initialization tasks
|
||||||
log_message("Kernel heap initialization failed - exiting.", 2);
|
init_kernel_heap((void*)KERNEL_HEAP_START, (void*)KERNEL_HEAP_END);
|
||||||
return 1;
|
// Initialize GDT
|
||||||
|
gdt_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (init_user_heap((void* )USER_HEAP_START, (void* )USER_HEAP_END) != 0)
|
void kernel_main() {
|
||||||
{
|
clear_screen();
|
||||||
log_message("User heap initialization failed - exiting.", 2);
|
print("Welcome to ClassicOS!");
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
log_message("Kernel initialization completed successfully.", 1);
|
// Initialize memory management
|
||||||
|
init_memory_management();
|
||||||
|
|
||||||
// Enter the main kernel loop or start the shell
|
// Initialize user-space heap (example)
|
||||||
while (1)
|
void* user_heap_start = /* address of user-space heap start */;
|
||||||
{
|
void* user_heap_end = /* address of user-space heap end */;
|
||||||
// Kernel loop or shell code
|
init_heap(user_heap_start, user_heap_end);
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
// Initialize kernel heap (example)
|
||||||
|
void* kernel_heap_start = /* address of kernel heap start */;
|
||||||
|
void* kernel_heap_end = /* address of kernel heap end */;
|
||||||
|
init_kernel_heap(kernel_heap_start, kernel_heap_end);
|
||||||
|
|
||||||
|
// Initialize devices
|
||||||
|
init_devices();
|
||||||
|
|
||||||
|
// Infinite loop to keep the kernel running
|
||||||
|
while (1) {
|
||||||
|
// Handle any pending interrupts
|
||||||
|
handle_interrupts();
|
||||||
|
|
||||||
|
// Schedule the next process to run
|
||||||
|
schedule_next_process();
|
||||||
|
|
||||||
|
// Perform deferred work from interrupts or system calls
|
||||||
|
process_deferred_work();
|
||||||
|
|
||||||
|
// Handle system calls from user-space applications
|
||||||
|
handle_system_calls();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
#ifndef KERNEL_H
|
#ifndef KERNEL_H
|
||||||
#define KERNEL_H
|
#define KERNEL_H
|
||||||
|
|
||||||
#include "kernel.h"
|
|
||||||
|
|
||||||
extern void* kernel_heap_start;
|
|
||||||
extern void* kernel_heap_end;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -7,13 +7,6 @@ PHDRS {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS {
|
SECTIONS {
|
||||||
|
|
||||||
.kernelheap (0x100000) : /* Assuming kernel heap starts at 1MB */
|
|
||||||
{
|
|
||||||
_kernel_heap_start = .; /* Define symbol at the start of the section */
|
|
||||||
*(kernel.o) /* Include kernel object file in this section */
|
|
||||||
}
|
|
||||||
|
|
||||||
. = 0xC0000000; /* Starting virtual address */
|
. = 0xC0000000; /* Starting virtual address */
|
||||||
|
|
||||||
/* Text Section */
|
/* Text Section */
|
||||||
|
@ -1,13 +1,4 @@
|
|||||||
#include "kmalloc.h"
|
#include "kmalloc.h"
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#define HEAP_MAGIC 0x123456789ABCDEF0
|
|
||||||
|
|
||||||
static void *kernel_heap_start; // Start of the kernel heap
|
static void *kernel_heap_start; // Start of the kernel heap
|
||||||
static void *kernel_heap_end; // End of the kernel heap
|
static void *kernel_heap_end; // End of the kernel heap
|
||||||
@ -19,17 +10,6 @@ struct memory_block
|
|||||||
struct memory_block *next;
|
struct memory_block *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
size_t size;
|
|
||||||
bool is_free;
|
|
||||||
uint64_t magic; // For integrity checking
|
|
||||||
} block_meta_t;
|
|
||||||
|
|
||||||
static void *heap_start;
|
|
||||||
static void *heap_end;
|
|
||||||
static block_meta_t *free_list;
|
|
||||||
|
|
||||||
void mark_as_used_kernel(void *ptr, size_t size)
|
void mark_as_used_kernel(void *ptr, size_t size)
|
||||||
{
|
{
|
||||||
// Since we're using a linked list, there's no specific action needed
|
// Since we're using a linked list, there's no specific action needed
|
||||||
@ -54,96 +34,17 @@ void mark_as_free_kernel(void *ptr)
|
|||||||
free_blocks = block;
|
free_blocks = block;
|
||||||
}
|
}
|
||||||
|
|
||||||
int init_kernel_heap(void *start, void *end)
|
void init_kernel_heap(void *start, void *end)
|
||||||
{
|
{
|
||||||
if (start >= end)
|
kernel_heap_start = start;
|
||||||
{
|
kernel_heap_end = end;
|
||||||
return -1; // Invalid range
|
|
||||||
}
|
|
||||||
|
|
||||||
heap_start = start;
|
free_blocks = (struct memory_block *)start;
|
||||||
heap_end = end;
|
free_blocks->size = (size_t)(end - start);
|
||||||
size_t total_size = (char *)end - (char *)start;
|
free_blocks->next = NULL;
|
||||||
|
|
||||||
if (total_size < sizeof(block_meta_t))
|
// You'll need to replace this placeholder with logic to split the
|
||||||
{
|
// initial block into smaller ones based on your requirements.
|
||||||
return -2; // Heap too small
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize the first block
|
|
||||||
block_meta_t *first_block = (block_meta_t *)start;
|
|
||||||
first_block->size = total_size - sizeof(block_meta_t);
|
|
||||||
first_block->is_free = true;
|
|
||||||
first_block->magic = HEAP_MAGIC;
|
|
||||||
|
|
||||||
// Initialize the free list with the first block
|
|
||||||
free_list = first_block;
|
|
||||||
|
|
||||||
return 0; // Success
|
|
||||||
}
|
|
||||||
|
|
||||||
void *kmalloc(size_t size)
|
|
||||||
{
|
|
||||||
block_meta_t *current = free_list;
|
|
||||||
|
|
||||||
while (current) {
|
|
||||||
if (current->magic != HEAP_MAGIC) {
|
|
||||||
// Heap corruption detected
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (current->is_free && current->size >= size) {
|
|
||||||
// Found a suitable block
|
|
||||||
if (current->size > size + sizeof(block_meta_t)) {
|
|
||||||
// Split the block
|
|
||||||
block_meta_t *new_block = (block_meta_t*)((char*)current + sizeof(block_meta_t) + size);
|
|
||||||
new_block->size = current->size - size - sizeof(block_meta_t);
|
|
||||||
new_block->is_free = true;
|
|
||||||
new_block->magic = HEAP_MAGIC;
|
|
||||||
|
|
||||||
current->size = size;
|
|
||||||
}
|
|
||||||
|
|
||||||
current->is_free = false;
|
|
||||||
return (void*)((char*)current + sizeof(block_meta_t));
|
|
||||||
}
|
|
||||||
|
|
||||||
current = (block_meta_t*)((char*)current + sizeof(block_meta_t) + current->size);
|
|
||||||
|
|
||||||
if ((void*)current >= heap_end) {
|
|
||||||
break; // Reached end of heap
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// No suitable block found
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void kfree(void *ptr)
|
|
||||||
{
|
|
||||||
if (!ptr)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
block_meta_t *block_meta = (block_meta_t *)((char *)ptr - sizeof(block_meta_t));
|
|
||||||
|
|
||||||
if (block_meta->magic != HEAP_MAGIC)
|
|
||||||
{
|
|
||||||
// Invalid free or heap corruption
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
block_meta->is_free = true;
|
|
||||||
|
|
||||||
// Coalesce with next block if it's free
|
|
||||||
block_meta_t *next_block = (block_meta_t *)((char *)block_meta + sizeof(block_meta_t) + block_meta->size);
|
|
||||||
if ((void *)next_block < heap_end && next_block->is_free)
|
|
||||||
{
|
|
||||||
block_meta->size += sizeof(block_meta_t) + next_block->size;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Implement coalescing with previous block
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void *find_free_kernel_block(size_t size)
|
void *find_free_kernel_block(size_t size)
|
||||||
@ -162,3 +63,46 @@ void *find_free_kernel_block(size_t size)
|
|||||||
// No suitable block found
|
// No suitable block found
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *kmalloc(size_t size)
|
||||||
|
{
|
||||||
|
if (kernel_heap_start == NULL || kernel_heap_end == NULL)
|
||||||
|
{
|
||||||
|
// Kernel heap not initialized, cannot allocate
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Align the size to the word size for efficiency
|
||||||
|
size += sizeof(size_t) - 1;
|
||||||
|
size &= ~(sizeof(size_t) - 1);
|
||||||
|
|
||||||
|
// Search for a free block of sufficient size
|
||||||
|
void *block = find_free_kernel_block(size);
|
||||||
|
if (block != NULL)
|
||||||
|
{
|
||||||
|
// Mark the block as used
|
||||||
|
mark_as_used_kernel(block, size);
|
||||||
|
|
||||||
|
// This is a placeholder for splitting the block if necessary
|
||||||
|
// You'll need to implement logic to potentially split the block
|
||||||
|
// into a used part of size 'size' and a remaining free block
|
||||||
|
// if the block size is significantly larger than 'size'.
|
||||||
|
|
||||||
|
return block;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No suitable block found, out of memory
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void kfree(void *ptr)
|
||||||
|
{
|
||||||
|
if (ptr == NULL)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mark the block as free
|
||||||
|
// This is a placeholder for the actual algorithm
|
||||||
|
mark_as_free_kernel(ptr);
|
||||||
|
}
|
||||||
|
@ -12,8 +12,8 @@ typedef struct {
|
|||||||
} heap_block_t;
|
} heap_block_t;
|
||||||
|
|
||||||
// Function prototypes
|
// Function prototypes
|
||||||
int init_kernel_heap(void* start, void* end);
|
void init_kernel_heap(void* start, void* end);
|
||||||
int init_user_heap(void* start, void *end);
|
void init_user_heap(void* start, void* end);
|
||||||
void* kmalloc(size_t size);
|
void* kmalloc(size_t size);
|
||||||
void kfree(void* ptr);
|
void kfree(void* ptr);
|
||||||
|
|
||||||
|
@ -1,63 +1,29 @@
|
|||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
#include <stdint.h> // For uintptr_t
|
|
||||||
|
|
||||||
static void *heap_start; // Start of the heap
|
static void *heap_start; // Start of the heap
|
||||||
static void *heap_end; // End of the heap
|
static void *heap_end; // End of the heap
|
||||||
static struct memory_block *free_blocks; // List of free blocks
|
|
||||||
|
|
||||||
void init_heap(void *start, void *end)
|
void init_heap(void *start, void *end)
|
||||||
{
|
{
|
||||||
heap_start = start;
|
heap_start = start;
|
||||||
heap_end = end;
|
heap_end = end;
|
||||||
|
// Initialize the heap here
|
||||||
// Initialize the heap with a single large free block
|
|
||||||
free_blocks = (struct memory_block *)start;
|
|
||||||
free_blocks->size = (uintptr_t)end - (uintptr_t)start - sizeof(struct memory_block);
|
|
||||||
free_blocks->next = NULL;
|
|
||||||
free_blocks->is_free = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void *find_free_block(size_t size) {
|
void *find_free_block(size_t size) {
|
||||||
|
// Implementation is similar to find_free_kernel_block
|
||||||
struct memory_block *current = free_blocks;
|
struct memory_block *current = free_blocks;
|
||||||
while (current != NULL) {
|
while (current != NULL) {
|
||||||
if (current->is_free && current->size >= size) {
|
if (current->size >= size) {
|
||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
current = current->next;
|
current = current->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
// No suitable block found
|
// No suitable block found
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mark_as_used(void *ptr, size_t size) {
|
|
||||||
struct memory_block *block = (struct memory_block *)ptr;
|
|
||||||
block->is_free = 0;
|
|
||||||
|
|
||||||
// If the block is larger than needed, split it
|
|
||||||
if (block->size > size + sizeof(struct memory_block)) {
|
|
||||||
struct memory_block *new_block = (struct memory_block *)((uintptr_t)ptr + size + sizeof(struct memory_block));
|
|
||||||
new_block->size = block->size - size - sizeof(struct memory_block);
|
|
||||||
new_block->next = block->next;
|
|
||||||
new_block->is_free = 1;
|
|
||||||
|
|
||||||
block->size = size;
|
|
||||||
block->next = new_block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void mark_as_free(void *ptr) {
|
|
||||||
struct memory_block *block = (struct memory_block *)ptr;
|
|
||||||
block->is_free = 1;
|
|
||||||
|
|
||||||
// Coalesce with next block if it's free
|
|
||||||
if (block->next && block->next->is_free) {
|
|
||||||
block->size += block->next->size + sizeof(struct memory_block);
|
|
||||||
block->next = block->next->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Implement coalescing with previous block
|
|
||||||
}
|
|
||||||
|
|
||||||
void *malloc(size_t size)
|
void *malloc(size_t size)
|
||||||
{
|
{
|
||||||
if (heap_start == NULL || heap_end == NULL)
|
if (heap_start == NULL || heap_end == NULL)
|
||||||
@ -67,15 +33,16 @@ void *malloc(size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Align the size to the word size for efficiency
|
// Align the size to the word size for efficiency
|
||||||
size = (size + sizeof(size_t) - 1) & ~(sizeof(size_t) - 1);
|
size &= ~(sizeof(size_t) - 1);
|
||||||
|
|
||||||
// Search for a free block of sufficient size
|
// Search for a free block of sufficient size
|
||||||
|
// This is a placeholder for the actual algorithm
|
||||||
void *block = find_free_block(size);
|
void *block = find_free_block(size);
|
||||||
if (block != NULL)
|
if (block != NULL)
|
||||||
{
|
{
|
||||||
// Mark the block as used
|
// Mark the block as used
|
||||||
mark_as_used(block, size);
|
mark_as_used(block, size);
|
||||||
return (void *)((uintptr_t)block + sizeof(struct memory_block));
|
return block;
|
||||||
}
|
}
|
||||||
|
|
||||||
// No suitable block found, out of memory
|
// No suitable block found, out of memory
|
||||||
@ -89,9 +56,7 @@ void free(void *ptr)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adjust pointer to the start of the memory block
|
|
||||||
struct memory_block *block = (struct memory_block *)((uintptr_t)ptr - sizeof(struct memory_block));
|
|
||||||
|
|
||||||
// Mark the block as free
|
// Mark the block as free
|
||||||
mark_as_free(block);
|
// This is a placeholder for the actual algorithm
|
||||||
|
mark_as_free(ptr);
|
||||||
}
|
}
|
||||||
|
@ -3,25 +3,9 @@
|
|||||||
|
|
||||||
#include <stddef.h> // For size_t
|
#include <stddef.h> // For size_t
|
||||||
|
|
||||||
// Define the memory block structure
|
|
||||||
struct memory_block {
|
|
||||||
size_t size;
|
|
||||||
struct memory_block *next;
|
|
||||||
int is_free;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Function prototypes
|
|
||||||
void init_heap(void *start, void *end);
|
|
||||||
void *malloc(size_t size);
|
void *malloc(size_t size);
|
||||||
void free(void *ptr);
|
void free(void *ptr);
|
||||||
|
|
||||||
// Helper function prototypes
|
|
||||||
void *find_free_block(size_t size);
|
void *find_free_block(size_t size);
|
||||||
void mark_as_used(void *ptr, size_t size);
|
|
||||||
void mark_as_free(void *ptr);
|
|
||||||
|
|
||||||
// External heap boundaries
|
|
||||||
extern void *user_heap_start;
|
|
||||||
extern void *user_heap_end;
|
|
||||||
|
|
||||||
#endif // MALLOC_H
|
#endif // MALLOC_H
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
// Function to send a byte to an I/O port
|
// Function to send a byte to an I/O port
|
||||||
void outb(uint16_t port, uint8_t data) {
|
void outb(uint16_t port, uint8_t data) {
|
||||||
__asm__ volatile ("outb %0, %1" : : "a" (data), "Nd" (port));
|
__asm__ volatile ("outb %b, %w" : : "a" (data), "d" (port));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function to initialize the timer with a desired frequency
|
// Function to initialize the timer with a desired frequency
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Here's a breakdown of how to create timer.c and timer.h compatible with the 8253 for x86 32-bit protected mode on 386/486 processors:
|
||||||
|
|
||||||
|
1. timer.h:
|
||||||
|
|
||||||
|
This header file will contain function prototypes, constants, and any data structures you might need for interacting with the 8253 timer. Here's an example:
|
||||||
|
C
|
||||||
|
|
||||||
#ifndef TIMER_H
|
#ifndef TIMER_H
|
||||||
#define TIMER_H
|
#define TIMER_H
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user