From 644508ee453d7c26fd55f0d1022de972cbbdbbe9 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Tue, 28 Feb 2023 22:14:06 -0500 Subject: [PATCH] Added license identifiers to all files --- dev/apic.c | 1 + dev/serial.c | 1 + include/dev/apic.h | 2 ++ include/dev/serial.h | 1 + include/kernel/acpi.h | 1 + include/kernel/bitwise.h | 1 + include/kernel/common.h | 1 + include/kernel/gdt.h | 1 + include/kernel/idt.h | 1 + include/kernel/msr.h | 1 + include/kernel/pio.h | 1 + include/limine/limine.h | 2 ++ include/stdio.h | 1 + include/string.h | 1 + init/acpi.c | 1 + init/descriptor.S | 1 + init/gdt.c | 1 + init/idt.c | 1 + init/main.c | 1 + init/msr.S | 1 + lib/printf.c | 9 +++++---- lib/string.c | 1 + 22 files changed, 28 insertions(+), 4 deletions(-) diff --git a/dev/apic.c b/dev/apic.c index 3535c4a..621083b 100644 --- a/dev/apic.c +++ b/dev/apic.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #include #include #include diff --git a/dev/serial.c b/dev/serial.c index d765e59..f6a9b2e 100644 --- a/dev/serial.c +++ b/dev/serial.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #include #include diff --git a/include/dev/apic.h b/include/dev/apic.h index bc9129c..1db914b 100644 --- a/include/dev/apic.h +++ b/include/dev/apic.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _APIC_H_ #define _APIC_H_ @@ -33,6 +34,7 @@ #define LAPIC_LVT_ERR 0x370 #define LAPIC_INIT_COUNT 0x380 #define LAPIC_CUR_COUNT 0x390 +/* SPDX-License-Identifier: GPL-2.0-only */ #define LAPIC_DIVIDE_CONFIG 0x3E0 #ifndef __ASM__ diff --git a/include/dev/serial.h b/include/dev/serial.h index 4f1b19c..a4f08be 100644 --- a/include/dev/serial.h +++ b/include/dev/serial.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _SERIAL_H_ #define _SERIAL_H_ diff --git a/include/kernel/acpi.h b/include/kernel/acpi.h index 0d1e4fe..3ff8879 100644 --- a/include/kernel/acpi.h +++ b/include/kernel/acpi.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _ACPI_H_ #define _ACPI_H_ diff --git a/include/kernel/bitwise.h b/include/kernel/bitwise.h index 9b9ee54..d40adcb 100644 --- a/include/kernel/bitwise.h +++ b/include/kernel/bitwise.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _BITWISE_H_ #define _BITWISE_H_ diff --git a/include/kernel/common.h b/include/kernel/common.h index 3bd4390..ee5d6df 100644 --- a/include/kernel/common.h +++ b/include/kernel/common.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _COMMON_H_ #define _COMMON_H_ diff --git a/include/kernel/gdt.h b/include/kernel/gdt.h index 89434d0..2423062 100644 --- a/include/kernel/gdt.h +++ b/include/kernel/gdt.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _GDT_H_ #define _GDT_H_ diff --git a/include/kernel/idt.h b/include/kernel/idt.h index 2de4180..6a3df59 100644 --- a/include/kernel/idt.h +++ b/include/kernel/idt.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _IDT_H_ #define _IDT_H_ diff --git a/include/kernel/msr.h b/include/kernel/msr.h index 19ce6ce..e13d76e 100644 --- a/include/kernel/msr.h +++ b/include/kernel/msr.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _MSR_H_ #define _MSR_H_ diff --git a/include/kernel/pio.h b/include/kernel/pio.h index a673c5f..706d32f 100644 --- a/include/kernel/pio.h +++ b/include/kernel/pio.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _PIO_H_ #define _PIO_H_ diff --git a/include/limine/limine.h b/include/limine/limine.h index 1368884..2714e80 100644 --- a/include/limine/limine.h +++ b/include/limine/limine.h @@ -12,6 +12,8 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * SPDX-License-Identifier: 0BSD */ #ifndef _LIMINE_H diff --git a/include/stdio.h b/include/stdio.h index f0de650..daec951 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _STDIO_H_ #define _STDIO_H_ diff --git a/include/string.h b/include/string.h index eaf5ccd..27a9eb4 100644 --- a/include/string.h +++ b/include/string.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _STRING_H_ #define _STRING_H_ diff --git a/init/acpi.c b/init/acpi.c index fac3e23..4bfd11f 100644 --- a/init/acpi.c +++ b/init/acpi.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #include #include diff --git a/init/descriptor.S b/init/descriptor.S index 902457c..fd40392 100644 --- a/init/descriptor.S +++ b/init/descriptor.S @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #define __ASM__ #include #include diff --git a/init/gdt.c b/init/gdt.c index 1394e35..bbe58fe 100644 --- a/init/gdt.c +++ b/init/gdt.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #include #include diff --git a/init/idt.c b/init/idt.c index 538237c..89da3a4 100644 --- a/init/idt.c +++ b/init/idt.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #include #include diff --git a/init/main.c b/init/main.c index 6aa0cf3..0d556dc 100644 --- a/init/main.c +++ b/init/main.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #include #include #include diff --git a/init/msr.S b/init/msr.S index b7fae7c..81b5ba7 100644 --- a/init/msr.S +++ b/init/msr.S @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ .global rdmsr rdmsr: pushq %rbp diff --git a/lib/printf.c b/lib/printf.c index 13756f6..9477e7f 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -1,8 +1,9 @@ -#include -#include - +/* SPDX-License-Identifier: GPL-2.0-only */ +#include #include +#include + static inline void printf_out(char c) { serial_write(c); @@ -74,7 +75,7 @@ int printf(const char *restrict fmt, ...) break; case 'x': i = va_arg(args, int); - for (int j = 0; j < (2 * sizeof(i)); j++) { + for (uint32_t j = 0; j < (2 * sizeof(i)); j++) { int sel = ((sizeof(i) * 2) - j - 1) * 4; int num = (i >> sel) & 0xF; printf_out(convert[num]); diff --git a/lib/string.c b/lib/string.c index f032dcd..e2414da 100644 --- a/lib/string.c +++ b/lib/string.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #include void *memcpy(void *dest, const void *src, size_t num)