Black-Parrot Privileges

7 views
Skip to first unread message

Jeffery Lim

unread,
Apr 14, 2025, 1:04:53 PM4/14/25
to black-parrot
Hello,

I've been trying to understand privilege memory reads/writes in BP a bit better, and have been playing around in the simulations to try understand how BP handles privilege faults.

As far as I understand, if I try to do a read to a virtual address that is then mapped at the supervisor level from user space, I get a load_page_fault from the page table walker. (I am basing my code off this example code, with some changes to change the access levels).

What I am trying to understand is how the DMMU in the memory pipeline ties into to this, as the page table walker will raise the exception flag as the instructions leaves the scheduler (dispatch_pkt). The DMMU can also raise privilege-based faults, but I can't seem to wrap my head around how to structure my code to do this, as I keep trigger the exception at the PTW instead of the DMMU.

Any insight and information would be greatly appreciated!

Thanks,

Jeffery Lim

Dan Petrisko

unread,
Apr 14, 2025, 3:59:45 PM4/14/25
to Jeffery Lim, black-parrot
Hi Jeffery,

One simple sequence to trigger a DMMU fault is:
- set up a RW PTE with dirty bit 'D' set to 0
- load from an address (this will miss in the TLB, causing a fill)
- store to that address (this will fault since the dirty bit 'D' is not set)

Best,
-Dan

--
You received this message because you are subscribed to the Google Groups "black-parrot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to black-parrot...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/black-parrot/ad463a9a-f10c-4d9a-80dc-a8a787111f9fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages