Skip to content

Commit

Permalink
Kernel: Use VirtualAddress & PhysicalAddress classes from LibBareMetal
Browse files Browse the repository at this point in the history
  • Loading branch information
supercomputer7 authored and awesomekling committed Feb 9, 2020
1 parent 7c4dd0c commit 99ea806
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 163 deletions.
2 changes: 1 addition & 1 deletion Kernel/ACPI/ACPIDynamicParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#include <Kernel/ACPI/ACPIStaticParser.h>
#include <Kernel/IRQHandler.h>
#include <Kernel/Lock.h>
#include <Kernel/VM/PhysicalAddress.h>
#include <Kernel/VM/PhysicalPage.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>

class ACPIDynamicParser final : public IRQHandler
, ACPIStaticParser {
Expand Down
6 changes: 3 additions & 3 deletions Kernel/ACPI/ACPIParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#include <AK/Types.h>
#include <Kernel/ACPI/Definitions.h>
#include <Kernel/FileSystem/File.h>
#include <Kernel/VM/PhysicalAddress.h>
#include <Kernel/VM/Region.h>
#include <Kernel/VM/VirtualAddress.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>
#include <LibBareMetal/Memory/VirtualAddress.h>

class ACPIParser {
public:
Expand All @@ -53,4 +53,4 @@ class ACPIParser {
protected:
explicit ACPIParser(bool usable);
bool m_operable;
};
};
4 changes: 2 additions & 2 deletions Kernel/ACPI/DMIDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

#include <AK/Types.h>
#include <AK/Vector.h>
#include <Kernel/VM/PhysicalAddress.h>
#include <Kernel/VM/Region.h>
#include <Kernel/VM/VirtualAddress.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>
#include <LibBareMetal/Memory/VirtualAddress.h>

namespace SMBIOS {
struct [[gnu::packed]] LegacyEntryPoint32bit
Expand Down
4 changes: 2 additions & 2 deletions Kernel/Arch/i386/CPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

#include <AK/Badge.h>
#include <AK/Noncopyable.h>
#include <Kernel/VM/PhysicalAddress.h>
#include <Kernel/VM/VirtualAddress.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>
#include <LibBareMetal/Memory/VirtualAddress.h>
#include <LibBareMetal/Output/kstdio.h>

#define PAGE_SIZE 4096
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Devices/BXVGADevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <AK/String.h>
#include <AK/Types.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/VM/PhysicalAddress.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>

class BXVGADevice final : public BlockDevice {
AK_MAKE_ETERNAL
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Devices/FloppyDiskDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/IRQHandler.h>
#include <Kernel/Lock.h>
#include <Kernel/VM/PhysicalAddress.h>
#include <Kernel/VM/PhysicalPage.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>

struct FloppyControllerCommand {
u8 cmd; // Command to send to the controller
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Devices/MBVGADevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <AK/String.h>
#include <AK/Types.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/VM/PhysicalAddress.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>

class MBVGADevice final : public BlockDevice {
AK_MAKE_ETERNAL
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Devices/PATAChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
#include <Kernel/IRQHandler.h>
#include <Kernel/Lock.h>
#include <Kernel/PCI/Access.h>
#include <Kernel/VM/PhysicalAddress.h>
#include <Kernel/VM/PhysicalPage.h>
#include <Kernel/WaitQueue.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>

struct PhysicalRegionDescriptor {
PhysicalAddress offset;
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Devices/SB16.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#include <AK/CircularQueue.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/IRQHandler.h>
#include <Kernel/VM/PhysicalAddress.h>
#include <Kernel/VM/PhysicalPage.h>
#include <Kernel/WaitQueue.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>

class SB16;

Expand Down
6 changes: 3 additions & 3 deletions Kernel/FileSystem/File.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@

#pragma once

#include <AK/String.h>
#include <AK/RefCounted.h>
#include <AK/NonnullRefPtr.h>
#include <AK/RefCounted.h>
#include <AK/String.h>
#include <AK/Types.h>
#include <Kernel/KResult.h>
#include <Kernel/UnixTypes.h>
#include <Kernel/VM/VirtualAddress.h>
#include <LibBareMetal/Memory/VirtualAddress.h>

class FileDescription;
class Process;
Expand Down
2 changes: 1 addition & 1 deletion Kernel/FileSystem/FileDescription.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/KBuffer.h>
#include <Kernel/Net/Socket.h>
#include <Kernel/VM/VirtualAddress.h>
#include <LibBareMetal/Memory/VirtualAddress.h>

class File;
class TTY;
Expand Down
2 changes: 1 addition & 1 deletion Kernel/VM/AnonymousVMObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

#pragma once

#include <Kernel/VM/PhysicalAddress.h>
#include <Kernel/VM/VMObject.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>

class AnonymousVMObject : public VMObject {
public:
Expand Down
66 changes: 0 additions & 66 deletions Kernel/VM/PhysicalAddress.h

This file was deleted.

2 changes: 1 addition & 1 deletion Kernel/VM/PhysicalPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <AK/NonnullRefPtr.h>
#include <Kernel/Assertions.h>
#include <Kernel/Heap/SlabAllocator.h>
#include <Kernel/VM/PhysicalAddress.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>

class PhysicalPage {
friend class MemoryManager;
Expand Down
2 changes: 1 addition & 1 deletion Kernel/VM/RangeAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <AK/String.h>
#include <AK/Traits.h>
#include <AK/Vector.h>
#include <Kernel/VM/VirtualAddress.h>
#include <LibBareMetal/Memory/VirtualAddress.h>

class Range {
friend class RangeAllocator;
Expand Down
77 changes: 0 additions & 77 deletions Kernel/VM/VirtualAddress.h

This file was deleted.

0 comments on commit 99ea806

Please sign in to comment.