Skip to content

Commit

Permalink
Kernel/NE2000: Harvest entropy from NE2000 interrupts
Browse files Browse the repository at this point in the history
  • Loading branch information
twvd authored and awesomekling committed Jul 24, 2021
1 parent e788bbd commit 9b57c6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Kernel/Net/NE2000NetworkAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9b57c6a

Please sign in to comment.