mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37: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
|
@ -287,6 +287,8 @@ void KeyboardDevice::handle_irq(const RegisterState&)
|
|||
u8 ch = raw & 0x7f;
|
||||
bool pressed = !(raw & 0x80);
|
||||
|
||||
m_entropy_source.add_random_event(raw);
|
||||
|
||||
if (raw == 0xe0) {
|
||||
m_has_e0_prefix = true;
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue