ia64

dragonLinux

知名会员
注册
2005-02-06
消息
1,030
荣誉分数
7
声望点数
198
first time touch ia64 machine:

dragonLinux@td188.testdrive.hp.com> uname -a
Linux td188.testdrive.hp.com 2.6.18-8.1.6.el5 #1 SMP Fri Jun 1 18:52:04 EDT 2007 ia64 ia64 ia64 GNU/Linux

dragonLinux@td188.testdrive.hp.com> free
total used free shared buffers cached
Mem: 3987136 3378400 608736 0 1125344 1814656
-/+ buffers/cache: 438400 3548736
Swap: 25165792 0 25165792
dragonLinux@td188.testdrive.hp.com> cat /proc/interrupts
CPU0 CPU1
28: 5144 5144 LSAPIC cpe_poll
29: 0 0 LSAPIC cmc_poll
31: 0 0 LSAPIC cmc_hndlr
48: 2 0 IO-SAPIC-level acpi
49: 0 16 IO-SAPIC-level serial
51: 0 0 IO-SAPIC-level ohci_hcd:usb1
52: 93 135 IO-SAPIC-level ohci_hcd:usb2
53: 97274198 97273153 IO-SAPIC-level ehci_hcd:usb3
54: 1128342 1119522 IO-SAPIC-level ioc0
55: 6048015 69 IO-SAPIC-level eth0
232: 0 0 LSAPIC mca_rdzv
238: 0 0 LSAPIC perfmon
239: 332889400 332910880 LSAPIC timer
240: 0 0 LSAPIC mca_wkup
254: 132 937 LSAPIC IPI
ERR: 0

did you see EFI?
258181 total pages but 4GB memory, it means it is using 16K PAGESIZE
#if defined(CONFIG_IA64_PAGE_SIZE_4KB)
# define PAGE_SHIFT 12
#elif defined(CONFIG_IA64_PAGE_SIZE_8KB)
# define PAGE_SHIFT 13
#elif defined(CONFIG_IA64_PAGE_SIZE_16KB)
# define PAGE_SHIFT 14
#elif defined(CONFIG_IA64_PAGE_SIZE_64KB)
# define PAGE_SHIFT 16
#else
# error Unsupported page size!
#endif

Linux version 2.6.18-8.1.6.el5 (brewbuilder@ia64-1.build.redhat.com) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Fr
i Jun 1 18:52:04 EDT 2007
EFI v1.10 by HP: SALsystab=0x3e528000 ACPI 2.0=0x3fdd6000 SMBIOS=0x3e52a000 HCDP=0x3fdd4000
booting generic kernel on platform hpzx1
PCDP: v3 at 0x3fdd4000
Explicit "console="; ignoring PCDP
ACPI: RSDP (v002 HP ) @ 0x000000003fdd6000
ACPI: XSDT (v001 HP rx3600 0x00000000 HP 0x00000000) @ 0x000000003fdd602c
ACPI: FADT (v003 HP rx3600 0x00000000 HP 0x00000000) @ 0x000000003fe06578
ACPI: SPCR (v001 HP rx3600 0x00000000 HP 0x00000000) @ 0x000000003fe066b0
ACPI: DBGP (v001 HP rx3600 0x00000000 HP 0x00000000) @ 0x000000003fe06700
ACPI: MADT (v001 HP rx3600 0x00000000 HP 0x00000000) @ 0x000000003fe06920
ACPI: SPMI (v004 HP rx3600 0x00000000 HP 0x00000000) @ 0x000000003fe06738
ACPI: CPEP (v001 HP rx3600 0x00000000 HP 0x00000000) @ 0x000000003fe067f0
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fdf9f98
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fdfa4d8
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fdfcd88
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fdfe2b8
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fdff7e8
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fe00d78
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fe03598
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fe04ac8
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fe05ff8
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fe06198
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fe062b8
ACPI: SSDT (v001 HP rx3600 0x00000006 INTL 0x20050309) @ 0x000000003fe06458
ACPI: DSDT (v001 HP rx3600 0x00000007 INTL 0x20050309) @ 0x0000000000000000
rsvd_region[0]: [0xe000000001000000, 0xe0000000010000d8)
rsvd_region[1]: [0xe000000004000000, 0xe000000004d54c28)
rsvd_region[2]: [0xe0000100fed0a010, 0xe0000100fed0a7f0)
rsvd_region[3]: [0xe0000100fed0c010, 0xe0000100fed0c060)
rsvd_region[4]: [0xe0000100fed0ff83, 0xe0000100fed10010)
rsvd_region[5]: [0xe0000100fed13000, 0xe0000100fef95a56)
rsvd_region[6]: [0xffffffffffffffff, 0xffffffffffffffff)
Initial ramdisk at: 0xe0000100fed13000 (2632278 bytes)
SAL 3.1: HP version 1.32
SAL Platform features: None
SAL: AP wakeup using external interrupt vector 0xff
cpu package is Multi-Core capable: number of cores=2
cpu package is Multi-Threading capable: number of siblings=2
ACPI: Local APIC address c0000000fee00000
GSI 25 (level, low) -> CPU 0 (0x0000) vector 48
2 CPUs available, 4 CPUs total
MCA related initialization done
On node 0 totalpages: 258181
DMA zone: 61858 pages, LIFO batch:7
Normal zone: 196323 pages, LIFO batch:7
SMP: Allowing 4 CPUs, 2 hotplug CPUs
Built 1 zonelists. Total pages: 258181
Kernel command line: BOOT_IMAGE=dev000:EFI\redhat\vmlinuz-2.6.18-8.1.6.el5 console=ttyS0,9600,8n1 console=ttyS2,9600,8n1 cons
ole=tty1 rhgb quiet root=LABEL=/ ro
PID hash table entries: 4096 (order: 12, 32768 bytes)
CPU 0: base freq=266.147MHz, ITC ratio=6/4, ITC freq=399.220MHz+/-150ppm
Console: colour VGA+ 80x25
Memory: 3983920k/4130896k available (6260k code, 163280k reserved, 4065k data, 656k init)
McKinley Errata 9 workaround not needed; disabling it
Calibrating delay loop... 3186.68 BogoMIPS (lpj=1593344)
Security Framework v1.0.0 initialized
SELinux: Initializing.
SELinux: Starting in permissive mode
selinux_register_security: Registering secondary module capability
Capability LSM initialized as secondary
Dentry cache hash table entries: 524288 (order: 8, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 7, 2097152 bytes)
Mount-cache hash table entries: 1024
ACPI: Core revision 20060707
Boot processor id 0x0/0x0
Fixed BSP b0 value from CPU 1
CPU 1: synchronized ITC with CPU 0 (last diff -5 cycles, maxerr 167 cycles)
CPU 1: base freq=266.147MHz, ITC ratio=6/4, ITC freq=399.220MHz+/-150ppm
Calibrating delay loop... 3186.68 BogoMIPS (lpj=1593344)
Brought up 2 CPUs
Total of 2 processors activated (6373.37 BogoMIPS).
sizeof(vma)=176 bytes
sizeof(page)=56 bytes
sizeof(inode)=568 bytes
sizeof(dentry)=216 bytes
sizeof(ext3inode)=776 bytes
sizeof(buffer_head)=96 bytes
sizeof(skbuff)=240 bytes
 
I copy this from 2.6.18 you can count how big it is under 64 bits
223 struct page {
224 unsigned long flags; /* Atomic flags, some possibly
225 * updated asynchronously */
226 atomic_t _count; /* Usage count, see below. */
227 atomic_t _mapcount; /* Count of ptes mapped in mms,
228 * to show when page is mapped
229 * & limit reverse map searches.
230 */
231 union {
232 struct {
233 unsigned long private; /* Mapping-private opaque data:
234 * usually used for buffer_heads
235 * if PagePrivate set; used for
236 * swp_entry_t if PageSwapCache;
237 * indicates order in the buddy
238 * system if PG_buddy is set.
239 */
240 struct address_space *mapping; /* If low bit clear, points to
241 * inode address_space, or NULL.
242 * If page mapped as anonymous
243 * memory, low bit is set, and
244 * it points to anon_vma object:
245 * see PAGE_MAPPING_ANON below.
246 */
247 };
248 #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
249 spinlock_t ptl;
250 #endif
251 };
252 pgoff_t index; /* Our offset within mapping. */
253 struct list_head lru; /* Pageout list, eg. active_list
254 * protected by zone->lru_lock !
255 */
256 /*
257 * On machines where all RAM is mapped into kernel address space,
258 * we can simply calculate the virtual address. On machines with
259 * highmem some memory is mapped into kernel virtual memory
260 * dynamically, so we need a place to store that address.
261 * Note that this field could be 16 bits on x86 ...
262 *
263 * Architectures with slow multiplication can define
264 * WANT_PAGE_VIRTUAL in asm/page.h
265 */
266 #if defined(WANT_PAGE_VIRTUAL)
267 void *virtual; /* Kernel virtual address (NULL if
268 not kmapped, ie. highmem) */
269 #endif /* WANT_PAGE_VIRTUAL */
270 };

migration_cost=9135
checking if image is initramfs... it is
Freeing initrd memory: 2560kB freed
DMI 2.3 present.
NET: Registered protocol family 16


scsi0 : ioc0: LSISAS1068, FwRev=010a0100h, Ports=1, MaxQ=511, IRQ=54
Vendor: HP Model: DG072A8B54 Rev: HPD7
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 143374738 512-byte hdwr sectors (73408 MB)
sda: Write Protect is off
sda: Mode Sense: db 00 10 08
SCSI device sda: drive cache: write through w/ FUA
SCSI device sda: 143374738 512-byte hdwr sectors (73408 MB)
sda: Write Protect is off
sda: Mode Sense: db 00 10 08
SCSI device sda: drive cache: write through w/ FUA
sda: sda1 sda2 sda3 sda4 sda5 sda6
sd 0:0:0:0: Attached scsi disk sda
Vendor: HP Model: DG072A8B54 Rev: HPD7
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sdb: 143374738 512-byte hdwr sectors (73408 MB)
sdb: Write Protect is off
sdb: Mode Sense: db 00 10 08
SCSI device sdb: drive cache: write through w/ FUA
SCSI device sdb: 143374738 512-byte hdwr sectors (73408 MB)
sdb: Write Protect is off
sdb: Mode Sense: db 00 10 08
SCSI device sdb: drive cache: write through w/ FUA
sdb: sdb1
sd 0:0:1:0: Attached scsi disk sdb
Initializing USB Mass Storage driver...
scsi1 : SCSI emulation for USB Mass Storage devices
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
Vendor: TEAC Model: DV-28E-N Rev: C.6B
Type: CD-ROM ANSI SCSI revision: 00
usb-storage: device scan complete
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
dragonLinux@td188.testdrive.hp.com> df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda6 10157368 718372 8914708 8% /
/dev/sda1 1046516 12760 1033756 2% /boot/efi
tmpfs 1993568 0 1993568 0% /dev/shm
/dev/sda3 10157368 639340 8993740 7% /opt
/dev/sdb1 69442128 793456 65064308 2% /tmp
/dev/sda5 10157368 3410524 6222556 36% /usr
/dev/sda4 10157368 298944 9334136 4% /var
td253:/house 524318656 161248800 336436032 33% /house
big drive 500G
 
dragonLinux@td188.testdrive.hp.com> icc -o tryia try.c
try.c(8): warning #181: argument is incompatible with corresponding format string conversion
sizeof(unsigned int), sizeof(unsigned int *),
^

try.c(8): warning #181: argument is incompatible with corresponding format string conversion
sizeof(unsigned int), sizeof(unsigned int *),
^

try.c(9): warning #181: argument is incompatible with corresponding format string conversion
sizeof(unsigned long), sizeof(unsigned long*));
^

try.c(9): warning #181: argument is incompatible with corresponding format string conversion
sizeof(unsigned long), sizeof(unsigned long*));
^

dragonLinux@td188.testdrive.hp.com> ls
try.c tryia
dragonLinux@td188.testdrive.hp.com> ./tryia
sizeof(unsigned int)=4, sizeof(unsigned int *)=8
sizeof(unsigned long)=8, sizeof(unsigned long *)=8


userspace is 64 bits too! Cool!
we used to use 64 bits kernel but 32 bits userspace because userspace too many applications are not stable or not 64 yet.
redhat is good!
 
