20150423

1. 영어 기사 읽기
1) Smoking gun: South Korea uncovers northern rival’s hacking codes, CNN
– Then more ominously on December 23 last year, computers at the country’s nuclear operator were breached. (ominously – 불길하게)
2) Navy drone makes history with refueling maneuver, CNN


2. 영어 관련 도움 받을 수 있는 곳
종율이 형이 알려주신 영어 관련 도움 받을 수 있는 곳.
KAIST 인문사회과학부에서 english clinic을 운영한다.
(English Clinic, KAIST, http://hss.kaist.ac.kr/sub10/01_01.php)


3. WordPress Syntax highlighter
gem5 사용법을 찾다가 종율이 형 블로그를 찾았다.
Syntax highlighter가 마음에 들었고, 찾아보니 crayon syntax highlighter였다.


4. gem5 simulator
종율이 형 블로그에서 gem5에서 사용할 수 있는 이미지를 만드는 방법을 확인함.

이미지는 만들었으나, gem5에서 제공하는 커널의 버전이 너무 낮아서 동작하지 않음.
현재 gem5가 어느 버전의 커널까지 지원하는지 확인하고자 다양한 버전을 테스트하는 중이다.
디스크 이미지는 gem5에서 제공하는 것을 그대로 쓰고, 커널만 바꿔가며 테스트했다.

2.6.23 - 부팅 성공
2.6.27.6 - 부팅 성공
2.6.33.6 - 부팅 성공
3.1 - 부팅 성공
3.4.25 - 부팅 성공
3.8.1 - 부팅 실패
3.10.26 - 부팅 실패
3.14.27 - 부팅 실패
3.19 - 부팅 실패

그 외의 커널 버전은 확인해보지 않음.

부팅 과정에서 “..TIMER: …” 메시지 이후에 오랫동안 진행되지 않기도 한다.
그렇다고 해서 멈춘 것은 아니다. 기다리면 진행된다.

mce: CPU supports 4 MCE banks
mce: unknown CPU type - not enabling MCE support
Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
CPU: M5 Simulator Fake M5 x86_64 CPU (fam: 0f, model: 25, stepping: 01)
Performance Events: no PMU driver, software events only.
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0

Linux kernel version 3.8.1 이후부터는 다음과 같은 에러를 내며 종료한다.

gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Apr 22 2015 16:40:50
gem5 started Apr 23 2015 14:40:30
gem5 executing on gumdaeng
command line: build/X86/gem5.opt -d /tmp/output configs/example/fs.py --disk-image=/home/gumdaeng/tmp/gem5-stable/disks/linux-x86.img
Global frequency set at 1000000000000 ticks per second
warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
info: kernel located at: /home/gumdaeng/tmp/gem5-stable/binaries/x86_64-vmlinux-3.19
Listening for com_1 connection on port 3456
      0: rtc: Real-time clock set to Sun Jan  1 00:00:00 2012
0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
warn: Reading current count from inactive timer.
**** REAL SIMULATION ****
info: Entering event queue @ 0.  Starting simulation...
warn: instruction 'fninit' unimplemented
warn: Don't know what interrupt to clear for console.
warn: instruction 'wbinvd' unimplemented
995340500: system.pc.com_1.terminal: attach terminal 0
panic: Invalid IDE control register offset: 0
 @ tick 345801288500
[readControl:build/X86/dev/ide_disk.cc, line 256]
Memory Usage: 905552 KBytes
Program aborted at cycle 345801288500
[1]    10576 abort      build/X86/gem5.opt -d /tmp/output configs/example/fs.py 

부팅 과정에 볼 수 있는 메시지는 다음과 같다.

==== m5 slave terminal: Terminal 0 ====
Linux version 3.4.25 (gumdaeng@cacloud01) (gcc version 4.1.3 20080704 (prerelease) (Ubuntu 4.1.2-27ubuntu1)) #1 Thu Apr 23 15:00:10 KST 2015
Command line: earlyprintk=ttyS0 console=ttyS0 lpj=7999923 root=/dev/hda1
CPU: vendor_id 'M5 Simulator' unknown, using generic init.
CPU: Your system may be unstable.
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000020000000 (usable)
 BIOS-e820: 0000000020000000 - 00000000c0000000 (reserved)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
bootconsole [earlyser0] enabled
NX (Execute Disable) protection: active
DMI 2.5 present.
No AGP bridge found
last_pfn = 0x20000 max_arch_pfn = 0x400000000
x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
CPU MTRRs all blank - virtualized system.
found SMP MP-table at [ffff8800000f0050] f0050
init_memory_mapping: 0000000000000000-0000000020000000
Zone PFN ranges:
  DMA      0x00000010 -> 0x00001000
  DMA32    0x00001000 -> 0x00100000
  Normal   empty
Movable zone start PFN for each node
Early memory PFN ranges
    0: 0x00000010 -> 0x0000009f
    0: 0x00000100 -> 0x00020000
Intel MultiProcessor Specification v1.4
MPTABLE: OEM ID: 
MPTABLE: Product ID: 
MPTABLE: APIC at: 0xFEE00000
Processor #0 (Bootup-CPU)
IOAPIC[0]: apic_id 1, version 20, address 0xfec00000, GSI 0-23
Processors: 1
Allocating PCI resources starting at c0000000 (gap: c0000000:3fff0000)
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129165
Kernel command line: earlyprintk=ttyS0 console=ttyS0 lpj=7999923 root=/dev/hda1
PID hash table entries: 2048 (order: 2, 16384 bytes)
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
Checking aperture...
No AGP bridge found
Memory: 506328k/524288k available (4616k kernel code, 452k absent, 17508k reserved, 2720k data, 380k init)
NR_IRQS:4352 nr_irqs:256 16
Console: colour dummy device 80x25
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
Fast TSC calibration using PIT
Detected 2000.043 MHz processor.
Calibrating delay loop (skipped) preset value.. 3999.96 BogoMIPS (lpj=7999923)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 256
CPU: CPU feature monitor disabled, no CPUID level 0x5
CPU: CPU feature xsave disabled, no CPUID level 0xd
mce: CPU supports 4 MCE banks
MCE: unknown CPU type - not enabling MCE support.
CPU: M5 Simulator Fake M5 x86_64 CPU stepping 01
Performance Events: 
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
NET: Registered protocol family 16                                                                                                            [344/2487]
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Probing PCI hardware
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffffffff]
pci 0000:00:04.0: BAR 6: assigned [mem 0xc0000000-0xc00007ff pref]
pci 0000:00:04.0: BAR 4: assigned [io  0x1000-0x100f]
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 3, 32768 bytes)
TCP established hash table entries: 16384 (order: 6, 262144 bytes)
TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
platform rtc_cmos: registered platform RTC device (no PNP device found)
HugeTLB registered 2 MB page size, pre-allocated 0 pages
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
msgmni has been set to 988
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 8250
Real Time Clock Driver v1.12b
Linux agpgart interface v0.103
Switching to clocksource tsc
floppy0: no floppy controllers found
brd: module loaded
loop: module loaded
Uniform Multi-Platform E-IDE driver
piix 0000:00:04.0: IDE controller (0x8086:0x7111 rev 0x00)
pci 0000:00:04.0: enabling device (0000 -> 0001)
pci 0000:00:04.0: PCI->APIC IRQ transform: INT A -> IRQ 16
piix 0000:00:04.0: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x1000-0x1007
    ide1: BM-DMA at 0x1008-0x100f
