Ignore:
Timestamp:
2016-09-01T22:14:30Z (8 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c2d54a
Parents:
8b6aa39
Message:

amd64: resurrect optional support for the 'large' memory model ('kernel' memory model stays the default)

File:
1 edited

Legend:

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

    r8b6aa39 r4bf0926e  
    4242#define PAGE_SIZE   FRAME_SIZE
    4343
     44#ifdef MEMORY_MODEL_kernel
     45
    4446#ifndef __ASM__
    4547
     
    5355
    5456#endif /* __ASM__ */
     57
     58#endif /* MEMORY_MODEL_kernel */
     59
     60#ifdef MEMORY_MODEL_large
     61
     62#ifndef __ASM__
     63
     64#define KA2PA(x)  (((uintptr_t) (x)) - UINT64_C(0xffff800000000000))
     65#define PA2KA(x)  (((uintptr_t) (x)) + UINT64_C(0xffff800000000000))
     66
     67#else /* __ASM__ */
     68
     69#define KA2PA(x)  ((x) - 0xffff800000000000)
     70#define PA2KA(x)  ((x) + 0xffff800000000000)
     71
     72#endif /* __ASM__ */
     73
     74#endif /* MEMORY_MODEL_large */
    5575
    5676/* Number of entries in each level. */
Note: See TracChangeset for help on using the changeset viewer.