mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:47: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
|
@ -184,6 +184,8 @@ void RTL8139NetworkAdapter::handle_irq(const RegisterState&)
|
|||
int status = in16(REG_ISR);
|
||||
out16(REG_ISR, status);
|
||||
|
||||
m_entropy_source.add_random_event(status);
|
||||
|
||||
#ifdef RTL8139_DEBUG
|
||||
klog() << "RTL8139NetworkAdapter::handle_irq status=0x" << String::format("%x", status);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue