Skip to content

Commit

Permalink
Add per-file copyright notices.
Browse files Browse the repository at this point in the history
(gplv3 :3)
  • Loading branch information
XenithMusic committed Nov 24, 2024
1 parent 3abde86 commit dc40299
Show file tree
Hide file tree
Showing 18 changed files with 238 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/assemblyUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#include <stdint.h>

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/

extern "C" {
void cli() {
__asm__ __volatile__ ("cli");
Expand Down
12 changes: 12 additions & 0 deletions src/assemblyUtils.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#include <stdint.h>

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/

extern "C" {
void cli();

Expand Down
9 changes: 8 additions & 1 deletion src/boot.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
/*
I ADMIT, THIS ASSEMBLY CODE IS DIRECTLY COPIED FROM THE OSDEV WIKI. PLEASE DON'T KILL ME.
This code is directly taken from the OSDev.org Bare Bones page.
https://wiki.osdev.org/Bare_Bones
This code is Public Domain, as stated by OSDev HERE:
https://wiki.osdev.org/OSDev_Wiki:License
General Disclaimer:
https://wiki.osdev.org/OSDev_Wiki:General_disclaimer
*/

/* Declare constants for the multiboot header. */
Expand Down
12 changes: 12 additions & 0 deletions src/const.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef CONST_VERSION
#define CONST_VERSION "unknown (compiler did not specify version)"
#endif
Expand Down
13 changes: 13 additions & 0 deletions src/fail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
#include "string.h"
#include "pit.h"

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


int error;

void setError(int errno) {
Expand Down
27 changes: 26 additions & 1 deletion src/fail.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
#include "terminal.h"

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


void setError(int errno);
int getError();
void clearError();
void fault(int errno,char* string);
void fault(int errno);



// DEPRECATED

void panic(int errno,char* string);
void panic(int errno);
// introduced in indev-2024-11-23
// deprecated in indev-2024-11-23
// superceded by fault(int, char*)

void panic(int errno);
// introduced in indev-2024-11-23
// deprecated in indev-2024-11-23
// superceded by fault(int, char*)
13 changes: 13 additions & 0 deletions src/math.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#include <stdint.h>

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


extern "C" {

int floor(double x) {
Expand Down
13 changes: 13 additions & 0 deletions src/math.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#include <stdint.h>

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


extern "C" {
int floor(double x);
int ceil(double x);
Expand Down
13 changes: 13 additions & 0 deletions src/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
#include "fail.h"
#include "math.h"

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


#define MEMORY_POOL_SIZE 512*MEBIBYTES // 512 MiB
#define BLOCK_SIZE 512 // 512B
#define NUM_BLOCKS MEMORY_POOL_SIZE/BLOCK_SIZE // 512 MiB
Expand Down
13 changes: 13 additions & 0 deletions src/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@
#include "const.h"
#include "fail.h"

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


#define MEMORY_POOL_SIZE 512*MEBIBYTES // 512 MiB
#define BLOCK_SIZE 512 // 512B
#define NUM_BLOCKS MEMORY_POOL_SIZE/BLOCK_SIZE // 512 MiB
Expand Down
12 changes: 12 additions & 0 deletions src/paranoia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/

/*
TODO:
- Memory Management
Expand Down
13 changes: 13 additions & 0 deletions src/pit.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
#include "assemblyUtils.h"
#include "math.h"

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


extern "C" {
unsigned previous_count;
uint64_t overflowCount;
Expand Down
13 changes: 13 additions & 0 deletions src/pit.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

#include "assemblyUtils.h"

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


extern "C" {
void set_pit_count(unsigned count);
unsigned get_pit_count(void);
Expand Down
13 changes: 13 additions & 0 deletions src/string.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
#include <stddef.h>
#include "math.h"

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


extern "C" {
size_t strlen(const char* str) {
size_t len = 0;
Expand Down
13 changes: 13 additions & 0 deletions src/string.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#include <stddef.h>

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


extern "C" {
size_t strlen(const char* str);
bool stringSafe(const char* str);
Expand Down
13 changes: 13 additions & 0 deletions src/terminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
#include "string.h"
#include "types.h"

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


namespace Terminal {

static const size_t VGA_WIDTH = 80;
Expand Down
13 changes: 13 additions & 0 deletions src/terminal.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
#include <stddef.h>
#include "types.h"

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


namespace Terminal {

static inline uint8_t vga_entry_color(enum vga_color fg, enum vga_color bg);
Expand Down
13 changes: 13 additions & 0 deletions src/types.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#include "stdint.h"

/*
Copyright (C) 2024 XenithMusic (on github)
The Paranoia kernel 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.
Paranoia 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 Paranoia. If not, see <https://www.gnu.org/licenses/>.
*/


#pragma once

typedef struct {
Expand Down

0 comments on commit dc40299

Please sign in to comment.