Tải bản đầy đủ
FigureB.1 Kernel Address Space and Segments

FigureB.1 Kernel Address Space and Segments

Tải bản đầy đủ

634

Kernel Virtual Address Maps

You can look at the kernel address space with the as adb macro, using the kernel
address space pointer. The as macro will show the kernel address space and the
pointer to the list of kernel segments.
# adb -k
physmem b91a
kas$10423320:
10423320:
10423328:
10423330:
10423350:
10423350:
10423368:
10423380:
10423386:
10423390:
10423340:

contents (mutex)
owner/waiters
0
flags
vbits
cv
0
0
0
hat
hrm
seglast
300000ebf88
0
300002a9f88
lock (rwlock)
wwwh
0
segs
size
tail
10434678
2052c0000
104230e0
nsegs
lrep
hilevel
6
0
0
unused updatedir
objectdir
0
01
0
sizedir
wpage
nwpage
0
0
0
userlimit
0

You can then use the seglist adb macro to print a list of the kernel’s memory
segments.
10434678$ktextseg:
ktextseg:
ktextseg+0x18:
ktextseg+0x30:

kvalloc:
kvalloc:
kvalloc+0x18:
kvalloc+0x30:

kvseg32:
kvseg32:
kvseg32+0x18:
kvseg32+0x30:

base
10000000
next
1041fd60
data
0

size
4a0000
prev
0

as
10423320
ops
segkmem_ops

base
104a0000
next
104233a0
data
0

size
e20000
prev
10434678

as
10423320
ops
segkmem_ops

base
78000000
next
300002a9f88
data
0

size
4000000
prev
1041fd60

as
10423320
ops
segkmem_ops

635

The next figures illustrate Solaris 7 address space, as follows:






Figure B.2
Figure B.3
Figure B.4
Figure B.5
Figure B.6

Solaris 7 sun4u 64-Bit Kernel Address Space
Solaris 7 sun4u 32-Bit Kernel Address Space
Solaris 7 sun4d 32-Bit Kernel Address Space
Solaris 7 sun4m 32-Bit Kernel Address Space
Solaris 7 x86 32-Bit Kernel Address Space

636

Kernel Virtual Address Maps

0xFFFFFFFF.FFFFFFFF

Figure B.2 Solaris 7
sun4u 64-Bit Kernel
Address Space

Open Boot Prom
Page Tables

0xFFFFFFFC.00000000
0x00000302.00000000

64-Bit Kernel Heap
segkmem

(8 Gbytes)

File System Cache
segmap

(256 Mbytes)

Pageable Kernel Mem.
segkp

(512 Mbytes)

0x00000300.00000000

0x000002A7.50000000

0x000002A1.00000000
0x00000000.FFFFFFFF

Open Boot Prom

0x00000000.F0000000

Kernel Debugger
0x00000000.EDD00000
0x00000000.7c000000

0x00000000.78002000

32-Bit Kernel Heap
segkmem32
Panic Message Buffer

0x00000000.78000000

Large TSB

(4-Mbyte Pages)

0x00000000.10400000

sun4u HAT Structures
Small TSB & Map Blks

(4 Mbytes)
(1 x 4-Mbyte Page)

Kernel Data Segment
0x00000000.10400000

Kernel Text Segment
0x00000000.10000000

0x0

Trap Table
Invalid

(4 Mbytes)
(1 x 4-Mbyte Page)

637

0xFFFFFFFF

Figure B.3 Solaris 7
sun4u 32-Bit Kernel
Address Space

Open Boot Prom

0xF0000000

Kernel Debugger
0xEDD00000

Kernel Heap
segkmem

(2 Gbytes)

0x60000000

File System Cache
segmap

(256 Mbytes)

Pageable Kernel Mem.
segkp

(512 Mbytes)

0x50000000

0x30000000

Large TSB

(4-Mbyte Pages)

0x10800000

sun4u HAT Structures
Small TSB & Map Blks

(4 Mbytes)
(1 x 4-Mbyte Page)

Kernel Data Segment
0x10400000

Kernel Text Segment
0x10000000

0x0

Trap Table
Invalid

(4 Mbytes)
(1 x 4-Mbyte Page)