tryia elf info:

ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Intel IA-64
Version: 0x1
Entry point address: 0x4000000000000580
Start of program headers: 64 (bytes into file)
Start of section headers: 4448 (bytes into file)
Flags: 0x10, 64-bit
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 8
Size of section headers: 64 (bytes)
Number of section headers: 34
Section header string table index: 31

Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .interp PROGBITS 4000000000000200 00000200
0000000000000018 0000000000000000 A 0 0 1
[ 2] .note.ABI-tag NOTE 4000000000000218 00000218
0000000000000020 0000000000000000 A 0 0 4
[ 3] .hash HASH 4000000000000238 00000238
0000000000000034 0000000000000004 A 4 0 8
[ 4] .dynsym DYNSYM 4000000000000270 00000270
00000000000000c0 0000000000000018 A 5 1 8
[ 5] .dynstr STRTAB 4000000000000330 00000330
00000000000000a8 0000000000000000 A 0 0 1
[ 6] .gnu.version VERSYM 40000000000003d8 000003d8
0000000000000010 0000000000000002 A 4 0 2
[ 7] .gnu.version_r VERNEED 40000000000003e8 000003e8
0000000000000020 0000000000000000 A 5 1 8
[ 8] .rela.dyn RELA 4000000000000408 00000408
0000000000000030 0000000000000018 A 4 0 8
[ 9] .rela.IA_64.pltof RELA 4000000000000438 00000438
0000000000000048 0000000000000018 A 4 26 8
[10] .init PROGBITS 4000000000000480 00000480
 
let's take a look ia 64 assembly:

4000000000000780 <main>:
#include <stdio.h>

