Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8325105
[gpu] fb
CodeAnarchist Apr 9, 2026
5ce5690
[net] alligment
CodeAnarchist Apr 12, 2026
c416e0c
[net]netpkt across l2-l4
CodeAnarchist Apr 17, 2026
854ad12
[TCP] track passive SYN-ACK and reject orphan accepts
CodeAnarchist Apr 21, 2026
486385d
[tcp] unify rx buffer and fix window managing
CodeAnarchist May 1, 2026
f51e53f
[NET] TCP retransmission, SACK handling, HTTP cont len
CodeAnarchist May 5, 2026
6764f50
[tcp] nagle, minor fixes
CodeAnarchist May 8, 2026
2f9c119
[net] random crash, tx irq-safe
CodeAnarchist May 10, 2026
8be718d
[net/misc] L3/4 cleanup, tcp flow struct split and allocator bug fix
CodeAnarchist May 11, 2026
af9c353
[net] fix virtio init and netpkt lifetime
CodeAnarchist May 12, 2026
0339f24
[net] make packet path full netpkt
CodeAnarchist May 15, 2026
5cde3c5
Merge remote-tracking branch 'upstream/main' into net
CodeAnarchist May 15, 2026
e96c352
Merge remote-tracking branch 'upstream/main' into net
CodeAnarchist May 19, 2026
5e046e9
[tcp] add bounded OOO/SYN/TX limits and seq wrap handling
CodeAnarchist May 21, 2026
f5c8165
Merge branch 'differrari:main' into net
CodeAnarchist May 21, 2026
47638c3
[tcp] move resource accounting into tcp_limits
CodeAnarchist May 22, 2026
0742263
[neigh/virtio] improve tx status and make arp/ndp non blocking
CodeAnarchist May 23, 2026
c30394d
Merge remote-tracking branch 'upstream/main' into net
CodeAnarchist May 23, 2026
ad764db
[dns] add generic dns parser
CodeAnarchist May 25, 2026
1d2b1c1
Merge remote-tracking branch 'upstream/main' into net
CodeAnarchist May 25, 2026
ed4a3b7
[HTTP] HTTP parsing and request limits
CodeAnarchist May 25, 2026
08f7fe7
[http] add chunked HTTP bodies and keep-alive support
CodeAnarchist May 26, 2026
ff52f9e
[http] improve policy and framing
CodeAnarchist May 29, 2026
e3da69e
[network] fix mdns, multicast sockets, http chunked and misc
CodeAnarchist Jun 2, 2026
f7c38f2
[net] refactor socket
CodeAnarchist Jun 4, 2026
2e71ca2
[net] clean up sockets, multicast and tcp lifetime
CodeAnarchist Jun 9, 2026
46f81d4
[http/l3] http policy handling and l3 fragment reassembly
CodeAnarchist Jun 10, 2026
c953e2b
[netpkt] clean up netpkt payload
CodeAnarchist Jun 11, 2026
4291746
Merge remote-tracking branch 'upstream/main' into net
CodeAnarchist Jun 11, 2026
183a7b2
[net] port sockets to c, improve ping and clean up networking
CodeAnarchist Jun 16, 2026
df55303
[net] improve socket options and route epochs
CodeAnarchist Jun 18, 2026
4407dcf
[sock] add special socket base
CodeAnarchist Jun 18, 2026
0aa06e1
[socket] control socket
CodeAnarchist Jun 19, 2026
2141b82
[net]add raw sockets and ipv4 dad
CodeAnarchist Jun 20, 2026
9014a7f
[net ]move ping and traceroute to raw
CodeAnarchist Jun 22, 2026
a413f56
[net] add packet sockets and improve socket options
CodeAnarchist Jun 24, 2026
fcf893c
[sock] add packet/raw filters and special socket flag
CodeAnarchist Jun 24, 2026
5786c14
[net] web routing, reduce network noise, minor fixes
CodeAnarchist Jul 8, 2026
d99dad0
[make/tcp/http] clean builds, flow tracking, range responses
CodeAnarchist Jul 14, 2026
ee05374
[net] batch virtio and improve packet paths
CodeAnarchist Jul 23, 2026
6dbf5e5
[net] add NONBLOCK and DONTROUTE sock options
CodeAnarchist Jul 28, 2026
67685b0
[net] add socket reuse, MAXSEG and linger; known issue with tcp REUS…
CodeAnarchist Jul 31, 2026
4990727
[l4/http] improve tcp, udp and sockets; centralize HTTP helpers
CodeAnarchist Aug 2, 2026
27745f7
[tcp/udp] add sack, dsack and udp sync
CodeAnarchist Aug 6, 2026
17bb12d
[tcp] improve recovery, flow control and conn handling
CodeAnarchist Aug 9, 2026
a6edd20
Merge remote-tracking branch 'upstream/threading' into net
CodeAnarchist Aug 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ clean:
$(MAKE) -C modules $@
$(MAKE) -C libs $@
@echo "removing images"
$(RM) kernel.img kernel.elf dump
$(RM) -f kernel.img kernel.elf disk.img dump trace serial.log gdb_net.log screenlog.0 dump.dtb
$(RM) -f logs/*.log fs/kernel.elf
$(RM) -rf fs/redos/tools fs/redos/system fs/redos/user fs/redos/docs .cache
@find ./bin ./user ./tools ./modules ./kernel ./shared -type f \( -name dump -o -name '*.dump' -o -name '*.trace' -o -name '*.log' -o -name '*.tmp' \) -exec rm -f {} +

raspi:
$(MAKE) LOAD_ADDR=0x80000 XHCI_CTX_SIZE=64 QEMU=true MODE=raspi all
Expand Down
10 changes: 10 additions & 0 deletions kernel/exceptions/exception_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
#include "theme/theme.h"
#include "std/string.h"
#include "sysregs.h"
#include "process/syscall.h"

static bool panic_triggered = false;
static bool panic_skip_trace = false;

void set_exception_vectors(){
extern char exception_vectors[];
Expand All @@ -27,7 +29,11 @@ void handle_exception(const char* type, uint64_t info) {
char buf[STRING_MAX_LEN];//no heap to avoid corruption
const char *fmt = "%s \r\nESR_EL1: %llx\r\nELR_EL1: %llx\r\nFAR_EL1: %llx";
string_format_buf(buf, sizeof(buf), fmt,type,esr,elr,far);

bool old_panic_skip_trace = panic_skip_trace;
panic_skip_trace = syscall_depth > 0;
panic(buf, info);
panic_skip_trace = old_panic_skip_trace;
}

void fiq_el1_handler(){ handle_exception("FIQ EXCEPTION\r\n", 0); }
Expand Down Expand Up @@ -61,6 +67,10 @@ void panic(const char* msg, uint64_t info) {
uart_raw_puts("Additional info: ");
uart_puthex(info);
uart_raw_puts("\r\n");
if (!old_panic_triggered && !panic_skip_trace) {
uart_raw_puts("Backtrace:\r\n");
trace();
}
uart_raw_puts("System Halted\r\n");
if (!old_panic_triggered){
char buf[STRING_MAX_LEN];
Expand Down
4 changes: 2 additions & 2 deletions kernel/fw/fw_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "console/kio.h"
#include "std/memory_access.h"
#include "memory/mmu.h"
#include "memory/addr.h"
#include "async.h"
#include "sysregs.h"
#include "std/string.h"
Expand Down Expand Up @@ -44,7 +45,6 @@ void fw_cfg_dma_operation(void* dest, uint32_t size, uint32_t ctrl) {
};

write64(PHYS_TO_VIRT(FW_CFG_DMA), __builtin_bswap64(pt_va_to_pa(&access)));

__asm__("isb");

if (!wait(&access.control, __builtin_bswap32(~0x1), false, 2000)){
Expand All @@ -71,7 +71,7 @@ bool fw_find_file(const char* search, struct fw_cfg_file *file) {

if (!fw_cfg_check())
return false;

u32 count = 0;
fw_cfg_dma_read(&count, sizeof(count), FW_LIST_DIRECTORY);

Expand Down
1 change: 1 addition & 0 deletions kernel/memory/addr.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "addr.h"
#include "va_layout.h"

#include "va_layout.h"

Expand Down
11 changes: 6 additions & 5 deletions kernel/memory/page_allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ void setup_page(uintptr_t address, uint8_t attributes){
}

paddr_t palloc_inner(uint64_t size, uint8_t level, uint8_t attributes, bool full, bool map) {
if (!size) return 0;
if (!alloc_max_page) page_alloc_init();
if (!page_alloc_high_va) page_alloc_enable_high_va();
uint64_t page_count = count_pages(size,PAGE_SIZE);
Expand Down Expand Up @@ -263,10 +264,10 @@ paddr_t palloc_inner(uint64_t size, uint8_t level, uint8_t attributes, bool full

uint64_t inv = ~mem_bitmap[i];
uint64_t bit = __builtin_ctzll(inv);
if (bit > (64 - page_count)){
continue;
}
while (bit < 64) {
uint64_t max_bit = 64 - page_count;
if (bit > max_bit) continue;

while (bit <= max_bit) {
bool found = true;
for (uint64_t b = bit; b < bit + page_count; b++){
if ((mem_bitmap[i] >> b) & 1ull){
Expand All @@ -277,7 +278,7 @@ paddr_t palloc_inner(uint64_t size, uint8_t level, uint8_t attributes, bool full
}
if (found) break;
}
if (bit >= 64) continue;
if (bit > max_bit) continue;
uintptr_t first_address = 0;
mem_page* prev_page = 0;

Expand Down
Loading
Loading