aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMarvin Borner2020-11-13 19:13:29 +0100
committerMarvin Borner2020-11-13 19:13:29 +0100
commita1770aac3af3b6b893af9937e0d0712902eeb9e6 (patch)
treec45df5cb814f54901121bc63ba6b9832003aa700 /kernel
parent8d08b8e80440b310e623c0ae397065bf28d94d1e (diff)
Removed some useless code
I spent several hours tracing the bug that followed me since months, but I haven't found it yet :( Where are you, HEISENBUG?!
Diffstat (limited to 'kernel')
-rw-r--r--kernel/Makefile4
-rw-r--r--kernel/drivers/timer.c1
-rw-r--r--kernel/features/net.c7
-rw-r--r--kernel/main.c6
4 files changed, 6 insertions, 12 deletions
diff --git a/kernel/Makefile b/kernel/Makefile
index dd3ce5a..1bc41c5 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -1,10 +1,8 @@
# MIT License, Copyright (c) 2020 Marvin Borner
-
+# acpi.o fpu.o
COBJS = main.o \
- drivers/acpi.o \
drivers/interrupts.o \
drivers/interrupts_asm.o \
- drivers/fpu.o \
drivers/keyboard.o \
drivers/mouse.o \
drivers/pci.o \
diff --git a/kernel/drivers/timer.c b/kernel/drivers/timer.c
index e9e90a0..17a8991 100644
--- a/kernel/drivers/timer.c
+++ b/kernel/drivers/timer.c
@@ -1,6 +1,5 @@
// MIT License, Copyright (c) 2020 Marvin Borner
-#include <acpi.h>
#include <cpu.h>
#include <def.h>
#include <interrupts.h>
diff --git a/kernel/features/net.c b/kernel/features/net.c
index dae7d2d..91702d6 100644
--- a/kernel/features/net.c
+++ b/kernel/features/net.c
@@ -53,13 +53,13 @@ struct socket *socket_new(struct list *list)
* Helper functions
*/
-u16 next_port(void)
+static u16 next_port(void)
{
static u16 port = 49152;
return port++;
}
-int same_net(u32 ip_addr)
+static int same_net(u32 ip_addr)
{
return (ip_addr & subnet_mask) == (gateway_addr & subnet_mask);
}
@@ -672,7 +672,8 @@ void net_install(void)
// Request
struct socket *socket = net_open(S_TCP);
- if (net_connect(socket, ip(10, 0, 0, 33), 80))
+ // if (net_connect(socket, ip(216, 58, 206, 227), 80)) // TODO: Google!
+ if (net_connect(socket, ip(216, 58, 206, 227), 80))
net_send(socket, strdup(http_req), strlen(http_req));
else
print("Couldn't connect!\n");
diff --git a/kernel/main.c b/kernel/main.c
index 6e666b5..d567963 100644
--- a/kernel/main.c
+++ b/kernel/main.c
@@ -1,17 +1,15 @@
// MIT License, Copyright (c) 2020 Marvin Borner
-#include <acpi.h>
#include <boot.h>
#include <cpu.h>
-#include <fpu.h>
#include <fs.h>
+#include <interrupts.h>
#include <keyboard.h>
#include <load.h>
#include <mem.h>
#include <mouse.h>
#include <net.h>
#include <pci.h>
-#include <print.h>
#include <serial.h>
#include <syscall.h>
#include <timer.h>
@@ -29,10 +27,8 @@ void kernel_main(struct vid_info *vid_info)
cpu_print();
// Install drivers
- acpi_install();
pci_install();
interrupts_install();
- /* fpu_install(); */
timer_install();
keyboard_install();
mouse_install();