int main(int argc, char** argv) {
4000000000000780: 09 10 51 1e 80 05 [MMI] alloc r34=ar.pfs,20,15,0
4000000000000786: c0 80 33 7c 46 80 adds r12=-144,r12
400000000000078c: 04 08 00 84 mov r36=r1;;
4000000000000790: 00 00 00 00 01 00 [MII] nop.m 0x0
4000000000000796: 30 02 00 62 00 a0 mov r35=b0
400000000000079c: 04 00 01 84 mov r37=r32
40000000000007a0: 19 30 01 42 00 21 [MMB] mov r38=r33
40000000000007a6: 70 02 33 00 42 00 adds r39=96,r12
40000000000007ac: 00 00 00 20 nop.b 0x0;;
40000000000007b0: 01 00 94 4e 98 11 [MII] st8 [r39]=r37
40000000000007b6: 80 42 33 00 42 00 adds r40=104,r12
40000000000007bc: 00 00 04 00 nop.i 0x0;;
40000000000007c0: 01 00 98 50 98 11 [MII] st8 [r40]=r38


printf( "sizeof(unsigned int)=%lu, sizeof(unsigned int *)=%lu\n"
40000000000007c6: 90 42 06 00 48 00 addl r41=72,r1
40000000000007cc: 00 00 04 00 nop.i 0x0;;
40000000000007d0: 00 50 01 52 18 10 [MII] ld8 r42=[r41]
40000000000007d6: b0 22 00 00 48 80 mov r43=4
40000000000007dc: 85 00 00 90 mov r44=8
40000000000007e0: 19 68 21 00 00 24 [MMB] mov r45=8
40000000000007e6: e0 42 00 00 48 00 mov r46=8
40000000000007ec: 00 00 00 20 nop.b 0x0;;
40000000000007f0: 0b a0 80 18 00 21 [MMI] adds r20=32,r12;;
40000000000007f6: 00 20 51 30 23 80 st8 [r20]=r36
40000000000007fc: 82 62 00 84 adds r20=40,r12;;
4000000000000800: 01 00 a8 28 98 11 [MII] st8 [r20]=r42
4000000000000806: 40 81 31 00 42 00 adds r20=48,r12
400000000000080c: 00 00 04 00 nop.i 0x0;;
4000000000000810: 01 00 ac 28 98 11 [MII] st8 [r20]=r43
4000000000000816: 40 c1 31 00 42 00 adds r20=56,r12
400000000000081c: 00 00 04 00 nop.i 0x0;;
4000000000000820: 01 00 b0 28 98 11 [MII] st8 [r20]=r44
4000000000000826: 40 01 32 00 42 00 adds r20=64,r12
400000000000082c: 00 00 04 00 nop.i 0x0;;
4000000000000830: 01 00 b4 28 98 11 [MII] st8 [r20]=r45
4000000000000836: 40 41 32 00 42 00 adds r20=72,r12
400000000000083c: 00 00 04 00 nop.i 0x0;;
4000000000000840: 01 00 b8 28 98 11 [MII] st8 [r20]=r46
4000000000000846: 40 41 31 00 42 00 adds r20=40,r12
400000000000084c: 00 00 04 00 nop.i 0x0;;
4000000000000850: 0b 20 01 28 18 10 [MMI] ld8 r36=[r20];;
4000000000000856: f0 02 90 00 42 80 mov r47=r36
400000000000085c: 02 63 00 84 adds r20=48,r12;;
4000000000000860: 0b 28 01 28 18 10 [MMI] ld8 r37=[r20];;
4000000000000866: 00 03 94 00 42 80 mov r48=r37
400000000000086c: 82 63 00 84 adds r20=56,r12;;
4000000000000870: 0b 30 01 28 18 10 [MMI] ld8 r38=[r20];;
4000000000000876: 10 03 98 00 42 80 mov r49=r38
400000000000087c: 02 64 00 84 adds r20=64,r12;;
4000000000000880: 0b 38 01 28 18 10 [MMI] ld8 r39=[r20];;
4000000000000886: 20 03 9c 00 42 80 mov r50=r39
400000000000088c: 82 64 00 84 adds r20=72,r12;;
4000000000000890: 0a 40 01 28 18 10 [MMI] ld8 r40=[r20];;
4000000000000896: 30 03 a0 00 42 00 mov r51=r40
400000000000089c: 00 00 04 00 nop.i 0x0
40000000000008a0: 11 00 00 00 01 00 [MIB] nop.m 0x0
40000000000008a6: 00 00 00 02 00 00 nop.i 0x0
40000000000008ac: 80 fc ff 58 br.call.sptk.few b0=4000000000000520 <_init+0x80>;;
40000000000008b0: 0b a0 80 18 00 21 [MMI] adds r20=32,r12;;
40000000000008b6: 40 02 50 30 20 00 ld8 r36=[r20]
40000000000008bc: 00 00 04 00 nop.i 0x0;;
40000000000008c0: 03 08 00 48 00 21 [MII] mov r1=r36
"sizeof(unsigned long)=%lu, sizeof(unsigned long *)=%lu\n",
sizeof(unsigned int),
sizeof(unsigned int *),
sizeof(unsigned long),
sizeof(unsigned long*));

return 0;
40000000000008c6: 50 02 00 00 42 00 mov r37=r0;;
40000000000008cc: 30 0a 00 07 mov b0=r35;;
40000000000008d0: 00 00 00 00 01 00 [MII] nop.m 0x0
40000000000008d6: 00 10 01 55 00 00 mov.i ar.pfs=r34
40000000000008dc: 01 28 01 84 mov r8=r37
40000000000008e0: 19 60 40 18 01 21 [MMB] adds r12=144,r12
40000000000008e6: 00 00 00 02 00 80 nop.m 0x0
40000000000008ec: 00 00 84 00 br.ret.sptk.few b0;;
 
this is assembly without "-g"

4000000000000780 <main>:
4000000000000780: 08 10 29 0a 80 05 [MMI] alloc r34=ar.pfs,10,5,0
4000000000000786: 90 40 00 00 48 60 mov r9=8
400000000000078c: 04 00 c4 00 mov r35=b0
4000000000000790: 09 18 10 00 00 24 [MMI] mov r3=4
4000000000000796: 40 02 04 00 42 00 mov r36=r1
400000000000079c: 81 0c 00 90 addl r8=72,r1;;
40000000000007a0: 08 10 00 10 18 10 [MMI] ld8 r2=[r8]
40000000000007a6: 70 02 24 00 42 20 mov r39=r9
40000000000007ac: 05 48 00 84 mov r41=r9
40000000000007b0: 01 30 01 06 00 21 [MII] mov r38=r3
40000000000007b6: 80 02 24 00 42 00 mov r40=r9
40000000000007bc: 00 00 04 00 nop.i 0x0;;
40000000000007c0: 11 28 01 04 00 21 [MIB] mov r37=r2
40000000000007c6: 00 00 00 02 00 00 nop.i 0x0
40000000000007cc: 60 fd ff 58 br.call.sptk.few b0=4000000000000520 <_init+0x80>;;
40000000000007d0: 01 40 00 00 00 21 [MII] mov r8=r0
40000000000007d6: 00 18 05 80 03 20 mov b0=r35
40000000000007dc: 00 20 01 84 mov r1=r36;;
40000000000007e0: 11 00 00 00 01 00 [MIB] nop.m 0x0
40000000000007e6: 00 10 01 55 00 80 mov.i ar.pfs=r34
40000000000007ec: 08 00 84 00 br.ret.sptk.many b0;;
 
后退
顶部