Clarification on pt_t struct

86 views
Skip to first unread message

Ronald Mathias

unread,
Apr 19, 2021, 2:07:17 PM4/19/21
to min...@googlegroups.com
Hello,

I was going over the Minix 3.2 source code, especially the Virtual
Memory Server part.

I had a doubt about this struct at minix/minix/servers/vm/pt.h

/* A pagetable. */
typedef struct
{
u32_t *pt_dir; /* page aligned (ARCH_VM_DIR_ENTRIES) */
u32_t pt_dir_phys; /* physical address of pt_dir */
u32_t *pt_pt[ARCH_VM_DIR_ENTRIES]; /* Pointers to page tables in
VM address space. */
.......
} pt_t;

What is the need for having both u32_t *pt_pt and u32_t
*pt_pt[ARCH_VM_DIR_ENTRIES] pointers ?

I am thinking only one pointer pt_dir was sufficient as from this
pointer, we can get the Page table entries also right.

Regards,
Ronald Mathias

Peter Shkenev

unread,
Apr 30, 2021, 4:59:35 AM4/30/21
to minix3
Hello Ronald,

Sorry for not answering too long.

Looks like you are working with AST's "Operating Systems: Design and Implementation" book. Does it give any information on this structure.

Also, you can look at this struct in current version of Minix, it is located at /minix/servers/vm/pt.h . It is more documented there. I had a quick look at this and I suppose that there are many parts of the page table.

Best regards,
Peter

понедельник, 19 апреля 2021 г. в 21:07:17 UTC+3, RM:

Ronald Mathias

unread,
May 4, 2021, 8:39:56 PM5/4/21
to min...@googlegroups.com
Hi Peter,

Thanks for your help. Yes. I am referring to the latest version of
Minix. I am also reading the book.

So far I have managed to get the 3.2.1 version of Minix cross compiled
on my Ubuntu box.

I have also created a boot CD with grub as my bootloader and installed
the kernel for debugging with GDB.

I might need to read the code some more times to make sense of it.

Regards,
Ronald Mathias
> --
> You received this message because you are subscribed to the Google Groups "minix3" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to minix3+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/minix3/ec117110-14df-4ee0-923e-1d016f4d9a2fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages