9#ifndef MAXOS_DRIVERS_ETHERNET_AMD_AM79C973_H
10#define MAXOS_DRIVERS_ETHERNET_AMD_AM79C973_H
13#include <common/macros.h>
19namespace MaxOS::drivers::ethernet {
86 uint8_t send_buffers[2 * 1024 + 15][8] { };
87 uint8_t current_send_buffer;
90 uint8_t recv_buffers[2 * 1024 + 15][8] { };
91 uint8_t current_recv_buffer;
96 volatile bool init_done;
98 void fetch_data_received();
99 void fetch_data_sent();
106 uint32_t
reset()
final;
118 void do_send(uint8_t* buffer, uint32_t size)
final;
struct PACKED MaxOS::drivers::ethernet::InitializationBlock initialisation_block_t
Alias for InitializationBlock struct.
struct PACKED MaxOS::drivers::ethernet::BufferDescriptor buffer_descriptor_t
Alias for BufferDescriptor struct.
Driver for the AMD AM79C973 Ethernet Controller.
uint32_t reset() final
This function resets the device.
string vendor_name() final
Get who created the device.
string device_name() final
Get the device name of the driver.
void activate() final
This function activates the device and starts it (Runs when the driver-manger calls activateAll())
void handle_interrupt() final
This function handles the interrupt for the device.
uint64_t get_media_access_control_address() final
This function gets the MAC address.
void do_send(uint8_t *buffer, uint32_t size) final
This function sends a package.
void deactivate() final
Deactivate the driver.
Driver for the Ethernet Controller, manages the sending and receiving of data, the mac address,...
Handles a certain interrupt number.
Stores information about a PCI device.
Defines an EthernetDriver class for managing Ethernet communication, including sending and receiving ...
uint64_t MediaAccessControlAddress
Used to make MAC addresses more readable.
Defines a InterruptManager and InterruptHandler for managing hardware and software interrupts.
Defines a Peripheral Component Interconnect (PCI) controller for managing PCI devices and loading the...
Defines classes for handling hardware communication ports (8, 16, and 32 bit)
Defines the layout of a buffer descriptor for the AMD AM79C973 Ethernet Controller.
uint32_t flags
Flags for the buffer.
uint32_t avail
Indicates whether the buffer is available to be used.
uint64_t address
Physical address of the buffer.
uint32_t flags2
Additional flags for the buffer (.
The initialization block for the AMD AM79C973 Ethernet Controller.
unsigned reserved2
Unused, must be zero.
uint64_t physical_address
The physical (MAC) address of the device (Not 64 bits but will be treated like it is)
unsigned num_send_buffers
How many buffers are used for sending.
uint64_t logical_address
The logical address filter for the device to use when deciding whether to accept a packet (0 = no fil...
unsigned num_recv_buffers
How many buffers are used for receiving.
unsigned reserved1
Unused, must be zero.
uint16_t mode
The operation mode.
uint32_t recv_buffer_descr_address
Physical address of the first receive buffer descriptor.
uint32_t send_buffer_descr_address
Physical address of the first send buffer descriptor.
uint16_t reserved3
Unused, must be zero.