Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
- name: Install apt packages
run: |
sudo apt update
sudo apt install clang lld llvm grub-efi-amd64-bin mtools
sudo apt install clang lld llvm grub-efi-amd64-bin mtools meson ninja-build

- name: Build ModulOS
run: |
make -j$(nproc) build
make build

- name: Run test suite
run: |
Expand Down
187 changes: 0 additions & 187 deletions LICENSES/ACPICA

This file was deleted.

45 changes: 45 additions & 0 deletions LICENSES/MLIBC
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Copyright (C) 2015-2025 mlibc Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

----

Some parts of mlibc are adapted from musl (http://www.musl-libc.org/), which
is licensed as follows:

Copyright © 2005-2020 Rich Felker, et al.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#export DEBUG = 1
export DEBUG_LOGGING = 1
export SMP_ENABLE = 1
#export CHECK_ALLOC = 1

# Global options

Expand Down Expand Up @@ -83,7 +84,11 @@ COPY_DRIVERS_TO := $(OBJ_DIR)/rootfs/lib/drivers/

COPY_USERLAND_TO := $(OBJ_DIR)/rootfs/

SRC := $(shell find . -type f \( -name "*.c" -o -name "*.S" -o -name "*.h" \))
SRC_FIND := find . \
\( -path './userland/mlibc' -o -path './build' \) -prune \
-o -type f \( -name "*.c" -o -name "*.S" -o -name "*.h" \) -print

SRC := $(shell $(SRC_FIND))

include $(SRC_TREE_ROOT)/scripts/Makefile.kcflags

Expand All @@ -95,11 +100,12 @@ all: index build test-all

.PHONY: index
index: cscope.files
ctags --C-kinds=+pxzL -R $(SRC)
cscope -q -R -b -i cscope.files
ctags --C-kinds=+pxzL -L $<
cscope -b -q -i $<

.PHONY: clean
clean:
$(MAKE) -C userland clean
-rm -rd $(OBJ_DIR)/ tags cscope.*

.PHONY: test-all
Expand All @@ -114,7 +120,7 @@ $(SUBDIRS):
$(MAKE) -C $@ build

cscope.files: $(SRC)
find . -type f \( -name "*.c" -o -name "*.S" -o -name "*.h" \) > $@
$(SRC_FIND) > $@

%/:
-mkdir -p $@
Expand All @@ -132,15 +138,15 @@ $(TEST_EXEC): %: %.a $(OBJ_DIR)/boot.a $(OBJ_DIR)/kernel.a $(OBJ_DIR)/drivers.a

.PHONY: copy-doc
copy-doc: COPYING LICENSES | $(COPY_DOC_TO)
cp -r $^ $|
cp -u -r $^ $|

.PHONY: copy-runtime-drivers
copy-runtime-drivers: $(RUNTIME_DRIVERS_TARGETS) | $(COPY_DRIVERS_TO)
cp -r $^ $|
cp -u -r $^ $|

.PHONY: copy-userland
copy-userland: $(USERLAND_TARGETS) | $(COPY_USERLAND_TO)
cp -r $^/* $|
cp -u -r $^/* $|

$(OBJ_DIR)/stub.img: | $(OBJ_DIR)/
truncate -s 4G $@
Expand Down
3 changes: 2 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ An operating system that aims to be customizable and modular to provide a fast u

## Licensing

This software is provided under the GPLv3 license, found in COPYING. This software also contains third party source code with their own licenses, all found under LICENSES/
This software is provided under the GPLv3 license, found in COPYING. This project also uses
mlibc which has a seperate license in LICENCES/MLIBC.

## Installing

Expand Down
2 changes: 1 addition & 1 deletion boot/multiboot2/boot.S
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#define CPUID_LONGMODE 0x80000001
#define CPUID_LONGMODE_EXIST 0x20000000

#define PAEPSE 0x30
#define PAEPSE 0x30

#define EFER 0xC0000080
#define LME 0x100
Expand Down
4 changes: 4 additions & 0 deletions boot/multiboot2/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include <kernel/core/logging.h>
#include <kernel/core/proc_data.h>

#include <kernel/lib/kmemset.h>

#include <kernel/acpi/tables.h>

#ifdef SERIAL
Expand Down Expand Up @@ -142,6 +144,8 @@ static void next_segment(uint64_t* handle, struct mem_segment_t* seg) {


void multiboot2_init(struct mb2_info_t* info) {
kmemset(&bsp_proc_data, 0, sizeof(struct proc_data_t));

bsp_proc_data_ptr = &bsp_proc_data;
proc_data_ptr = &bsp_proc_data_ptr;
proc_data_set_id(0);
Expand Down
Loading
Loading