You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/10 08:41:14 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7060: risc-v/mmu: Fix L3 mappings for kernel, and mpfs protected mode users…

pkarashchenko commented on code in PR #7060:
URL: https://github.com/apache/incubator-nuttx/pull/7060#discussion_r967620480


##########
arch/risc-v/src/mpfs/mpfs_mm_init.c:
##########
@@ -58,6 +58,19 @@
 #define PGT_L2_SIZE     (512)  /* Enough to map 1 GiB */
 #define PGT_L3_SIZE     (1024) /* Enough to map 4 MiB */
 
+#define SLAB_COUNT      sizeof(m_l3_pgtable) / RV_MMU_PAGE_SIZE

Review Comment:
   ```suggestion
   #define SLAB_COUNT      (sizeof(m_l3_pgtable) / RV_MMU_PAGE_SIZE)
   ```



##########
arch/risc-v/src/qemu-rv/qemu_rv_mm_init.c:
##########
@@ -58,6 +58,19 @@
 #define PGT_L2_SIZE     (512)  /* Enough to map 1 GiB */
 #define PGT_L3_SIZE     (1024) /* Enough to map 4 MiB (2MiB x 2) */
 
+#define SLAB_COUNT      sizeof(m_l3_pgtable) / RV_MMU_PAGE_SIZE

Review Comment:
   ```suggestion
   #define SLAB_COUNT      (sizeof(m_l3_pgtable) / RV_MMU_PAGE_SIZE)
   ```



##########
arch/risc-v/src/mpfs/mpfs_userspace.c:
##########
@@ -45,19 +46,30 @@
 
 #define PGT_L1_PBASE    (uint64_t)&m_l1_pgtable
 #define PGT_L2_PBASE    (uint64_t)&m_l2_pgtable
-#define PGT_L3_ROMPBASE (uint64_t)&m_l3_romtbl
-#define PGT_L3_RAMPBASE (uint64_t)&m_l3_ramtbl
+#define PGT_L3_PBASE    (uint64_t)&m_l3_pgtable
 #define PGT_L1_VBASE    PGT_L1_PBASE
 #define PGT_L2_VBASE    PGT_L2_PBASE
-#define PGT_L3_ROMVBASE PGT_L3_ROMPBASE
-#define PGT_L3_RAMVBASE PGT_L3_RAMPBASE
+#define PGT_L3_VBASE    PGT_L3_PBASE
 
 #define PGT_L1_SIZE     (512)  /* Enough to map 512 GiB */
 #define PGT_L2_SIZE     (512)  /* Enough to map 1 GiB */
-#define PGT_L3_SIZE     (512)  /* Enough to map 2 MiB */
+#define PGT_L3_SIZE     (1024) /* Enough to map 4 MiB */
+
+#define SLAB_COUNT      sizeof(m_l3_pgtable) / RV_MMU_PAGE_SIZE

Review Comment:
   ```suggestion
   #define SLAB_COUNT      (sizeof(m_l3_pgtable) / RV_MMU_PAGE_SIZE)
   ```



##########
arch/risc-v/src/mpfs/mpfs_mm_init.c:
##########
@@ -58,6 +58,19 @@
 #define PGT_L2_SIZE     (512)  /* Enough to map 1 GiB */
 #define PGT_L3_SIZE     (1024) /* Enough to map 4 MiB */
 
+#define SLAB_COUNT      sizeof(m_l3_pgtable) / RV_MMU_PAGE_SIZE

Review Comment:
   ```suggestion
   #define SLAB_COUNT      (sizeof(m_l3_pgtable) / RV_MMU_PAGE_SIZE)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org