Compare commits

...

2 commits

3 changed files with 9 additions and 10 deletions

View file

@ -60,7 +60,7 @@ KERNEL_TARGET := build/boot/sys/core
.PHONY: all clean
all: build/disk.img drive.img build/mkbootoptions
all: build/disk.img drive.img
drive.img:
truncate -s 16M drive.img
@ -120,7 +120,4 @@ build/boot/sys:
config.mk: | config.default.mk
cp config.default.mk $@
build/mkbootoptions: tools/mkbootoptions.c
cc -g -Wall -Wextra $< -o $@
-include $(KERNEL_DEPFILES)

View file

@ -1,2 +1,3 @@
kernel=sys/core
ram.enable_logging=true
ps2.enable_logging=false
ram.enable_logging=false

View file

@ -6,6 +6,7 @@
#include "x86_64/asm.h"
#include "x86_64/ps2_driver.h"
#include "keyboard.h"
#include "bootparam.h"
#define PORT_STATUS 0x64
#define PORT_CMD 0x64
@ -35,11 +36,11 @@
#define CONFIG_BIT_PORT2_CLOCK_DISABLED 5
#define CONFIG_BIT_PORT1_TRANSLATION 6
#ifdef DEBUG_PS2
#define DEBUG_PRINTF(...) printf(__VA_ARGS__)
#else
#define DEBUG_PRINTF(...) do { } while (0)
#endif
bool ps2_enable_logging;
BOOTPARAM_BOOL("ps2.enable_logging", ps2_enable_logging);
#define DEBUG_PRINTF(...) do { if (ps2_enable_logging) { printf(__VA_ARGS__); } } while (0)
uint8_t
ps2_read_status() {