Compare commits
5 commits
5596841482
...
0e598b7ee0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e598b7ee0 | ||
|
|
9790807355 | ||
|
|
8839f06fd2 | ||
|
|
7ba7b9cc63 | ||
|
|
68f3353fbd |
5 changed files with 7 additions and 4 deletions
2
Makefile
2
Makefile
|
|
@ -82,7 +82,7 @@ clean:
|
||||||
find . -type f -name '*.[od(elf)]' -exec rm -f {} +
|
find . -type f -name '*.[od(elf)]' -exec rm -f {} +
|
||||||
|
|
||||||
format:
|
format:
|
||||||
find . -type f -name '*.[ch]' -exec clang-format -i {} +
|
find kern -type f -name '*.[ch]' -exec clang-format -i {} \;
|
||||||
|
|
||||||
TOOLCHAIN_DIR := toolchain
|
TOOLCHAIN_DIR := toolchain
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,9 @@ make distclean # Wipes the above, but also removes toolchain
|
||||||
| `mip` | Machine Interrupt Pending | Machine | Indicates pending interrupts. |
|
| `mip` | Machine Interrupt Pending | Machine | Indicates pending interrupts. |
|
||||||
| `mie` | Machine Interrupt Enable | Machine | Controls which interrupts are enabled. |
|
| `mie` | Machine Interrupt Enable | Machine | Controls which interrupts are enabled. |
|
||||||
|
|
||||||
|
### TODO
|
||||||
|
- Kassert, some macro in the form of `ASSERT(condition, "This went wrong")`
|
||||||
|
|
||||||
### Libc Implementations
|
### Libc Implementations
|
||||||
|
|
||||||
[uClibc](https://uclibc.org/)
|
[uClibc](https://uclibc.org/)
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ void kfree(void *pa) {
|
||||||
if (((u64)pa % PGSIZE) != 0 || (char *)pa < kernel_end || (u64)pa >= PHYSTOP)
|
if (((u64)pa % PGSIZE) != 0 || (char *)pa < kernel_end || (u64)pa >= PHYSTOP)
|
||||||
PANIC("kfree");
|
PANIC("kfree");
|
||||||
|
|
||||||
|
// TODO: Kconfig this
|
||||||
// Fill with junk to catch dangling refs.
|
// Fill with junk to catch dangling refs.
|
||||||
memset(pa, 1, PGSIZE);
|
memset(pa, 1, PGSIZE);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,3 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // STDDEF_H
|
#endif // STDDEF_H
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ static int stdout_puts(char *s, int len, void *unused) {
|
||||||
int kprintf(const char *restrict fmt, ...) {
|
int kprintf(const char *restrict fmt, ...) {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
int ret = kvprintf(fmt, &ap);
|
int ret = kvprintf(fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue