1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:18:12 +00:00

Kernel: Introduce the new SysFS

The intention is to add dynamic mechanism for notifying the userspace
about hotplug events. Currently, the DMI (SMBIOS) blobs and ACPI tables
are exposed in the new filesystem.
This commit is contained in:
Liav A 2021-03-13 12:01:44 +02:00 committed by Andreas Kling
parent dc6defa7af
commit 92c0dab5ab
13 changed files with 839 additions and 202 deletions

View file

@ -9,14 +9,36 @@
#include <AK/Types.h>
#include <Kernel/ACPI/Definitions.h>
#include <Kernel/ACPI/Initialize.h>
#include <Kernel/FileSystem/File.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/SystemExposed.h>
#include <Kernel/VM/Region.h>
#include <Kernel/VirtualAddress.h>
namespace Kernel {
namespace ACPI {
class ExposedFolder : public SystemExposedFolder {
public:
static void initialize();
private:
ExposedFolder();
};
class ExposedComponent : public SystemExposedComponent {
public:
static NonnullRefPtr<ExposedComponent> create(String name, PhysicalAddress, size_t table_size);
virtual KResultOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer&, FileDescription*) const override;
protected:
OwnPtr<KBuffer> try_to_generate_buffer() const;
ExposedComponent(String name, PhysicalAddress, size_t table_size);
PhysicalAddress m_paddr;
size_t m_length;
};
class Parser {
public:
static Parser* the();