Files
jsix/configs/debug.toml
Justin C. Miller 5524ca5b25 [srv.init] Create init server and read init args
Create a new usermode program, srv.init, and have it read the initial
module_page args sent to it by the bootloader. Doesn't yet do anything
useful but sets up the way for loading the rest of the programs from
srv.init.

Other (mostly) related changes:

- bootloader: The allocator now has a function for allocating init
  modules out of a modules_page slab. Also changed how the allocator is
  initialized and passes the allocation register and modules_page list
  to efi_main().
- bootloader: Expose the simple wstrlen() to the rest of the program
- bootloader: Move check_cpu_supported() to hardware.cpp
- bootloader: Moved program_desc to loader.h and made the loader
  functions take it as an argument instead of paths.
- kernel: Rename the system_map_mmio syscall to system_map_phys, and
  stop having it default those VMAs to having the vm_flags::mmio flag.
  Added a new flag mask, vm_flags::driver_mask, so that drivers can be
  allowed to ask for the MMIO flag.
- kernel: Rename load_simple_process() to load_init_server() and got rid
  of all the stack setup routines in memory_bootstrap.cpp and task.s
- Fixed formatting in config/debug.toml, undefined __linux and other
  linux-specific defines, and got rid of _LIBCPP_HAS_THREAD_API_EXTERNAL
  because that's just not true.
2021-07-31 10:00:08 -07:00

134 lines
2.3 KiB
TOML

[targets.boot]
cc = "clang"
cxx = "clang++"
ld = "clang++"
ar = "ar"
nasm = "nasm"
objcopy = "objcopy"
ccflags = [
"${ccflags}",
"-I${source_root}/external",
"--target=x86_64-unknown-windows",
"-ffreestanding",
"-mno-red-zone",
"-fshort-wchar",
"-fno-omit-frame-pointer",
"-ggdb",
"-g3",
'-DKERNEL_FILENAME=L"jsix.elf"',
]
cxxflags = [
"${cxxflags}",
"-fno-exceptions",
"-fno-rtti",
]
ldflags = [
"${ldflags}",
"--target=x86_64-unknown-windows",
"-nostdlib",
"-Wl,-entry:efi_main",
"-Wl,-subsystem:efi_application",
"-fuse-ld=lld-link",
"-g"
]
[targets.kernel]
cc = "clang"
cxx = "clang++"
ld = "ld.lld"
ar = "ar"
nasm = "nasm"
objcopy = "objcopy"
asflags = [
"${asflags}",
"-I${source_root}/src/kernel/",
]
ccflags = [
"${ccflags}",
"--target=x86_64-unknown-elf",
"-I${source_root}/external",
"-nostdlib",
"-ffreestanding",
"-nodefaultlibs",
"-fno-builtin",
"-mno-sse",
"-fno-omit-frame-pointer",
"-mno-red-zone",
"-g",
"-mcmodel=large",
"-D__ELF__",
"-D__JSIX__",
"-isystem${source_root}/sysroot/include",
"-isystem${source_root}/src/libraries/libc/include",
"--sysroot='${source_root}/sysroot'",
"-U__linux",
"-U__linux__",
]
cxxflags = [
"${cxxflags}",
"-fno-exceptions",
"-fno-rtti",
"-isystem${source_root}/sysroot/include/c++/v1"
]
ldflags = [
"${ldflags}",
"-T", "${source_root}/src/kernel/kernel.ld",
"-g",
"-nostdlib",
"-Bstatic",
"-z", "norelro",
"-z", "separate-code",
]
[targets.user]
cc = "clang"
cxx = "clang++"
ld = "ld.lld"
ar = "ar"
nasm = "nasm"
objcopy = "objcopy"
asflags = [
"${asflags}",
"-I${source_root}/src/kernel/",
]
ccflags = [
"${ccflags}",
"-mno-sse",
"-fno-omit-frame-pointer",
"-g",
"-D__ELF__",
"-D__JSIX__",
"-isystem${source_root}/sysroot/include",
"-isystem${source_root}/src/libraries/libc/include",
"--sysroot='${source_root}/sysroot'",
"-U__linux",
"-U__linux__",
]
cxxflags = [
"${cxxflags}",
"-fno-exceptions",
"-fno-rtti",
"-isystem${source_root}/sysroot/include/c++/v1"
]
ldflags = [
"${ldflags}",
"-g",
"-Bstatic",
"--sysroot='${source_root}/sysroot'",
"-L", "${source_root}/sysroot/lib",
"-z", "separate-code",
]