1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:27:34 +00:00

Kernel/Net: Support Intel 82574 adapter

We call it E1000E, because the layout for these cards is somewhat not
the same like E1000 supported cards.

Also, this card supports advanced features that are not supported on
8254x cards.
This commit is contained in:
Liav A 2021-06-04 10:11:37 +03:00 committed by Ali Mohammad Pur
parent 2e2201e8e1
commit c6480a0426
8 changed files with 200 additions and 20 deletions

View file

@ -0,0 +1,40 @@
/*
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/NonnullOwnPtrVector.h>
#include <AK/OwnPtr.h>
#include <Kernel/IO.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Net/E1000NetworkAdapter.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/PCI/Access.h>
#include <Kernel/PCI/Device.h>
#include <Kernel/Random.h>
namespace Kernel {
class E1000ENetworkAdapter final
: public E1000NetworkAdapter {
public:
static RefPtr<E1000ENetworkAdapter> try_to_initialize(PCI::Address);
virtual bool initialize() override;
virtual ~E1000ENetworkAdapter() override;
virtual const char* purpose() const override { return class_name(); }
private:
E1000ENetworkAdapter(PCI::Address, u8 irq);
virtual const char* class_name() const override { return "E1000ENetworkAdapter"; }
virtual void detect_eeprom() override;
virtual u32 read_eeprom(u8 address) override;
};
}