Changeset ccc362a1 in mainline for kernel/arch/riscv64/src/mm/km.c


Ignore:
Timestamp:
2017-08-21T18:46:34Z (7 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6c742f5e
Parents:
c16479e
Message:

riscv64: memory management routines, reflecting the latest Privileged Architecture specification (1.10)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/riscv64/src/mm/km.c

    rc16479e rccc362a1  
    3232
    3333#include <arch/mm/km.h>
     34#include <mm/km.h>
    3435#include <stdbool.h>
    3536#include <typedefs.h>
     37#include <macros.h>
    3638
    3739void km_identity_arch_init(void)
    3840{
     41        config.identity_base = KM_RISCV64_IDENTITY_START;
     42        config.identity_size = KM_RISCV64_IDENTITY_SIZE;
    3943}
    4044
    4145void km_non_identity_arch_init(void)
    4246{
     47        km_non_identity_span_add(KM_RISCV64_NON_IDENTITY_START,
     48            KM_RISCV64_NON_IDENTITY_SIZE);
    4349}
    4450
    4551bool km_is_non_identity_arch(uintptr_t addr)
    4652{
    47         return false;
     53        return iswithin(KM_RISCV64_NON_IDENTITY_START,
     54            KM_RISCV64_NON_IDENTITY_SIZE, addr, 1);
    4855}
    4956
Note: See TracChangeset for help on using the changeset viewer.