What is the difference between "access fault" and "page fault"?


#1

I found them to be similar, I want to know the difference between them.

Instruction access fault -> Instruction page fault
Load access fault -> Load page fault
Store/AMO access fault -> Store/AMO page fault


(Kade Phillips) #2

Access faults happen as a result of failing a PMP check [1]. Roughly speaking, it means that the processor is trying to use memory that it does not have permission to use. This can only occur in machines with at least User mode [2], since in Machine mode the processor is always allowed to access everything. Edit: PMP can be used to revoke Machine mode privileges, so it is possible for the processor with only M mode to fail a PMP check. Also, access faults can result from failing a PMA (physical memory attribute) check, which also applies to M mode.

Page faults generally happen when the processor is trying to use memory that it might have permission to use, but the block of memory hasn’t been made available yet [3]. Wikipedia has several articles on the subject; try searching “page fault”, “paging”, or “page table”. Page faults can only occur in machines with Supervisor mode, since Supervisor mode is required for a virtual memory system.

[1] Physical Memory Protection; see vol II pg 45 of the spec.
[2] The three legal combinations of privilege modes are M, M+U, and M+S+U; see vol II pg 3.
[3] See vol II ch 4, particularly pg 65.