execute1: Generate privileged instruction interrupts when MSR[PR] = 1
authorPaul Mackerras <paulus@ozlabs.org>
Tue, 28 Apr 2020 09:38:58 +0000 (19:38 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 28 Apr 2020 21:48:40 +0000 (07:48 +1000)
commit74db0710678d4871843a783edfa602ed621c91d1
tree2a9bb3c24c099aee627c207717d18a43efb8090f
parentb55c9cc2987d30974adb06d2130ad774944252fd
execute1: Generate privileged instruction interrupts when MSR[PR] = 1

This adds logic to execute1 to check, when MSR[PR] = 1, whether each
instruction arriving to be executed is a privileged instruction.
If it is, a privileged-instruction type program interrupt is generated.
For the mtspr and mfspr instructions, we need to look at bit 20 of the
instruction (bit 4 of the SPR number) to determine if the SPR is
privileged.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
execute1.vhdl