mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:27:43 +00:00
Kernel: Move PAGE_MASK define to the shared CPU.h header
These are the same for both x86 and aarch64 for now. Also update some include paths to use the generic CPU.h header.
This commit is contained in:
parent
5cc190ad70
commit
a47271ebdc
6 changed files with 10 additions and 11 deletions
|
@ -9,6 +9,13 @@
|
|||
|
||||
#include <AK/Platform.h>
|
||||
|
||||
#define PAGE_MASK (~(FlatPtr)0xfffu)
|
||||
|
||||
#define LSW(x) ((u32)(x)&0xFFFF)
|
||||
#define MSW(x) (((u32)(x) >> 16) & 0xFFFF)
|
||||
#define LSB(x) ((x)&0xFF)
|
||||
#define MSB(x) (((x) >> 8) & 0xFF)
|
||||
|
||||
#if ARCH(X86_64) || ARCH(I386)
|
||||
# include <Kernel/Arch/x86/CPU.h>
|
||||
#elif ARCH(AARCH64)
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define PAGE_MASK (~(FlatPtr)0xfffu)
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
void drop_to_exception_level_1();
|
||||
|
|
|
@ -18,7 +18,6 @@ VALIDATE_IS_X86()
|
|||
/* Map IRQ0-15 @ ISR 0x50-0x5F */
|
||||
#define IRQ_VECTOR_BASE 0x50
|
||||
#define GENERIC_INTERRUPT_HANDLERS_COUNT (256 - IRQ_VECTOR_BASE)
|
||||
#define PAGE_MASK (~(FlatPtr)0xfffu)
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -36,11 +35,6 @@ inline u32 get_iopl_from_eflags(u32 eflags)
|
|||
DescriptorTablePointer const& get_gdtr();
|
||||
DescriptorTablePointer const& get_idtr();
|
||||
|
||||
#define LSW(x) ((u32)(x)&0xFFFF)
|
||||
#define MSW(x) (((u32)(x) >> 16) & 0xFFFF)
|
||||
#define LSB(x) ((x)&0xFF)
|
||||
#define MSB(x) (((x) >> 8) & 0xFF)
|
||||
|
||||
constexpr FlatPtr page_base_of(FlatPtr address)
|
||||
{
|
||||
return address & PAGE_MASK;
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include <AK/Types.h>
|
||||
#include <LibC/sys/arch/i386/regs.h>
|
||||
|
||||
#include <Kernel/Arch/CPU.h>
|
||||
#include <Kernel/Arch/x86/ASM_wrapper.h>
|
||||
#include <Kernel/Arch/x86/CPU.h>
|
||||
|
||||
#include <AK/Platform.h>
|
||||
VALIDATE_IS_X86()
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
#include <AK/Try.h>
|
||||
#include <Kernel/Arch/CPU.h>
|
||||
#include <Kernel/Arch/Delay.h>
|
||||
#include <Kernel/Arch/x86/CPU.h>
|
||||
#include <Kernel/Arch/x86/IO.h>
|
||||
#include <Kernel/Arch/x86/VGA/IOArbiter.h>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/Assertions.h>
|
||||
#include <Kernel/Arch/x86/CPU.h>
|
||||
#include <Kernel/Arch/CPU.h>
|
||||
#include <Kernel/Panic.h>
|
||||
#include <Kernel/Process.h>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue