~shrik3/aarch64-paging

(temp) todos in the comments v1 PROPOSED

: 1
 (temp) todos in the comments

 2 files changed, 7 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~shrik3/aarch64-paging/patches/48906/mbox | git am -3
Learn more about email & git

[PATCH] (temp) todos in the comments Export this patch

From: Tianhao Wang <wth@riseup.net>

Signed-off-by: Tianhao Wang <wth@riseup.net>
---
 src/lib.rs    | 2 ++
 src/paging.rs | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/src/lib.rs b/src/lib.rs
index c47c9d8..38f59ee 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2,6 +2,8 @@
// This project is dual-licensed under Apache 2.0 and MIT terms.
// See LICENSE-APACHE and LICENSE-MIT for details.

#![cfg(target_arch="aarch64")]

//! A library to manipulate AArch64 VMSA page tables.
//!
//! Currently it only supports:
diff --git a/src/paging.rs b/src/paging.rs
index 90cca4b..38b2743 100644
--- a/src/paging.rs
+++ b/src/paging.rs
@@ -467,6 +467,9 @@ bitflags! {

        // The following memory types assume that the MAIR registers
        // have been programmed accordingly.
        // TODO give a default MAIR_EL1 config
        // TODO memory type, a multi-bit field, is not a good fit for bitflags!.
        //      either use bitfield or ... have a workaround..
        const DEVICE_NGNRE  = 0 << 2;
        const NORMAL        = 1 << 2 | 3 << 8; // inner shareable

@@ -476,6 +479,8 @@ bitflags! {
        const NON_GLOBAL    = 1 << 11;
        const DBM           = 1 << 51;
        const EXECUTE_NEVER = 3 << 53;
        // TODO add UXN and PXN
        // TODO add shareability fields

        /// Software flags in block and page descriptor entries.
        const SWFLAG_0 = 1 << 55;
-- 
2.43.0