1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00
Achilleas Anagnostopoulos 1fc9d20ed2 Reserve and protect zereod frame when initializing vmm
This vmm package exports ReservedZeroedFrame which can be used to setup
a lazy physical page allocation scheme. This is implemented by mapping
ReservedZeroedFrame to each page in a virtual memory region using the
following flag combination: FlagPresent | FlagCopyOnWrite.

This has the effect that all reads from the virtual address region
target the contents of ReservedZeroedFrame (always returning zero). On
the other hand, writes to the virtual address region trigger a page
fault which is resolved as follows:
- a new physical frame is allocated and the contents of ReservedZeroedFrame
  are copied to it (effectively clearing the new frame).
- the page entry for the virtual address that caused the fault is
  updated to point to the new frame and its flags are changed to:
  FlagPresent | FlagRW
- execution control is returned back to the code that caused the fault
2017-06-22 19:17:19 +01:00
2017-03-23 06:50:13 +00:00
2017-05-15 06:55:14 +01:00
2017-05-15 07:30:49 +01:00
2017-03-23 06:50:13 +00:00
2017-03-26 09:51:38 +01:00

gopheros

Build Status codecov Go Report Card

Let's write an experimental OS in Go!

Description
A proof of concept OS kernel written in Go
Readme 773 KiB
Languages
Go 84.9%
ASL 10.2%
Assembly 4%
Makefile 0.9%