From 1127c771ce95b2f3eed9f7c6f2498d49c0cb4321 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 10 Jan 2017 20:49:18 -0700 Subject: [PATCH] WIP: XHCI --- Cargo.toml | 1 + drivers | 2 +- filesystem/etc/pcid.toml | 7 +++++++ filesystem/home/user/minimal.toml | 21 +++++++++++++++++++++ mk/qemu.mk | 3 +++ mk/userspace/drivers.mk | 3 ++- 6 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 filesystem/home/user/minimal.toml diff --git a/Cargo.toml b/Cargo.toml index 5683e19..4ec2cc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ members = [ "drivers/ps2d", "drivers/rtl8168d", "drivers/vesad", + "drivers/xhcid", "installer", "kernel", "programs/acid", diff --git a/drivers b/drivers index cc29946..778852f 160000 --- a/drivers +++ b/drivers @@ -1 +1 @@ -Subproject commit cc299464fc11e01649ad8a09b127397e68901b77 +Subproject commit 778852f92d835c17327819bde28c19db8096a4b1 diff --git a/filesystem/etc/pcid.toml b/filesystem/etc/pcid.toml index da177da..b68865e 100644 --- a/filesystem/etc/pcid.toml +++ b/filesystem/etc/pcid.toml @@ -11,3 +11,10 @@ class = 2 vendor = 4332 device = 33128 command = ["/sbin/rtl8168d", "$NAME", "$BAR2", "$IRQ"] + +[[drivers]] +name = "XHCI" +class = 12 +subclass = 3 +interface = 48 +command = ["/sbin/xhcid", "$NAME", "$BAR0", "$IRQ"] diff --git a/filesystem/home/user/minimal.toml b/filesystem/home/user/minimal.toml new file mode 100644 index 0000000..535dc4d --- /dev/null +++ b/filesystem/home/user/minimal.toml @@ -0,0 +1,21 @@ +# This is the default configuration file + +# General settings +[general] +# Do not prompt if settings are not defined +prompt = false + +# Package settings +[packages] +coreutils = {} +extrautils = {} +ion = {} + +# User settings +[users.root] +# Password is set to "password" +password = "$argon2i$m=4096,t=10,p=1$Tnc4UVV0N00$ML9LIOujd3nmAfkAwEcSTMPqakWUF0OUiLWrIy0nGLk" +uid = 0 +gid = 0 +name = "root" +home = "/root" diff --git a/mk/qemu.mk b/mk/qemu.mk index ef50bf7..c723bcb 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -17,6 +17,9 @@ endif ifeq ($(vga),no) QEMUFLAGS+=-nographic -vga none endif +ifneq ($(usb),no) + QEMUFLAGS+=-device nec-usb-xhci,id=xhci -device usb-tablet,bus=xhci.0 +endif ifeq ($(UNAME),Linux) ifneq ($(kvm),no) QEMUFLAGS+=-enable-kvm -cpu host diff --git a/mk/userspace/drivers.mk b/mk/userspace/drivers.mk index 122285f..b3d06bc 100644 --- a/mk/userspace/drivers.mk +++ b/mk/userspace/drivers.mk @@ -1,7 +1,8 @@ drivers: \ filesystem/sbin/pcid \ filesystem/sbin/e1000d \ - filesystem/sbin/rtl8168d + filesystem/sbin/rtl8168d \ + filesystem/sbin/xhcid initfs/bin/%: drivers/%/Cargo.toml drivers/%/src/** $(BUILD)/libstd.rlib mkdir -p initfs/bin