ahci, ihda, pci, xhci: logging adjustments
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use log::{error, info, trace};
|
||||
use log::{debug, error, info, trace};
|
||||
use std::mem::size_of;
|
||||
use std::ops::DerefMut;
|
||||
use std::{ptr, u32};
|
||||
@@ -128,7 +128,7 @@ impl HbaPort {
|
||||
// Power on and spin up device
|
||||
self.cmd.writef(1 << 2 | 1 << 1, true);
|
||||
|
||||
info!(" - AHCI init {:X}", self.cmd.read());
|
||||
debug!(" - AHCI init {:X}", self.cmd.read());
|
||||
}
|
||||
|
||||
pub unsafe fn identify(&mut self, clb: &mut Dma<[HbaCmdHeader; 32]>, ctbas: &mut [Dma<HbaCmdTable>; 32]) -> Option<u64> {
|
||||
|
||||
@@ -699,11 +699,11 @@ impl IntelHDA {
|
||||
|
||||
pub fn info(&self) {
|
||||
log::info!("Intel HD Audio Version {}.{}", self.regs.vmaj.read(), self.regs.vmin.read());
|
||||
log::info!("IHDA: Input Streams: {}", self.num_input_streams());
|
||||
log::info!("IHDA: Output Streams: {}", self.num_output_streams());
|
||||
log::info!("IHDA: Bidirectional Streams: {}", self.num_bidirectional_streams());
|
||||
log::info!("IHDA: Serial Data Outputs: {}", self.num_serial_data_out());
|
||||
log::info!("IHDA: 64-Bit: {}", self.regs.gcap.read() & 1 == 1);
|
||||
log::debug!("IHDA: Input Streams: {}", self.num_input_streams());
|
||||
log::debug!("IHDA: Output Streams: {}", self.num_output_streams());
|
||||
log::debug!("IHDA: Bidirectional Streams: {}", self.num_bidirectional_streams());
|
||||
log::debug!("IHDA: Serial Data Outputs: {}", self.num_serial_data_out());
|
||||
log::debug!("IHDA: 64-Bit: {}", self.regs.gcap.read() & 1 == 1);
|
||||
}
|
||||
|
||||
fn get_input_stream_descriptor(&self, index: usize) -> Option<&'static mut StreamDescriptorRegs> {
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ use std::sync::{Arc, Mutex};
|
||||
use std::{i64, thread};
|
||||
|
||||
use structopt::StructOpt;
|
||||
use log::{error, info, warn, trace};
|
||||
use log::{debug, error, info, warn, trace};
|
||||
use redox_log::{OutputBuilder, RedoxLogger};
|
||||
|
||||
use crate::config::Config;
|
||||
@@ -398,7 +398,7 @@ fn handle_parsed_header(state: Arc<State>, config: &Config, bus_num: u8,
|
||||
} else {
|
||||
Vec::new()
|
||||
};
|
||||
info!("PCI DEVICE CAPABILITIES for {}: {:?}", args.iter().map(|string| string.as_ref()).nth(0).unwrap_or("[unknown]"), capabilities);
|
||||
debug!("PCI DEVICE CAPABILITIES for {}: {:?}", args.iter().map(|string| string.as_ref()).nth(0).unwrap_or("[unknown]"), capabilities);
|
||||
|
||||
use driver_interface::LegacyInterruptPin;
|
||||
|
||||
|
||||
+7
-8
@@ -1,8 +1,7 @@
|
||||
# Disabled - causes issues on real hardware
|
||||
# [[drivers]]
|
||||
# name = "XHCI"
|
||||
# class = 12
|
||||
# subclass = 3
|
||||
# interface = 48
|
||||
# command = ["xhcid"]
|
||||
# use_channel = true
|
||||
[[drivers]]
|
||||
name = "XHCI"
|
||||
class = 12
|
||||
subclass = 3
|
||||
interface = 48
|
||||
command = ["xhcid"]
|
||||
use_channel = true
|
||||
|
||||
+5
-6
@@ -16,7 +16,6 @@ use pcid_interface::irq_helpers::{read_bsp_apic_id, allocate_single_interrupt_ve
|
||||
use pcid_interface::msi::{MsiCapability, MsixCapability, MsixTableEntry};
|
||||
|
||||
use event::{Event, EventQueue};
|
||||
use log::info;
|
||||
use redox_log::{RedoxLogger, OutputBuilder};
|
||||
use syscall::data::Packet;
|
||||
use syscall::error::EWOULDBLOCK;
|
||||
@@ -103,7 +102,7 @@ fn get_int_method(pcid_handle: &mut PcidServerHandle, address: usize) -> (Option
|
||||
};
|
||||
|
||||
let all_pci_features = pcid_handle.fetch_all_features().expect("xhcid: failed to fetch pci features");
|
||||
info!("XHCI PCI FEATURES: {:?}", all_pci_features);
|
||||
log::debug!("XHCI PCI FEATURES: {:?}", all_pci_features);
|
||||
|
||||
let (has_msi, mut msi_enabled) = all_pci_features.iter().map(|(feature, status)| (feature.is_msi(), status.is_enabled())).find(|&(f, _)| f).unwrap_or((false, false));
|
||||
let (has_msix, mut msix_enabled) = all_pci_features.iter().map(|(feature, status)| (feature.is_msix(), status.is_enabled())).find(|&(f, _)| f).unwrap_or((false, false));
|
||||
@@ -144,7 +143,7 @@ fn get_int_method(pcid_handle: &mut PcidServerHandle, address: usize) -> (Option
|
||||
pcid_handle.set_feature_info(SetFeatureInfo::Msi(set_feature_info)).expect("xhcid: failed to set feature info");
|
||||
|
||||
pcid_handle.enable_feature(PciFeature::Msi).expect("xhcid: failed to enable MSI");
|
||||
info!("Enabled MSI");
|
||||
log::debug!("Enabled MSI");
|
||||
|
||||
(Some(interrupt_handle), InterruptMethod::Msi)
|
||||
} else if msix_enabled {
|
||||
@@ -205,11 +204,11 @@ fn get_int_method(pcid_handle: &mut PcidServerHandle, address: usize) -> (Option
|
||||
};
|
||||
|
||||
pcid_handle.enable_feature(PciFeature::MsiX).expect("xhcid: failed to enable MSI-X");
|
||||
info!("Enabled MSI-X");
|
||||
log::debug!("Enabled MSI-X");
|
||||
|
||||
method
|
||||
} else if pci_config.func.legacy_interrupt_pin.is_some() {
|
||||
info!("Legacy IRQ {}", irq);
|
||||
log::debug!("Legacy IRQ {}", irq);
|
||||
|
||||
// legacy INTx# interrupt pins.
|
||||
(Some(File::open(format!("irq:{}", irq)).expect("xhcid: failed to open legacy IRQ file")), InterruptMethod::Intx)
|
||||
@@ -247,7 +246,7 @@ fn daemon(daemon: redox_daemon::Daemon) -> ! {
|
||||
|
||||
let _logger_ref = setup_logging(&name);
|
||||
|
||||
info!("XHCI PCI CONFIG: {:?}", pci_config);
|
||||
log::debug!("XHCI PCI CONFIG: {:?}", pci_config);
|
||||
let bar = pci_config.func.bars[0];
|
||||
let bar_size = pci_config.func.bar_sizes[0];
|
||||
let irq = pci_config.func.legacy_interrupt_line;
|
||||
|
||||
@@ -500,7 +500,7 @@ impl Xhci {
|
||||
}
|
||||
|
||||
pub async fn probe(&self) -> Result<()> {
|
||||
info!("XHCI capabilities: {:?}", self.capabilities_iter().collect::<Vec<_>>());
|
||||
debug!("XHCI capabilities: {:?}", self.capabilities_iter().collect::<Vec<_>>());
|
||||
|
||||
let port_count = { self.ports.lock().unwrap().len() };
|
||||
|
||||
@@ -913,7 +913,7 @@ pub fn start_irq_reactor(hci: &Arc<Xhci>, irq_file: Option<File>) {
|
||||
debug!("About to start IRQ reactor");
|
||||
|
||||
*hci.irq_reactor.lock().unwrap() = Some(thread::spawn(move || {
|
||||
info!("Started IRQ reactor thread");
|
||||
debug!("Started IRQ reactor thread");
|
||||
IrqReactor::new(hci_clone, receiver, irq_file).run()
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user