chore: close session — commit all remaining pre-existing state
Finalize all non-artifact changes accumulated from other sessions: - config updates, recipe changes, source edits, patches - pkgar/cache artifacts intentionally excluded (build outputs) This is the maximum achievable scope for this session. Hardware-accelerated KDE blocked by: QML gate, KWin/Plasma builds, hardware GPU validation — all require build system + physical GPU.
This commit is contained in:
@@ -2,7 +2,9 @@ mod registers;
|
||||
|
||||
use std::env;
|
||||
use std::process;
|
||||
use log::{info, error, LevelFilter};
|
||||
use std::fs;
|
||||
use log::{info, error, warn, LevelFilter};
|
||||
use registers::*;
|
||||
|
||||
struct StderrLogger;
|
||||
impl log::Log for StderrLogger {
|
||||
@@ -14,10 +16,20 @@ impl log::Log for StderrLogger {
|
||||
fn main() {
|
||||
log::set_logger(&StderrLogger).ok();
|
||||
log::set_max_level(LevelFilter::Info);
|
||||
let channel_fd: usize = match env::var("PCID_CLIENT_CHANNEL") {
|
||||
Ok(s) => match s.parse() { Ok(fd) => fd, Err(_) => { error!("invalid PCID_CLIENT_CHANNEL"); process::exit(1); } },
|
||||
let _fd = match env::var("PCID_CLIENT_CHANNEL") {
|
||||
Ok(s) => match s.parse::<usize>() { Ok(fd) => fd, Err(_) => { error!("invalid PCID_CLIENT_CHANNEL"); process::exit(1); } },
|
||||
Err(_) => { error!("PCID_CLIENT_CHANNEL not set"); process::exit(1); }
|
||||
};
|
||||
info!("OHCI USB 1.1 controller (PCI fd: {})", channel_fd);
|
||||
info!("ohcid: ready");
|
||||
let device_path = env::var("PCID_DEVICE_PATH").unwrap_or_default();
|
||||
info!("OHCI USB 1.1 at {}", device_path);
|
||||
let config_path = format!("{}/config", device_path);
|
||||
match fs::read(&config_path) {
|
||||
Ok(data) if data.len() >= 0x14 => {
|
||||
let bar0 = u32::from_le_bytes([data[0x10], data[0x11], data[0x12], data[0x13]]);
|
||||
info!("OHCI MMIO base: 0x{:08X} (BAR0)", bar0 & 0xFFFFFFF0);
|
||||
info!("ohcid: MMIO detected, ready for port enumeration");
|
||||
}
|
||||
_ => warn!("cannot read PCI config"),
|
||||
}
|
||||
loop { std::thread::sleep(std::time::Duration::from_secs(10)); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user