From 01ae6147274e210a157f83856d290e8b1cfbb73f Mon Sep 17 00:00:00 2001 From: Liav A Date: Fri, 27 Aug 2021 12:24:50 +0300 Subject: Kernel/VirtIO: Remove redundant VirtIO word from filenames Now that all related VirtIO classes are in the VirtIO namespace, let's just remove the redundant VirtIO word from filenames. --- Kernel/Bus/VirtIO/RNG.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Kernel/Bus/VirtIO/RNG.h (limited to 'Kernel/Bus/VirtIO/RNG.h') diff --git a/Kernel/Bus/VirtIO/RNG.h b/Kernel/Bus/VirtIO/RNG.h new file mode 100644 index 0000000000..ea4e8c775d --- /dev/null +++ b/Kernel/Bus/VirtIO/RNG.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021, the SerenityOS developers. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include +#include +#include + +namespace Kernel::VirtIO { + +#define REQUESTQ 0 + +class RNG final + : public RefCounted + , public VirtIO::Device { +public: + virtual StringView purpose() const override { return class_name(); } + + RNG(PCI::Address); + virtual ~RNG() override; + +private: + virtual StringView class_name() const override { return "VirtIOConsole"; } + virtual bool handle_device_config_change() override; + virtual void handle_queue_update(u16 queue_index) override; + void request_entropy_from_host(); + + OwnPtr m_entropy_buffer; + EntropySource m_entropy_source; +}; + +} -- cgit v1.2.3