mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
Kernel/NE2000: Harvest entropy from NE2000 interrupts
This commit is contained in:
parent
e788bbdb55
commit
9b57c6a013
1 changed files with 3 additions and 0 deletions
|
@ -188,6 +188,9 @@ UNMAP_AFTER_INIT NE2000NetworkAdapter::~NE2000NetworkAdapter()
|
|||
bool NE2000NetworkAdapter::handle_irq(const RegisterState&)
|
||||
{
|
||||
u8 status = in8(REG_RW_INTERRUPTSTATUS);
|
||||
|
||||
m_entropy_source.add_random_event(status);
|
||||
|
||||
dbgln_if(NE2000_DEBUG, "NE2000NetworkAdapter: Got interrupt, status={:#02x}", status);
|
||||
if (status == 0) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue