From 2a9fdd3e6bba7e4808ca45d4a951ad056c443e0e Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 13 Mar 2024 23:10:06 -0400 Subject: man: pmap(9): Update prot define names Signed-off-by: Ian Moffett --- share/man/man9/pmap.9 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'share/man') diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 index 9e4d5e0..a0c8347 100644 --- a/share/man/man9/pmap.9 +++ b/share/man/man9/pmap.9 @@ -24,7 +24,7 @@ .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. -.Dd Jan 12 2024 +.Dd Mar 13 2024 .Dt PMAP 9 .Os Hyra .Sh NAME @@ -48,13 +48,13 @@ vm_prot_t is used to give a mapping certain access rules. These rules are described below: The -.Ft PMAP_WRITABLE +.Ft PROT_WRITABLE bit tells pmap_map() to allow writes to the page. Writes to pages without this bit will result in an exception, on AMD64 a #PF will occur. The -.Ft PMAP_EXEC +.Ft PROT_EXEC bit tells pmap_map() to allow this page to be executable. On platforms like AMD64, execution of pages without this bit will result in an exception from the -- cgit v1.2.3 From 3ed679807e88e2b25b01076f56f38372d7d42522 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 13 Mar 2024 23:14:32 -0400 Subject: man: pmap(9): Fix formatting Signed-off-by: Ian Moffett --- share/man/man9/pmap.9 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'share/man') diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 index a0c8347..e50a8ab 100644 --- a/share/man/man9/pmap.9 +++ b/share/man/man9/pmap.9 @@ -32,8 +32,11 @@ .Sh SYNOPSIS .In vm/pmap.h -.Ft pmap_map(struct vm_ctx *, vaddr_t, paddr_t, vm_prot_t); -.Ft pmap_unmap(struct vm_ctx *, vaddr_t); +.Bd -literal +int pmap_map(struct vm_ctx *, vaddr_t, paddr_t, vm_prot_t); +int pmap_unmap(struct vm_ctx *, vaddr_t); +.Ed + .Sh DESCRIPTION The machine dependent virtual memory layer contains a standard set of functions that shall be implemented per architecture and left alone -- cgit v1.2.3 From 0ea5a3e31c93e1c3e8dc8e121d63fc42a24e1d30 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 13 Mar 2024 23:24:53 -0400 Subject: man: arch(9): Document process control block Signed-off-by: Ian Moffett --- share/man/man9/arch.9 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man9/arch.9 b/share/man/man9/arch.9 index adbc437..89cdb41 100644 --- a/share/man/man9/arch.9 +++ b/share/man/man9/arch.9 @@ -24,7 +24,7 @@ .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. -.Dd Jan 12 2024 +.Dd Mar 13 2024 .Dt ARCH 9 .Os Hyra .Sh NAME @@ -113,5 +113,16 @@ header, should be a struct containing information about the address space. This header MUST be implemented or compiler errors will occur. +There also exists a +.Ft pcb +(Process Control Block) structure in the +.Ft machine/pcb.h +header which contains arch specific information per thread. + +This structure must be implemented per arch, this structure shall be set up +by the machdep subsystem, specifically in the +.Ft processor_init_pcb() +routine. + .Sh AUTHORS .An Ian Moffett Aq Mt ian@osmora.org -- cgit v1.2.3 From 78b9e698a1dc8760a37815d0ee0d6e1280f024c1 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 13 Mar 2024 23:31:58 -0400 Subject: man: arch(9): Document processor_free_pcb() Signed-off-by: Ian Moffett --- share/man/man9/arch.9 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'share/man') diff --git a/share/man/man9/arch.9 b/share/man/man9/arch.9 index 89cdb41..5bcac2d 100644 --- a/share/man/man9/arch.9 +++ b/share/man/man9/arch.9 @@ -124,5 +124,10 @@ by the machdep subsystem, specifically in the .Ft processor_init_pcb() routine. +The +.Ft processor_free_pcb() +routine shall also be implemented per arch to deallocate +resources when the thread is killed. + .Sh AUTHORS .An Ian Moffett Aq Mt ian@osmora.org -- cgit v1.2.3