hda: M5 IDE Disk, ATA DISK drive
hdb: M5 IDE Disk, ATA DISK drive
hda: UDMA/33 mode selected
hdb: UDMA/33 mode selected
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
ide-gd driver 1.18
hda: max request size: 128KiB
hda: 1048320 sectors (536 MB), CHS=1040/16/63
 hda: hda1
hdb: max request size: 128KiB
hdb: 4177920 sectors (2139 MB), CHS=4144/16/63
 hdb: unknown partition table
ide-cd driver 5.00
megaraid cmm: 2.20.2.7 (Release Date: Sun Jul 16 00:01:03 EST 2006)
megaraid: 2.20.5.1 (Release Date: Thu Nov 16 15:32:35 EST 2006)
megasas: 00.00.06.14-rc1 Fri. Jan. 6 17:00:00 PDT 2012
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
e1000: Copyright (c) 1999-2006 Intel Corporation.
Fusion MPT base driver 3.04.20
Copyright (c) 1999-2008 LSI Corporation
Fusion MPT SPI Host driver 3.04.20
Fusion MPT SAS Host driver 3.04.20
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
usbcore: registered new interface driver usblp
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mousedev: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input1
device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: using timer interrupt.
TCP: cubic registered
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
console [netcon0] enabled
netconsole: network logging started
EXT2-fs (hda1): warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 3:1.
Freeing unused kernel memory: 380k freed
INIT: version 2.86 booting
mounting filesystems...
loading script...
Script from M5 readfile is empty, starting bash shell...
(none) / # m5 exit

이미지는 만들었으나 부팅이 잘 되지 않는다.
새로 만든 이미지에 아무 것도 넣지 않고 부팅하면 다음과 같은 에러 메시지 발생한다.

...
VFS: Mounted root (ext2 filesystem) on device 3:1.
Freeing unused kernel memory: 376k freed
Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
Pid: 1, comm: swapper Not tainted 3.1.0 #1
Call Trace:
 [<ffffffff8102fd40>] ? panic+0xa0/0x1c0
 [<ffffffff81007beb>] ? sys_execve+0x5b/0x80
 [<ffffffff810003c5>] ? init_post+0xb5/0xc0
 [<ffffffff8171495d>] ? kernel_init+0xfd/0x120
 [<ffffffff81466a44>] ? kernel_thread_helper+0x4/0x10
 [<ffffffff81714860>] ? do_early_param+0xc0/0xc0
 [<ffffffff81466a40>] ? gs_change+0xb/0xb

gem5에서 제공하는 디스크 이미지는 gentoo 리눅스를 수정한 것이다. Documentation을 읽어보면, “gentoo 리눅스를 사용하니 잘 되었다.”라고 하는데, 그래서 gentoo 리눅스를 사용하는 것 같다. 그런데 문제점은 gem5에서 제공하는 이미지를 실험에 바로 사용하기는 너무 어렵다는 것이다. 이미지 크기가 작아서 벤치마크를 넣을 수 없고, 패키지를 설치할 수도 없다. gem5에서 제공하는 이미지에서 gentoo 리눅스는 busybox를 사용하고 있었다. apt, yum 등의 명령어를 사용할 수 없었다. SPEC CPU 2006 workload를 설치하고 싶었는데, 실행하려 하니 glibc 라이브러리가 없다며 에러가 발생했다. 이미지를 만드는 방법만 파악하면 잘 될 것 같은데, 이미지 만드는 방법을 아무리 찾아도 확인할 수 없었다.

Advertisements
Posted in 1) Memo

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

누적 방문자 수
  • 101,726 hits
%d bloggers like this: