oxidecomputer / phbl

Pico Host Boot Loader
Mozilla Public License 2.0
101 stars 7 forks source link

machine state: Set CR0:WP #15

Closed dancrossnyc closed 2 years ago

dancrossnyc commented 2 years ago

Set CR0[WP] so that the CPU enforces write protection permissions in kernel mode. E.g., prevent the CPU from writing to a read-only page in kernel mode.

Signed-off-by: Dan Cross cross@oxidecomputer.com

dancrossnyc commented 2 years ago

I believe the gimlets are tied up (Bryan's using sn14 for a demo at OSFC), so I'm going to test this on Ethanol-X. It's architectural, so that shouldn't make too much of a difference.

dancrossnyc commented 2 years ago

Tested on Olivia. illumos appears to boot normally.