> Hi Eric,
>  Thanks for your response. Can you please let me know in which logical order 
> i 
need to start looking into the files.
> 
> \usr\src\uts\i86pc\vm has around 8 files.
> Thanks
>  Jay

Hi Jay,

start looking at the header files first.

The "HAT Layer" (in the sense of "Hardware Address Translation" -
NOT "Hardware AbsTraction") is well-specified although not publicly
documented. But the interfaces an implementation has to provide for
the generic Solaris VM code to work are listed in:

usr/src/uts/common/vm/hat.h     (<vm/hat.h> in any Solaris system)

There are two classes of interfaces defined there:

1. mandatory ones which an implementation must provide
2. optional ones which an implementation can provide to enable
   better performance/additional features. See func hat_supported().

Generically, I'd start with the arch-independent VM code to get the
overview. When it comes to implementation, the x86/x64 HAT code that
was mentioned is indeed far easier to read than the sfmmu (sparc)
HAT code. But the "big five":

        - address spaces, vm_as.c
        - segments, vm_seg.c (and segment types, seg_*.c, if you've got time)
        - pages, vm_page.c
        - anon/swap, vm_anon.c, vm_swap.c,
          filesystem interfaces, vm_pvn.c and seg_map.c
        - heap (kernel freelists), vm_pagelist.c

are all architecture-independent, in usr/src/uts/common/vm/*.

In the arch-specific code, read <arch>/vm/hat* first.


As far as "hardware abstraction" goes, that's different. There are
multiple areas involved here. Not necessarily complete list of code
with large architecture-dependent parts:

a) boot code
b) system startup/initialization
c) MMU/VM interfaces (classical "HAT" in the UNIX sense)
d) trap/interrupt/exception/fault/syscall handling
e) context switching
f) device driver framework and actual device drivers
g) atomics, lock primitives, SMP interrupt handling, crosscalls
h) system timers, HW statistics (cpc, trapstat, busstat, ...)
i) kmdb / dtrace

Have you meant these ? The answer to "where are these and how do these
work in Solaris" is probably worth a blog entry ... if only to collect
references to all those OpenSolaris blogs that already explain one
part or the other ...

FrankH.


_______________________________________________
opensolaris-code mailing list
[email protected]
https://opensolaris.org:444/mailman/listinfo/opensolaris-code

Reply via email to