FreeNOS
Macros
ARMFirstTable.cpp File Reference
#include <FreeNOS/System.h>
#include <SplitAllocator.h>
#include <MemoryBlock.h>
#include "ARMCore.h"
#include "ARMConstant.h"
#include "ARMFirstTable.h"

Go to the source code of this file.

Macros

#define DIRENTRY(vaddr)   ((vaddr) >> DIRSHIFT)
 Entry inside the page directory of a given virtual address. More...
 
First Level Entry Types.
See also
ARM Architecture Reference Manual, page 731.
#define PAGE1_NONE   0
 
#define PAGE1_TABLE   (1 << 0)
 
#define PAGE1_SECTION   (1 << 1)
 
First Level Memory Types

Inner cache: local L1 cache for one core.

Outer cache: shared L2 cache for a subset of multiple cores. Write-Back cache: sync cache data later, let host continue immediately (faster). Write-Through cache: sync cache and RAM simulatously (slower). Allocate-On-Write: Each write claims a cache entry. No-Allocate-On-Write: Write do no claim a cache entry, only write the RAM directly.

See also
https://en.wikipedia.org/wiki/Cache_(computing)
#define PAGE1_UNCACHED   (PAGE1_TEX)
 Disable all caching. More...
 
#define PAGE1_CACHE_WRITEBACK   (PAGE1_TEX | PAGE1_CACHE | PAGE1_BUFFER)
 Outer and Inner Write-Back. More...
 
#define PAGE1_CACHE_WRITETHROUGH   (PAGE1_CACHE)
 Outer and Inner Write-Through. More...
 
#define PAGE1_DEVICE_PRIV   ((1 << 13))
 Memory Mapped Device (Private) More...
 
#define PAGE1_DEVICE_SHARED   (PAGE1_BUFFER)
 Memory Mapped Device (Shared) More...
 
#define PAGE1_TEX   (1 << 12)
 
#define PAGE1_CACHE   (1 << 3)
 
#define PAGE1_BUFFER   (1 << 2)
 
#define PAGE1_SHARED   (1 << 16)
 
Access permission flags
#define PAGE1_NOEXEC   (1 << 4)
 No-execution flag. More...
 
#define PAGE1_APX   (1 << 9)
 
#define PAGE1_AP_USER   (1 << 11)
 
#define PAGE1_AP_SYS   (1 << 10)
 

Macro Definition Documentation

◆ DIRENTRY

#define DIRENTRY (   vaddr)    ((vaddr) >> DIRSHIFT)

Entry inside the page directory of a given virtual address.

Parameters
vaddrVirtual Address.
Returns
Index of the corresponding page directory entry.

Definition at line 110 of file ARMFirstTable.cpp.

◆ PAGE1_AP_SYS

#define PAGE1_AP_SYS   (1 << 10)

Definition at line 97 of file ARMFirstTable.cpp.

◆ PAGE1_AP_USER

#define PAGE1_AP_USER   (1 << 11)

Definition at line 94 of file ARMFirstTable.cpp.

◆ PAGE1_APX

#define PAGE1_APX   (1 << 9)

Definition at line 90 of file ARMFirstTable.cpp.

◆ PAGE1_BUFFER

#define PAGE1_BUFFER   (1 << 2)

Definition at line 71 of file ARMFirstTable.cpp.

◆ PAGE1_CACHE

#define PAGE1_CACHE   (1 << 3)

Definition at line 70 of file ARMFirstTable.cpp.

◆ PAGE1_CACHE_WRITEBACK

#define PAGE1_CACHE_WRITEBACK   (PAGE1_TEX | PAGE1_CACHE | PAGE1_BUFFER)

Outer and Inner Write-Back.

Allocate on write.

Definition at line 58 of file ARMFirstTable.cpp.

◆ PAGE1_CACHE_WRITETHROUGH

#define PAGE1_CACHE_WRITETHROUGH   (PAGE1_CACHE)

Outer and Inner Write-Through.

No allocate on write.

Definition at line 61 of file ARMFirstTable.cpp.

◆ PAGE1_DEVICE_PRIV

#define PAGE1_DEVICE_PRIV   ((1 << 13))

Memory Mapped Device (Private)

Definition at line 64 of file ARMFirstTable.cpp.

◆ PAGE1_DEVICE_SHARED

#define PAGE1_DEVICE_SHARED   (PAGE1_BUFFER)

Memory Mapped Device (Shared)

Definition at line 67 of file ARMFirstTable.cpp.

◆ PAGE1_NOEXEC

#define PAGE1_NOEXEC   (1 << 4)

No-execution flag.

Definition at line 84 of file ARMFirstTable.cpp.

◆ PAGE1_NONE

#define PAGE1_NONE   0

Definition at line 32 of file ARMFirstTable.cpp.

◆ PAGE1_SECTION

#define PAGE1_SECTION   (1 << 1)

Definition at line 34 of file ARMFirstTable.cpp.

◆ PAGE1_SHARED

#define PAGE1_SHARED   (1 << 16)

Definition at line 72 of file ARMFirstTable.cpp.

◆ PAGE1_TABLE

#define PAGE1_TABLE   (1 << 0)

Definition at line 33 of file ARMFirstTable.cpp.

◆ PAGE1_TEX

#define PAGE1_TEX   (1 << 12)

Definition at line 69 of file ARMFirstTable.cpp.

◆ PAGE1_UNCACHED

#define PAGE1_UNCACHED   (PAGE1_TEX)

Disable all caching.

Definition at line 55 of file ARMFirstTable.cpp.