-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
249 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
all: | ||
(cd $(ARCH) && $(MAKE)) | ||
(cd shared/$(ARCH_FAMILY) && $(MAKE)) | ||
|
||
clean: | ||
(cd $(ARCH) && $(MAKE) clean) | ||
(cd shared/$(ARCH_FAMILY) && $(MAKE) clean) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
BUILDROOT ?= ../.. | ||
|
||
|
||
CSRCS = \ | ||
init/main.c | ||
|
||
cpu/interrupts/interrupts-asm.o: NASMFLAGS += -i cpu/interrupts/ | ||
|
||
|
||
LIBNAME := arch | ||
|
||
include $(BUILDROOT)/library.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
; | ||
; This file is part of BoneOS. | ||
; | ||
; BoneOS is free software: you can redistribute it and/or modify | ||
; it under the terms of the GNU General Public License as published by | ||
; the Free Software Foundation, either version 3 of the License, or | ||
; (at your option) any later version. | ||
|
||
; BoneOS is distributed in the hope that it will be useful, | ||
; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
; GNU General Public License for more details. | ||
|
||
; You should have received a copy of the GNU General Public License | ||
; along with BoneOS. If not, see <http://www.gnu.org/licenses/>. | ||
; | ||
; @main_author : Amanuel Bogale | ||
; | ||
; @contributors: | ||
|
||
; Amanuel Bogale <amanuel2> : start | ||
; | ||
|
||
|
||
; On Work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/** | ||
** This file is part of BoneOS. | ||
** | ||
** BoneOS is free software: you can redistribute it and/or modify | ||
** it under the terms of the GNU General Public License as published by | ||
** the Free Software Foundation, either version 3 of the License, or | ||
** (at your option) any later version. | ||
** BoneOS is distributed in the hope that it will be useful, | ||
** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
** GNU General Public License for more details. | ||
** You should have received a copy of the GNU General Public License | ||
** along with BoneOS. If not, see <http://www.gnu.org/licenses/>. | ||
** | ||
** @main_author : Amanuel Bogale | ||
** | ||
** @contributors: | ||
** Amanuel Bogale <amanuel2> : start | ||
**/ | ||
|
||
#include <stdint.h> | ||
#include <stddef.h> | ||
#include <arch/shared/x86/misc/asm_util.h> | ||
|
||
|
||
/* | ||
* Calling all Global C Objects | ||
* constructors , via attributes: | ||
* @attribute __constructor__ | ||
* @attribute __deconstructor__ | ||
*/ | ||
typedef void (*constructor)(); | ||
extern constructor start_ctors; | ||
extern constructor end_ctors; | ||
extern void callConstructors() | ||
{ | ||
for(constructor* i = &start_ctors;i != &end_ctors; i++) | ||
(*i)(); | ||
} | ||
|
||
/* | ||
* @function kernelMain: | ||
* Main function of the kernel, | ||
* the function the GRUB bootloader | ||
* calls when Loading the kernel. | ||
* | ||
*/ | ||
void kernelMain(multiboot_info_t* multiboot_structure,uint32_t magicnumber) | ||
{ | ||
while(1) | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* | ||
* On Work | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
** This file is part of BoneOS. | ||
** | ||
** BoneOS is free software: you can redistribute it and/or modify | ||
** it under the terms of the GNU General Public License as published by | ||
** the Free Software Foundation, either version 3 of the License, or | ||
** (at your option) any later version. | ||
** BoneOS is distributed in the hope that it will be useful, | ||
** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
** GNU General Public License for more details. | ||
** You should have received a copy of the GNU General Public License | ||
** along with BoneOS. If not, see <http://www.gnu.org/licenses/>. | ||
** | ||
** @main_author : Doug Gale | ||
** | ||
** @contributors: | ||
** Doug Gale <doug65536> : start | ||
**/ | ||
|
||
#include <stdint.h> | ||
#include <stdarg.h> | ||
#include <stddef.h> | ||
#include <stdbool.h> | ||
|
||
#include <cpu/gdt/gdt.h> | ||
#include <cpu/interrupts/idt.h> | ||
#include <cpu/interrupts/isr.h> | ||
#define KERNEL_CALL | ||
#include <cpu/interrupts/irq.h> | ||
#undef KERNEL_CALL | ||
#include <libc/string/string.h> | ||
|
||
void init_cpu() | ||
{ | ||
init_gdt(); | ||
init_idt(); | ||
init_isr(); | ||
init_irq(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
BUILDROOT ?= ../../../ | ||
|
||
CSRCS = \ | ||
misc/asm_util.c | ||
|
||
|
||
LIBNAME := shared_arch | ||
|
||
include $(BUILDROOT)/library.mk |
Oops, something went wrong.