mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
Kernel: Harvest randomness from various drivers
Random now gets entropy from the following drivers: - KeyboardDevice - PATAChannel - PS2MouseDevice - E1000NetworkAdapter - RTL8139NetworkAdapter Of these devices, PS2MouseDevice and PATAChannel provide the vast majority of the entropy.
This commit is contained in:
parent
2e8cfe5435
commit
af0b2d1d86
12 changed files with 71 additions and 7 deletions
|
@ -28,11 +28,12 @@
|
|||
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <Kernel/IO.h>
|
||||
#include <Kernel/Interrupts/IRQHandler.h>
|
||||
#include <Kernel/Net/NetworkAdapter.h>
|
||||
#include <Kernel/PCI/Access.h>
|
||||
#include <Kernel/PCI/Device.h>
|
||||
#include <Kernel/IO.h>
|
||||
#include <Kernel/Random.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -103,6 +104,7 @@ private:
|
|||
u8 m_interrupt_line { 0 };
|
||||
bool m_has_eeprom { false };
|
||||
bool m_use_mmio { false };
|
||||
EntropySource m_entropy_source;
|
||||
|
||||
static const size_t number_of_rx_descriptors = 32;
|
||||
static const size_t number_of_tx_descriptors = 8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue