diff options
author | Liav A <liavalb@gmail.com> | 2021-08-27 12:24:50 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-31 16:51:13 +0200 |
commit | 01ae6147274e210a157f83856d290e8b1cfbb73f (patch) | |
tree | 6d2602a49dd1d616d41183635c30baa7d59d5b5e /Kernel/Bus/VirtIO/RNG.h | |
parent | e418740645c2ac28d725c859ba07df0d76b3aab8 (diff) | |
download | serenity-01ae6147274e210a157f83856d290e8b1cfbb73f.zip |
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.
Diffstat (limited to 'Kernel/Bus/VirtIO/RNG.h')
-rw-r--r-- | Kernel/Bus/VirtIO/RNG.h | 37 |
1 files changed, 37 insertions, 0 deletions
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 <AK/RefCounted.h> +#include <Kernel/Bus/VirtIO/Device.h> +#include <Kernel/Devices/CharacterDevice.h> +#include <Kernel/Random.h> + +namespace Kernel::VirtIO { + +#define REQUESTQ 0 + +class RNG final + : public RefCounted<RNG> + , 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<Memory::Region> m_entropy_buffer; + EntropySource m_entropy_source; +}; + +} |