O1能跑的代码

This commit is contained in:
fslongjin
2022-08-01 19:43:21 +08:00
parent 28e282d157
commit 58681fd34a
19 changed files with 71 additions and 28 deletions

View File

@ -9,6 +9,9 @@
#include <exception/irq.h>
#include <driver/interrupt/apic/apic.h>
#pragma GCC push_options
#pragma GCC optimize("O0")
spinlock_t xhci_controller_init_lock = {0}; // xhci控制器初始化锁(在usb_init中被初始化)
static int xhci_ctrl_count = 0; // xhci控制器计数
@ -921,4 +924,5 @@ failed:;
failed_exceed_max:;
kerror("Failed to initialize controller: bus=%d, dev=%d, func=%d", dev_hdr->header.bus, dev_hdr->header.device, dev_hdr->header.func);
spin_unlock(&xhci_controller_init_lock);
}
}
#pragma GCC optimize("O0")

View File

@ -2,7 +2,7 @@
#include <driver/usb/usb.h>
#include <driver/pci/pci.h>
#include <driver/pci/msi.h>
// #pragma GCC optimize("O0")
#define XHCI_MAX_HOST_CONTROLLERS 4 // 本驱动程序最大支持4个xhci root hub controller
#define XHCI_MAX_ROOT_HUB_PORTS 128 // 本驱动程序最大支持127个root hub 端口第0个保留