Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/arch/mm/page.h

    r6ecf5b8 r4bf0926e  
    4242#define PAGE_SIZE   FRAME_SIZE
    4343
     44#ifdef MEMORY_MODEL_kernel
     45
     46#ifndef __ASM__
     47
     48#define KA2PA(x)  (((uintptr_t) (x)) - UINT64_C(0xffffffff80000000))
     49#define PA2KA(x)  (((uintptr_t) (x)) + UINT64_C(0xffffffff80000000))
     50
     51#else /* __ASM__ */
     52
     53#define KA2PA(x)  ((x) - 0xffffffff80000000)
     54#define PA2KA(x)  ((x) + 0xffffffff80000000)
     55
     56#endif /* __ASM__ */
     57
     58#endif /* MEMORY_MODEL_kernel */
     59
     60#ifdef MEMORY_MODEL_large
     61
    4462#ifndef __ASM__
    4563
     
    5371
    5472#endif /* __ASM__ */
     73
     74#endif /* MEMORY_MODEL_large */
    5575
    5676/* Number of entries in each level. */
     
    6181
    6282/* Page table sizes for each level. */
    63 #define PTL0_SIZE_ARCH  ONE_FRAME
    64 #define PTL1_SIZE_ARCH  ONE_FRAME
    65 #define PTL2_SIZE_ARCH  ONE_FRAME
    66 #define PTL3_SIZE_ARCH  ONE_FRAME
     83#define PTL0_FRAMES_ARCH  1
     84#define PTL1_FRAMES_ARCH  1
     85#define PTL2_FRAMES_ARCH  1
     86#define PTL3_FRAMES_ARCH  1
    6787
    6888/* Macros calculating indices into page tables in each level. */
Note: See TracChangeset for help on using the changeset viewer.