Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 1b478f6 in mainline


Ignore:
Timestamp:
2011-12-14T23:54:17Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
c72dc15
Parents:
464a52f
Message:

Add km_is_non_identity().

Location:
kernel
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/abs32le/include/mm/km.h

    r464a52f r1b478f6  
    3636#define KERN_abs32le_KM_H_
    3737
     38#include <typedefs.h>
     39
    3840extern void km_identity_arch_init(void);
    3941extern void km_non_identity_arch_init(void);
     42extern bool km_is_non_identity_arch(uintptr_t);
    4043
    4144#endif
  • kernel/arch/abs32le/src/mm/km.c

    r464a52f r1b478f6  
    3232
    3333#include <arch/mm/km.h>
     34#include <typedefs.h>
    3435
    3536void km_identity_arch_init(void)
     
    4142}
    4243
     44bool km_is_non_identity_arch(uintptr_t addr)
     45{
     46        return false;
     47}
     48
    4349/** @}
    4450 */
  • kernel/arch/amd64/include/mm/km.h

    r464a52f r1b478f6  
    3636#define KERN_amd64_KM_H_
    3737
     38#include <typedefs.h>
     39
    3840#define KM_AMD64_IDENTITY_START         UINT64_C(0xffff800000000000)
    3941#define KM_AMD64_IDENTITY_SIZE          UINT64_C(0x0000400000000000)
     
    4446extern void km_identity_arch_init(void);
    4547extern void km_non_identity_arch_init(void);
     48extern bool km_is_non_identity_arch(uintptr_t);
    4649
    4750#endif
  • kernel/arch/amd64/src/mm/km.c

    r464a52f r1b478f6  
    3434#include <mm/km.h>
    3535#include <config.h>
     36#include <typedefs.h>
     37#include <macros.h>
    3638
    3739void km_identity_arch_init(void)
     
    4749}
    4850
     51bool km_is_non_identity_arch(uintptr_t addr)
     52{
     53        return iswithin(KM_AMD64_NON_IDENTITY_START,
     54            KM_AMD64_NON_IDENTITY_SIZE, addr, 1);
     55}
     56
    4957/** @}
    5058 */
  • kernel/arch/arm32/include/mm/km.h

    r464a52f r1b478f6  
    3636#define KERN_arm32_KM_H_
    3737
     38#include <typedefs.h>
     39
    3840#define KM_ARM32_IDENTITY_START         UINT32_C(0x80000000)
    3941#define KM_ARM32_IDENTITY_SIZE          UINT32_C(0x40000000)
     
    4446extern void km_identity_arch_init(void);
    4547extern void km_non_identity_arch_init(void);
     48extern bool km_is_non_identity_arch(uintptr_t);
    4649
    4750#endif
  • kernel/arch/arm32/src/mm/km.c

    r464a52f r1b478f6  
    3434#include <mm/km.h>
    3535#include <config.h>
     36#include <typedefs.h>
     37#include <macros.h>
    3638
    3739void km_identity_arch_init(void)
     
    4749}
    4850
     51bool km_is_non_identity_arch(uintptr_t addr)
     52{
     53        return iswithin(KM_ARM32_NON_IDENTITY_START,
     54            KM_ARM32_NON_IDENTITY_SIZE, addr, 1);
     55}
     56
    4957/** @}
    5058 */
  • kernel/arch/ia32/include/mm/km.h

    r464a52f r1b478f6  
    3636#define KERN_ia32_KM_H_
    3737
     38#include <typedefs.h>
     39
    3840#define KM_IA32_IDENTITY_START          UINT32_C(0x80000000)
    3941#define KM_IA32_IDENTITY_SIZE           UINT32_C(0x40000000)
     
    4446extern void km_identity_arch_init(void);
    4547extern void km_non_identity_arch_init(void);
     48extern bool km_is_non_identity_arch(uintptr_t);
    4649
    4750#endif
  • kernel/arch/ia32/src/mm/km.c

    r464a52f r1b478f6  
    3434#include <mm/km.h>
    3535#include <config.h>
     36#include <typedefs.h>
     37#include <macros.h>
    3638
    3739void km_identity_arch_init(void)
     
    4749}
    4850
     51bool km_is_non_identity_arch(uintptr_t addr)
     52{
     53        return iswithin(KM_IA32_NON_IDENTITY_START, KM_IA32_NON_IDENTITY_SIZE,
     54            addr, 1);
     55}
     56
    4957/** @}
    5058 */
  • kernel/arch/ia64/include/mm/km.h

    r464a52f r1b478f6  
    3636#define KERN_ia64_KM_H_
    3737
     38#include <typedefs.h>
     39
    3840/*
    3941 * Be conservative and assume the minimal (3 + 51)-bit virtual address width
     
    5052extern void km_identity_arch_init(void);
    5153extern void km_non_identity_arch_init(void);
     54extern bool km_is_non_identity_arch(uintptr_t);
    5255
    5356#endif
  • kernel/arch/ia64/src/mm/km.c

    r464a52f r1b478f6  
    3434#include <mm/km.h>
    3535#include <config.h>
     36#include <typedefs.h>
     37#include <macros.h>
    3638
    3739void km_identity_arch_init(void)
     
    4749}
    4850
     51bool km_is_non_identity_arch(uintptr_t addr)
     52{
     53        return iswithin(KM_IA64_NON_IDENTITY_START, KM_IA64_NON_IDENTITY_SIZE,
     54            addr, 1);
     55}
     56
    4957/** @}
    5058 */
  • kernel/arch/mips32/include/mm/km.h

    r464a52f r1b478f6  
    3636#define KERN_mips32_KM_H_
    3737
     38#include <typedefs.h>
     39
    3840#define KM_MIPS32_KSEG0_START   UINT32_C(0x80000000)
    3941#define KM_MIPS32_KSEG0_SIZE    UINT32_C(0x20000000)
     
    4749extern void km_identity_arch_init(void);
    4850extern void km_non_identity_arch_init(void);
     51extern bool km_is_non_identity_arch(uintptr_t);
    4952
    5053#endif
  • kernel/arch/mips32/src/mm/km.c

    r464a52f r1b478f6  
    3434#include <mm/km.h>
    3535#include <config.h>
     36#include <typedefs.h>
     37#include <macros.h>
    3638
    3739void km_identity_arch_init(void)
     
    4749}
    4850
     51bool km_is_non_identity_arch(uintptr_t addr)
     52{
     53        return iswithin(KM_MIPS32_KSSEG_START, KM_MIPS32_KSSEG_SIZE, addr, 1)
     54            || iswithin(KM_MIPS32_KSEG3_START, KM_MIPS32_KSEG3_SIZE, addr, 1);
     55}
     56
    4957/** @}
    5058 */
  • kernel/arch/mips64/include/mm/km.h

    r464a52f r1b478f6  
    3636#define KERN_mips64_KM_H_
    3737
     38#include <typedefs.h>
     39
    3840extern void km_identity_arch_init(void);
    3941extern void km_non_identity_arch_init(void);
     42extern bool km_is_non_identity_arch(uintptr_t);
    4043
    4144#endif
  • kernel/arch/mips64/src/mm/km.c

    r464a52f r1b478f6  
    3232
    3333#include <arch/mm/km.h>
     34#include <typedefs.h>
    3435
    3536void km_identity_arch_init(void)
     
    4142}
    4243
     44bool km_is_non_identity_arch(uintptr_t addr)
     45{
     46        return false;
     47}
     48
    4349/** @}
    4450 */
  • kernel/arch/ppc32/include/mm/km.h

    r464a52f r1b478f6  
    3636#define KERN_ppc32_KM_H_
    3737
     38#include <typedefs.h>
     39
    3840#define KM_PPC32_IDENTITY_START         UINT32_C(0x80000000)
    3941#define KM_PPC32_IDENTITY_SIZE          UINT32_C(0x40000000)
     
    4446extern void km_identity_arch_init(void);
    4547extern void km_non_identity_arch_init(void);
     48extern bool km_is_non_identity_arch(uintptr_t);
    4649
    4750#endif
  • kernel/arch/ppc32/src/mm/km.c

    r464a52f r1b478f6  
    3434#include <mm/km.h>
    3535#include <config.h>
     36#include <typedefs.h>
     37#include <macros.h>
    3638
    3739void km_identity_arch_init(void)
     
    4749}
    4850
     51bool km_is_non_identity_arch(uintptr_t addr)
     52{
     53        return iswithin(KM_PPC32_NON_IDENTITY_START,
     54            KM_PPC32_NON_IDENTITY_SIZE, addr, 1);
     55}
     56
    4957/** @}
    5058 */
  • kernel/arch/sparc64/include/mm/sun4u/km.h

    r464a52f r1b478f6  
    3636#define KERN_sparc64_sun4u_KM_H_
    3737
     38#include <typedefs.h>
     39
    3840/*
    3941 * Be conservative and assume the 44-bit virtual address width as found
     
    5355extern void km_identity_arch_init(void);
    5456extern void km_non_identity_arch_init(void);
     57extern bool km_is_non_identity_arch(uintptr_t);
    5558
    5659#endif
  • kernel/arch/sparc64/include/mm/sun4v/km.h

    r464a52f r1b478f6  
    3636#define KERN_sparc64_sun4v_KM_H_
    3737
     38#include <typedefs.h>
     39
    3840/*
    3941 * Do not use the 4 GiB area on either side of the VA hole to meet the
     
    4951extern void km_identity_arch_init(void);
    5052extern void km_non_identity_arch_init(void);
     53extern bool km_is_non_identity_arch(uintptr_t);
    5154
    5255#endif
  • kernel/arch/sparc64/src/mm/sun4u/km.c

    r464a52f r1b478f6  
    3434#include <mm/km.h>
    3535#include <config.h>
     36#include <typedefs.h>
     37#include <macros.h>
    3638
    3739void km_identity_arch_init(void)
     
    4749}
    4850
     51bool km_is_non_identity_arch(uintptr_t addr)
     52{
     53        return iswithin(KM_SPARC64_US_NON_IDENTITY_START,
     54            KM_SPARC64_US_NON_IDENTITY_SIZE, addr, 1);
     55}
     56
    4957/** @}
    5058 */
  • kernel/arch/sparc64/src/mm/sun4v/km.c

    r464a52f r1b478f6  
    3434#include <mm/km.h>
    3535#include <config.h>
     36#include <typedefs.h>
     37#include <macros.h>
    3638
    3739void km_identity_arch_init(void)
     
    4749}
    4850
     51bool km_is_non_identity_arch(uintptr_t addr)
     52{
     53        return iswithin(KM_SPARC64_T1_NON_IDENTITY_START,
     54            KM_SPARC64_T1_NON_IDENTITY_SIZE, addr, 1);
     55}
     56
    4957/** @}
    5058 */
  • kernel/generic/include/mm/km.h

    r464a52f r1b478f6  
    4646extern void km_page_free(uintptr_t, size_t);
    4747
     48extern bool km_is_non_identity(uintptr_t);
     49
    4850#endif
    4951
  • kernel/generic/src/mm/km.c

    r464a52f r1b478f6  
    6161}
    6262
     63bool km_is_non_identity(uintptr_t addr)
     64{
     65        return km_is_non_identity_arch(addr);
     66}
     67
    6368void km_non_identity_span_add(uintptr_t base, size_t size)
    6469{
Note: See TracChangeset for help on using the changeset viewer.