Skip to content

Conversation

@IanSeyler
Copy link
Member

This pull request introduces several updates to the BareMetal API and network drivers to improve memory handling, descriptor management, and overall consistency in function definitions. The changes include updates to assembly and C code for network interfaces and system calls, as well as adjustments to constants and function parameters.

BareMetal API Updates:

  • Updated parameter descriptions in api/libBareMetal.asm for functions like b_output, b_net_tx, b_net_rx, b_nvs_read, and b_nvs_write to replace "Memory location" with "Memory address" for clarity.
  • Renamed MAC_GET to NET_STATUS and added NET_CONFIG for better alignment with network functionality.

Network Driver Enhancements:

  • Refactored descriptor handling in net_i8254x_init, net_i8257x_init, and net_i8259x_init to use explicit memory assignments (mov [rdi+nt_*]) instead of stos* instructions, improving clarity and maintainability. [1] [2] [3]
  • Added new net_*_config functions for Intel NIC drivers (i8254x, i8257x, i8259x) to streamline packet storage initialization. [1] [2] [3]
  • Increased i8254x_MAX_DESC and i8257x_MAX_DESC to 2048, standardizing descriptor count across drivers. [1] [2]

System Call Adjustments:

  • Updated b_output syscall in src/syscalls/io.asm to clarify input parameter as "Memory address of message."

C Code Refinements:

  • Modified b_net_rx in api/libBareMetal.c to ensure proper register assignments (=D for memory address and =c for packet length).

@IanSeyler IanSeyler self-assigned this Jun 22, 2025
@IanSeyler IanSeyler merged commit 66ebd71 into master Jun 22, 2025
6 checks passed
@IanSeyler IanSeyler deleted the zerocopy branch June 22, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants