{"id":50844148,"url":"https://github.com/suhteevah/intel-nic-nostd","last_synced_at":"2026-06-14T08:05:39.833Z","repository":{"id":349727358,"uuid":"1199799041","full_name":"suhteevah/intel-nic-nostd","owner":"suhteevah","description":"no_std Intel Ethernet NIC driver (e1000/I219/I225) in Rust","archived":false,"fork":false,"pushed_at":"2026-06-12T08:46:03.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-12T10:22:06.494Z","etag":null,"topics":["bare-metal","driver","embedded","ethernet","networking","nic","no-std","operating-system","osdev","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suhteevah.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-02T18:09:57.000Z","updated_at":"2026-05-30T06:06:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/suhteevah/intel-nic-nostd","commit_stats":null,"previous_names":["suhteevah/intel-nic-nostd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/suhteevah/intel-nic-nostd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhteevah%2Fintel-nic-nostd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhteevah%2Fintel-nic-nostd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhteevah%2Fintel-nic-nostd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhteevah%2Fintel-nic-nostd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suhteevah","download_url":"https://codeload.github.com/suhteevah/intel-nic-nostd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhteevah%2Fintel-nic-nostd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34313633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bare-metal","driver","embedded","ethernet","networking","nic","no-std","operating-system","osdev","rust"],"created_at":"2026-06-14T08:05:38.890Z","updated_at":"2026-06-14T08:05:39.828Z","avatar_url":"https://github.com/suhteevah.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# intel-nic-nostd\n\n[![Crates.io](https://img.shields.io/crates/v/intel-nic-nostd.svg)](https://crates.io/crates/intel-nic-nostd)\n[![Documentation](https://docs.rs/intel-nic-nostd/badge.svg)](https://docs.rs/intel-nic-nostd)\n[![License](https://img.shields.io/crates/l/intel-nic-nostd.svg)](https://github.com/suhteevah/intel-nic-nostd)\n\nA `#![no_std]` Intel Ethernet NIC driver for bare-metal Rust, supporting the e1000, e1000e (I219-V), and igc (I225-V/I226-V) families.\n\n## Supported Hardware\n\n| Family | Devices | Speed |\n|--------|---------|-------|\n| **e1000** | 82540EM, 82545EM | 1 GbE |\n| **e1000e** | I219-V, I219-LM (Skylake through Alder Lake) | 1 GbE |\n| **igc** | I225-V, I225-LM, I226-V, I226-LM, I226-IT | 2.5 GbE |\n\nThe driver auto-detects the NIC variant from PCI vendor/device IDs and applies family-specific quirks (GIO master disable for I225, EEPROM access differences, PHY initialization, packet buffer sizing).\n\n## Features\n\n- **Pure `no_std` + `alloc`** -- no OS dependencies, no `std` required\n- **Single driver struct** (`E1000`) for all three families with variant-based dispatch\n- **Full initialization sequence** -- software reset, EEPROM MAC read with RAL/RAH fallback, PHY auto-negotiation, descriptor ring setup\n- **Legacy descriptor format** -- 256-entry RX/TX rings with 2048-byte DMA buffers\n- **Interrupt handling** -- link status change, RX/TX completion, receiver overrun\n- **PHY management** -- MII register access via MDIC, auto-negotiation, link status detection\n- **Extensive logging** via the `log` crate at trace/debug/info/warn/error levels\n\n## Usage\n\nAdd to your `Cargo.toml`:\n\n```toml\n[dependencies]\nintel-nic-nostd = \"0.1\"\n```\n\nInitialize from your PCI enumeration:\n\n```rust,ignore\nuse intel_nic_nostd::{E1000, NicVariant};\n\n// Detect NIC from PCI config space\nlet variant = NicVariant::from_pci_ids(vendor_id, device_id)\n    .expect(\"unsupported NIC\");\n\n// Provide a virtual-to-physical address translation function\nfn virt_to_phys(virt: usize) -\u003e u64 {\n    // Your page table translation here\n    virt as u64\n}\n\n// Initialize the NIC (bar0 must be MMIO-mapped, bus mastering enabled)\nlet mut nic = unsafe {\n    E1000::init(bar0_ptr, irq_line, variant, virt_to_phys)\n}.expect(\"NIC init failed\");\n\n// Transmit a frame\nnic.transmit(\u0026ethernet_frame).unwrap();\n\n// Receive a frame\nlet mut buf = [0u8; 2048];\nif let Ok(Some(len)) = nic.receive(\u0026mut buf) {\n    // Process buf[..len]\n}\n\n// Handle interrupt (call from your IRQ handler)\nlet icr = nic.handle_interrupt();\n```\n\n## Requirements\n\n- A global allocator (the driver heap-allocates descriptor rings and DMA buffers)\n- A virtual-to-physical address translation function\n- PCI bus mastering must be enabled before calling `E1000::init`\n- The `log` crate facade must be initialized for diagnostic output\n\n## Architecture\n\n```\nintel-nic-nostd\n  lib.rs         -- NicVariant enum, error types, re-exports\n  regs.rs        -- MMIO register offsets, bit definitions, read/write helpers\n  descriptors.rs -- RX/TX descriptor structs, ring buffer management\n  phy.rs         -- PHY (MII) register access, auto-negotiation, link detection\n  e1000.rs       -- Core driver: init, transmit, receive, interrupt handling\n  i225.rs        -- I225-V/I226-V specific quirks and register offsets\n```\n\n## License\n\nLicensed under either of:\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT License ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuhteevah%2Fintel-nic-nostd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuhteevah%2Fintel-nic-nostd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuhteevah%2Fintel-nic-nostd/lists"}