Cleanup AHCI Ident a bit and reduce logging

This commit is contained in:
Drew Galbraith 2023-06-12 23:32:24 -07:00
parent 72885190e9
commit b8b6576b7f
8 changed files with 195 additions and 68 deletions

View file

@ -136,7 +136,6 @@ void ParseMcfg(SdtHeader* rsdt) {
void ParseMadt(SdtHeader* rsdt) {
#if K_ACPI_DEBUG
dbgsz(rsdt->signature, 4);
#endif
uint64_t max_addr = reinterpret_cast<uint64_t>(rsdt) + rsdt->length;
MadtHeader* header = reinterpret_cast<MadtHeader*>(rsdt);
@ -180,6 +179,7 @@ void ParseMadt(SdtHeader* rsdt) {
entry = reinterpret_cast<MadtEntry*>(reinterpret_cast<uint64_t>(entry) +
entry->length);
}
#endif
}
void ParseSdt(SdtHeader* rsdt) {

View file

@ -7,7 +7,7 @@
#include "common/port.h"
#include "debug/debug.h"
#define APIC_DEBUG 1
#define APIC_DEBUG 0
namespace {

View file

@ -187,7 +187,6 @@ z_err_t ChannelRecv(ZChannelRecvReq* req) {
z_err_t PortRecv(ZPortRecvReq* req) {
auto& proc = gScheduler->CurrentProcess();
dbgln("Port cap %u", req->port_cap);
auto port_cap = proc.GetCapability(req->port_cap);
RET_ERR(ValidateCap(port_cap, Capability::PORT, ZC_READ));
@ -199,12 +198,10 @@ z_err_t IrqRegister(ZIrqRegisterReq* req, ZIrqRegisterResp* resp) {
auto& proc = gScheduler->CurrentProcess();
if (req->irq_num != Z_IRQ_PCI_BASE) {
// FIXME: Don't hardcode this nonsense.
dbgln("Irq %x", req->irq_num);
return Z_ERR_UNIMPLEMENTED;
}
RefPtr<Port> port = MakeRefCounted<Port>();
resp->port_cap = proc.AddCapability(port);
dbgln("Port cap %u", resp->port_cap);
RegisterPciPort(port);
return Z_OK;
}