diff --git a/include/kernel/drivers/ports/ports.h b/include/kernel/drivers/ports/ports.h index a26c64d..9c41ad0 100644 --- a/include/kernel/drivers/ports/ports.h +++ b/include/kernel/drivers/ports/ports.h @@ -1,3 +1,19 @@ +/* +Copyright 2022 Mattia Giambirtone & Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + #ifndef TSOS_DRV_PORTS_H #define TSOS_DRV_PORTS_H diff --git a/include/kernel/drivers/vga/screen.h b/include/kernel/drivers/vga/screen.h index b8f2767..d673555 100644 --- a/include/kernel/drivers/vga/screen.h +++ b/include/kernel/drivers/vga/screen.h @@ -1,3 +1,20 @@ +/* +Copyright 2022 Mattia Giambirtone & Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + #ifndef TSOS_DRV_VGA_SCREEN #define TSOS_DRV_VGA_SCREEN diff --git a/include/kernel/ktypes.h b/include/kernel/ktypes.h index 2c3e263..00c9b7a 100644 --- a/include/kernel/ktypes.h +++ b/include/kernel/ktypes.h @@ -1,3 +1,19 @@ +/* +Copyright 2022 Mattia Giambirtone & Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + // Shorthand definitions of various types // used in the kernel #ifndef TSOS_KTYPES diff --git a/src/boot/gdt.s b/src/boot/gdt.s index 4ecab9c..3e2a0da 100644 --- a/src/boot/gdt.s +++ b/src/boot/gdt.s @@ -1,3 +1,17 @@ +; Copyright 2022 Mattia Giambirtone & Contributors +; +; Licensed under the Apache License, Version 2.0 (the "License"); +; you may not use this file except in compliance with the License. +; You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software +; distributed under the License is distributed on an "AS IS" BASIS, +; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; See the License for the specific language governing permissions and +; limitations under the License. + ; Definition of our Global Descriptor Table gdt_start: ; The labels are important to compute the size of the GDT: don't touch them! diff --git a/src/boot/mbr.s b/src/boot/mbr.s index de70614..7fb7448 100644 --- a/src/boot/mbr.s +++ b/src/boot/mbr.s @@ -1,3 +1,17 @@ +; Copyright 2022 Mattia Giambirtone & Contributors +; +; Licensed under the Apache License, Version 2.0 (the "License"); +; you may not use this file except in compliance with the License. +; You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software +; distributed under the License is distributed on an "AS IS" BASIS, +; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; See the License for the specific language governing permissions and +; limitations under the License. + ; Definition of the MBR (Master Boot Record). This is basically our bootloader and ; is located in the first 512 bytes of the drive we're booting from. From here, we ; do some basic setup and then call into the kernel diff --git a/src/boot/switch32.s b/src/boot/switch32.s index 1972cd4..7fa64ce 100644 --- a/src/boot/switch32.s +++ b/src/boot/switch32.s @@ -1,3 +1,19 @@ +; Copyright 2022 Mattia Giambirtone & Contributors +; +; Licensed under the Apache License, Version 2.0 (the "License"); +; you may not use this file except in compliance with the License. +; You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software +; distributed under the License is distributed on an "AS IS" BASIS, +; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; See the License for the specific language governing permissions and +; limitations under the License. + +; Utilities to switch to protected mode and load our GDT + [bits 16] switch_to_protected_mode: cli ; We disable interrupts... diff --git a/src/boot/util/io.s b/src/boot/util/io.s index c6795b4..3f8f9ac 100644 --- a/src/boot/util/io.s +++ b/src/boot/util/io.s @@ -1,3 +1,16 @@ +; Copyright 2022 Mattia Giambirtone & Contributors +; +; Licensed under the Apache License, Version 2.0 (the "License"); +; you may not use this file except in compliance with the License. +; You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software +; distributed under the License is distributed on an "AS IS" BASIS, +; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; See the License for the specific language governing permissions and +; limitations under the License. ; Some utilities to deal with the TTY using the BIOS ; during real mode and writing directly to VGA memory diff --git a/src/entrypoint.s b/src/entrypoint.s index 3b0d6bb..96f1a89 100644 --- a/src/entrypoint.s +++ b/src/entrypoint.s @@ -1,3 +1,19 @@ +; Copyright 2022 Mattia Giambirtone & Contributors +; +; Licensed under the Apache License, Version 2.0 (the "License"); +; you may not use this file except in compliance with the License. +; You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software +; distributed under the License is distributed on an "AS IS" BASIS, +; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; See the License for the specific language governing permissions and +; limitations under the License. + +; The 32-bit entrypoint into our kernel. Goodbye assembly, hello C! + [bits 32] [extern kmain] call kmain diff --git a/src/kernel/drivers/ports/ports.c b/src/kernel/drivers/ports/ports.c index ea57735..b6ccaaf 100644 --- a/src/kernel/drivers/ports/ports.c +++ b/src/kernel/drivers/ports/ports.c @@ -1,3 +1,19 @@ +/* +Copyright 2022 Mattia Giambirtone & Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + // Utilities for writing to and reading from I/O ports #include "kernel/drivers/ports/ports.h" diff --git a/src/kernel/drivers/vga/screen.c b/src/kernel/drivers/vga/screen.c index 5998821..e355f7f 100644 --- a/src/kernel/drivers/vga/screen.c +++ b/src/kernel/drivers/vga/screen.c @@ -1,3 +1,19 @@ +/* +Copyright 2022 Mattia Giambirtone & Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + // Implementation of a simple text-only VGA driver #include "kernel/drivers/vga/screen.h" #include "kernel/ktypes.h" diff --git a/src/kernel/main.c b/src/kernel/main.c index 3b5ff89..18e45bb 100644 --- a/src/kernel/main.c +++ b/src/kernel/main.c @@ -1,3 +1,19 @@ +/* +Copyright 2022 Mattia Giambirtone & Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + // Entry point of the TSOS kernel #include "kernel/ktypes.h" #include "kernel/drivers/vga/screen.h"