diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-12-03 07:41:45 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-12-03 07:41:45 +0100 |
| commit | 58fcecc381be82992f718a6ef9bf7ddcd3bca369 (patch) | |
| tree | db3fedc5bc6ea2eef84ae9f8951a84a088d9721e /kernel | |
| parent | 7b1b8ebb48174445083bc7fa336dc00619cbf126 (diff) | |
| download | fbos-58fcecc381be82992f718a6ef9bf7ddcd3bca369.tar.gz fbos-58fcecc381be82992f718a6ef9bf7ddcd3bca369.zip | |
Simplify the constant on the size of the stack
At the beginning I carried over things from the Linux kernel just in
case I would need them in the future. As this project is very much at a
stage where I'm already happy with it, let's remove unneeded complexity.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/head.S | 2 | ||||
| -rw-r--r-- | kernel/main.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/kernel/head.S b/kernel/head.S index 4390cc9..ac69967 100644 --- a/kernel/head.S +++ b/kernel/head.S @@ -100,7 +100,7 @@ _start_kernel: la tp, tasks // Point 'sp' the our general stack. - la sp, stack + THREAD_SIZE + la sp, stack + STACK_SIZE // The `start_kernel` function requires an argument to be passed, which is // the pointer to the `fdt` blob. The bootloader puts this on the `a1` diff --git a/kernel/main.c b/kernel/main.c index 3d2b524..5a11816 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -12,7 +12,7 @@ // memory protection of any kind, it's not like separating stacks for each // process and kernel space would make much of a difference. Hence, let's keep // it simple and have the same stack everwhere. -uint64_t stack[THREAD_SIZE / sizeof(uint64_t)]; +uint64_t stack[STACK_SIZE / sizeof(uint64_t)]; // Initialize the list of structs by providing a fixed stack address and empty // values everywhere else. |
