Move sys/test to Yellowstone init process.

This commit is contained in:
Drew Galbraith 2023-06-07 11:18:35 -07:00
parent 6f81520918
commit 7c9d1075eb
8 changed files with 26 additions and 19 deletions

View file

@ -1,17 +1,6 @@
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
add_executable(test
test.cpp
)
target_link_libraries(test
mammoth_lib)
set_target_properties(test
PROPERTIES
COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${BASE_COMPILE_FLAGS}"
LINK_FLAGS "${CMAKE_EXE_LINK_FLAGS} ${BASE_LINK_FLAGS}"
)
add_subdirectory(yellowstone)
add_executable(test2
test2.cpp)

5
sys/README.md Normal file
View file

@ -0,0 +1,5 @@
# System Processes
Current Processes;
- **yellowstone**: System Initialization

View file

@ -0,0 +1,12 @@
add_executable(yellowstone
yellowstone.cpp)
target_link_libraries(yellowstone
cxx
mammoth_lib
)
set_target_properties(yellowstone PROPERTIES
COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${BASE_COMPILE_FLAGS}"
LINK_FLAGS "${CMAKE_EXE_LINK_FLAGS} ${BASE_LINK_FLAGS}"
)

View file

@ -2,11 +2,12 @@
#include <mammoth/process.h>
#include <zcall.h>
int main() {
dbgln("Testing");
uint64_t main() {
dbgln("Yellowstone Initializing.");
uint64_t vaddr;
check(ZAddressSpaceMap(Z_INIT_VMAS_SELF, 0, Z_INIT_BOOT_VMMO, &vaddr));
check(SpawnProcessFromElfRegion(vaddr));
dbgln("Return");
dbgln("Yellowstone Finished Successfully.");
return 0;
}