-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Since commit 694e6c4, Luwen uses KMD's TLB allocation. The old hardcoded TLB mechanism was deprecated some code remains.
Background
With driver allocation, Luwen requests TLBs via allocate_tlb() ioctl and configures them via configure_tlb() ioctl. Direct TLB register programming and hardcoded TLB indices are no longer supported.
BAR0 maps to AXI address space. TLB windows reside within this space. Without the full BAR0 mapping, TLB windows are inaccessible via AXI methods. The pci_axi_* methods attempt to access addresses in TLB window range, which no longer works.
Cleanup Required
Remove PossibleTlbAllocation::Hardcoded:
- Remove variant from enum in
ttkmd-if/src/lib.rs - Remove
Hardcodedmatch arms in:setup_tlb(),get_tlb(),noc_write(),noc_read(),write_tlb(),read_tlb() - Remove direct TLB register programming:
tlb::grayskull::setup_tlb()tlb::wormhole::setup_tlb()tlb::blackhole::setup_tlb()tlb::setup_tlb()wrapper
Remove Python APIs exposing direct TLB programming:
PciGrayskull::setup_tlb(),::set_default_tlb(),::pci_axi_read32(),::pci_axi_write32()PciWormhole::setup_tlb(),::set_default_tlb()PciBlackhole::setup_tlb(),::set_default_tlb()- Remove from
pyluwen.pyi
Fix fallback logic:
- Remove
Hardcodedfallback inluwen-ref/src/lib.rs(lines 92-95)
Update examples:
- Fix
luwen-demoto use driver allocation
Address NoAllocation variant:
- Currently only has
todo!()placeholders—remove or implement
Notes
- Most affected code is GS-specific. Consider removing GS support entirely.
- Python code using
setup_tlb(index, ...)will need to migrate to driver allocation APIs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels