首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > Linux > OpenSolaris邮件列表中关于HAT layer(硬件地址转换层)的讨论
【标  题】:OpenSolaris邮件列表中关于HAT layer(硬件地址转换层)的讨论
【关键字】:OpenSolaris,HAT,layer
【来  源】:http://blog.chinaunix.net/article.php?articleId=34275&blogId=768

OpenSolaris邮件列表中关于HAT layer(硬件地址转换层)的讨论

转载自:OpenSolaris: code




HAT layer
Posted: Jul 3, 2005 2:36 AM


Hi,
I would like to understand the HAT layer with respect to the code and also if there any good docs.
-Jay

elowe


On Sat, Jul 02, 2005 at 11:36:40AM -0700, Saravanan Jayakumar wrote:
| Hi,
| I would like to understand the HAT layer with respect to the code and also if there any good docs.

There aren't any good documents out there yet. The Solaris Internals book
has a brief overview of the HAT interfaces and a description of what they
do. Things have changed somewhat since then with the introduction of
MPSS (superpages) but otherwise it's fairly close.

As far as the code I'd recommend starting with the x86 HAT layer which
was rewritten for Solaris 10. It's a lot simpler and easier to
understand, and has lots of good comments. The sfmmu HAT layer is
aging and is about due for a rewrite, and is a lot more complicated
due to the need to walk page tables in software from trap code.

The x86 HAT is under usr/src/uts/i86pc/vm and the sfmmu HAT (SPARC)
is under usr/src/uts/sfmmu/vm.

--
Eric Lowe Solaris Kernel Development Austin, Texas
Sun Microsystems. We make the net work. x64155/+1(512)401-1155


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


I have one more query. Where can find the 86 specific code?

> 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 ( 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 /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邮件列表中关于malloc实现的讨论:【上一篇】
OpenSolaris邮件列表中关于x86引导程序的讨论:【下一篇】
【相关文章】
  • OpenSolaris邮件列表中关于malloc实现的讨论
  • OpenSolaris邮件列表中关于系统调用的讨论
  • OpenSolaris邮件列表中关于ACPI的讨论
  • OpenSolaris邮件列表中关于学习memory segmentation和paging的讨论
  • OpenSolaris的精神本质
  • OpenSolaris邮件列表中关于proc文件系统的讨论
  • OpenSolaris邮件列表中关于进程管理子系统的讨论
  • RedHat手册
  • RedHat Linux口令恢复
  • 比较solaris-redhat-suse-freebsd20051129(二)
  • 【随机文章】
  • 设计模式--Abstract Factory
  • Base4.NET Beta2 发布和速度飚飞的CommunityServer Blogs
  • WLAN技术专辑:无线局域网实际应用
  • 用 Quartz 进行作业调度
  • [老帖子 转过来]对面向对象的理解
  • 虚拟计算机 Virtual PC 安装使用指南
  • 今年天冷的似乎有点儿早
  • 白领生存状况有奖大调查
  • 如何运行servlet类程序
  • Maya制作《湖南新闻联播》片头(2)
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.