Monday, August 16, 2010

Repository moved again

Now it's on sourceforge.jp git repository, much faster than my home server.

git://git.sourceforge.jp/gitroot/openbsd-octeon/openbsd-octeon.git

Wednesday, August 11, 2010

16core Cavium OCTEON Server!!



I recently received Movidis x16 Server, which integrated 16core(!!) version Cavium OCTEON.
Which was donation for OpenBSD, from Movidis guy. Thanks!!

It currently running Linux, in near future it'll be OpenBSD for sure ;-)

Monday, August 9, 2010

In IIJ's outside-air-cooled container based data center experiment facility, all 300 servers are running OpenBSD!

I just invited IIJ's next-gen data center experiment facility, and they suggested me to write blog entries.

So I'll try to describe their experiment facilities little bit.

Most important thing for me is it runs OpenBSD anyway ;-)



Problem of traditional data center

Constructing cost is expensive, have to construct all at once.

Takes almost one year to finishing construct, it's difficult to supply to fit demand.

So they need to construct DC for future demand, actually if to do so, it's very difficult to rise ratio of utilization.

While the ratio doesn't raise enough high, their business faces difficult situation.
In data center, they spent same or more amount of electric power for cooling system than IT devices.

These days the devices shrinking but generate more heat, if fill the devices all spaces in rack, it's very difficult to cool them.

So it's waste spaces in rack.

Let's use outside-air-cooled container

Cooling compressor eats most electric power.

They can reduce if we use outside air to cooling the devices.

They also can reduce constructing cost if we use container, and they don't have to construct all at once anymore.

Container can append anytime, and only takes a half day to install.

Experiment

ASHRAE released environmental guidelines(temperature and humidity) for datacenter equipment in 2008, this experiment is trying to follow it using outside air cooling system.
Since they use outside air, temperature and humidity changes by season and also time.
So it needs control.
This is image cooling system, it has three modes:

In winter mode, out side air is too cold, if the system use that air directly, the devices will gets bedewing.

So the system mix exhaust heat and flesh air to cooling.
Spring and fall mode, it just use outside air directly and throw exhaust heat outside.
Summer mode, out side air is too hot, it cannot use it. Use cooling compressor just like traditional datacenter.
For guidelines of power consumption efficiency, we have PUE(Power Usage Effectiveness).

On traditional datacenter, it's generally 2.x, and best score is around 1.4x.

There's no datacenter used as business available under 1.2 in Japan.
This experiment goal is 1.1 whole year for business.

Currently in experiment, they had got 1.07 in winter day(but without UPS and power switchboard).

They are continuously challenging reduce the power consumption to get better score.

To entering business service

They'll construct new datacenter for their cloud service called "IIJ GIO", service in period is next year.

YES IT RUNS OpenBSD!!!!

All servers in the experiment facilities OpenBSD installed!

Thurmo-hygrograph censor is the product of strawberry linux Co., connected to the servers via USB.

And the drivers written by yuo@openbsd. Yeah he also suggested installing OpenBSD to these servers, of cause.

This is great ;-)
These servers are basically just for generating heat(except logging temperature and humidity), it executes openssl to make processors busy.

And of cause it's login from remote, so they can watch temperature log and can control how many machines executes openssl(to heat container up).

Entire picture


Related companies


Cooling system


Cooling compressor

Door for maintenance cooling system


Connector between container and cooling system

Door of container

Foundation of container

It's double entry doors

LED light

Power switch. I'll die if I touched

Thurmo-hygrograph censor

"Hot aisle"

Thurmo-hygrograph censor connected via USB

Duct for throw exhaust heat out

Tube for fire censor

"Cool aisle"

Variety of servers


"It's actually 4GB RAM!" sticker

Tons of 1U servers

Duct for flesh air in

Which manufacturer's machine is this white one?

Other photos #1
Other photos #2

Sunday, August 8, 2010

Ahh... OCTEON doesn't have FPU

I realized OCTEON doesn't have FPU but OpenBSD/mips suppose to have FPU on all supported machines.

 I don't know why but this backtrace says sh trying to enable fpu and it failed. Hah.

Initial setup done, switching console.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2010 OpenBSD. All rights reserved. http://www.OpenBSD.org


OpenBSD 4.7-current (RAMDISK.MP) #5: Sun Aug 8 07:51:44 JST 2010
syuu@macbook.localdomain:/home/syuu/openbsd-octeon/src/sys/arch/octeon/compile/RAMDISK.MP
real mem = 77742080 (74MB)
avail mem = 70664192 (67MB)
mainbus0 at root: Generic OCTEON
cpu0 at mainbus0: Unknown CPU type (0x6) rev 0.0 499 MHz, Unknown FPU type (0x6) rev 0.0
cpu0: cache L1-I 32KB D 16KB 4 way, L2 128KB direct
cpu0: Setsize 0:0
cpu0: Alias mask 0x0
cpu0: Config Register 8000c48f
cpu0: Cache configuration 0
cpu0: Status Register 508000e0
clock0 at mainbus0: ticker on int5 using count register
obio0 at mainbus0com0 at obio0 base 0x 800 irq 34: ns16550, no working fifo
com0: console
com1 at obio0 base 0x c00 irq 35: ns16550, no working fifo
Timecounters tick every 10.000 msec
rd0: fixed, 8192 blocks
root on rd0a swap on rd0b dump on rd0b
dev=0x800 chrdev=0x1600 rawdev=0x1602
WARNING: No TOD clock, believing file system.
WARNING: CHECK AND RESET THE DATE!
init: copying out path `/sbin/init' 11
proc 1 (init): native num 202 call: __sysctl(0x7ffe05f8, 0x2, 0x101a1c70, 0x7ffe0608, 0x0, 0x0)
proc 1 (init): native num 202 ret: err = 0, rv = 0x0,0x25
proc 1 (init): native num 202 call: __sysctl(0x7ffe05b8, 0x2, 0x1024c4b0, 0x7ffe05c8, 0x0, 0x0)
proc 1 (init): native num 202 ret: err = 0, rv = 0x0,0x6
proc 1 (init): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 1 (init): native num 197 ret: err = 0, rv = 0x514f4000,0x3
proc 1 (init): native num 74 call: mprotect(0x514f4000, 0x4000, 0x1)
proc 1 (init): native num 74 ret: err = 0, rv = 0x0,0x514f4018
proc 1 (init): native num 24 call: getuid()
proc 1 (init): native num 24 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 20 call: getpid()
proc 1 (init): native num 20 ret: err = 0, rv = 0x1,0x0
proc 1 (init): native num 147 call: setsid()
proc 1 (init): native num 147 ret: err = 0, rv = 0x1,0x10175fd8
proc 1 (init): native num 50 call: setlogin(0x10176000)
proc 1 (init): native num 50 ret: err = 0, rv = 0x0,0x10175fd8
proc 1 (init): native num 46 call: sigaction(0xc, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x6, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x8, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x4, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0xb, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0xa, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x18, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x19, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x1, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0xf, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x12, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x1e, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x1f, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0xe, 0x7ffe0528, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 48 call: sigprocmask(0x3, 0xffffffff9e7d9156)
proc 1 (init): native num 48 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x15, 0x7ffe05e8, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x16, 0x7ffe05e8, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 6 call: close(0x0)
proc 1 (init): native num 6 ret: err = 9, rv = 0x0,0x0
proc 1 (init): native num 6 call: close(0x1)
proc 1 (init): native num 6 ret: err = 9, rv = 0x0,0xffffffffffffffff
proc 1 (init): native num 6 call: close(0x2)
proc 1 (init): native num 6 ret: err = 9, rv = 0x0,0xffffffffffffffff
proc 1 (init): native num 202 call: __sysctl(0x7ffdfcc8, 0x2, 0x7ffdfcd8, 0x7ffdfce0, 0x0, 0x0)
proc 1 (init): native num 202 ret: err = 0, rv = 0x0,0x1
proc 1 (init): native num 2 call: fork()
proc 1 (init): native num 2 ret: err = 0, rv = 0x4c1f,0x0
proc 1 (init): native num 7 call: wait4(0xffffffffffffffff, 0x7ffdfd0c, 0x2, 0x0)
proc 19487 (init): native num 56 call: revoke(0x10176158)
proc 19487 (init): native num 56 ret: err = 0, rv = 0x0,0x1
proc 19487 (init): native num 240 call: nanosleep(0x7ffdfc98, 0x7ffdfca8)
proc 19487 (init): native num 240 ret: err = 0, rv = 0x0,0x2
proc 19487 (init): native num 5 call: open(0x10176158, 0x2, 0x7ffdfcd8)
proc 19487 (init): native num 5 ret: err = 0, rv = 0x0,0x2
proc 19487 (init): native num 147 call: setsid()
proc 19487 (init): native num 147 ret: err = 0, rv = 0x4c1f,0x2
proc 19487 (init): native num 54 call: ioctl(0x0, 0x20007461, 0x0)
proc 19487 (init): native num 54 ret: err = 0, rv = 0x0,0x2
proc 19487 (init): native num 90 call: dup2(0x0, 0x0)
proc 19487 (init): native num 90 ret: err = 0, rv = 0x0,0xffffffffffffffff
proc 19487 (init): native num 90 call: dup2(0x0, 0x1)
proc 19487 (init): native num 90 ret: err = 0, rv = 0x1,0xffffffffffffffff
proc 19487 (init): native num 90 call: dup2(0x0, 0x2)
proc 19487 (init): native num 90 ret: err = 0, rv = 0x2,0xffffffffffffffff
proc 19487 (init): native num 48 call: sigprocmask(0x3, 0x0)
proc 19487 (init): native num 48 ret: err = 0, rv = 0x9e7c9056,0xffffffffffffffff
proc 19487 (init): native num 20 call: getpid()
proc 19487 (init): native num 20 ret: err = 0, rv = 0x4c1f,0x0
proc 19487 (init): native num 202 call: __sysctl(0x7ffdfa38, 0x2, 0x7ffdfa48, 0x7ffdfa28, 0x0, 0x0)
proc 19487 (init): native num 202 ret: err = 0, rv = 0x0,0x1
proc 19487 (init): native num 58 call: readlink(0x10186c30, 0x7ffdfb98, 0x3f)
proc 19487 (init): native num 58 ret: err = 2, rv = 0x0,0x10254008
proc 19487 (init): native num 253 call: issetugid()
proc 19487 (init): native num 253 ret: err = 0, rv = 0x0,0xffffffffffffffff
proc 19487 (init): native num 20 call: getpid()
proc 19487 (init): native num 20 ret: err = 0, rv = 0x4c1f,0x0
proc 19487 (init): native num 197 call: mmap(0x0, 0xc000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (init): native num 197 ret: err = 0, rv = 0x50df8000,0x3
proc 19487 (init): native num 74 call: mprotect(0x50df8000, 0x4000, 0x0)
proc 19487 (init): native num 74 ret: err = 0, rv = 0x0,0x3
proc 19487 (init): native num 74 call: mprotect(0x50e00000, 0x4000, 0x0)
proc 19487 (init): native num 74 ret: err = 0, rv = 0x0,0x3
proc 19487 (init): native num 20 call: getpid()
proc 19487 (init): native num 20 ret: err = 0, rv = 0x4c1f,0x100000000
proc 19487 (init): native num 197 call: mmap(0x0, 0x2000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (init): native num 197 ret: err = 0, rv = 0x5d618000,0x3
proc 19487 (init): native num 74 call: mprotect(0x10254000, 0x4000, 0x1)
proc 19487 (init): native num 74 ret: err = 0, rv = 0x0,0x1dbdd0be
proc 19487 (init): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (init): native num 197 ret: err = 0, rv = 0x60030000,0x3
proc 19487 (init): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (init): native num 197 ret: err = 0, rv = 0x5b104000,0x3
proc 19487 (init): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (init): native num 197 ret: err = 0, rv = 0x5f41c000,0x3
proc 19487 (init): native num 59 call: execve(0x7ffe0128, 0x7ffdfd18, 0x60030030)
proc 19487 (sh): native num 59 ret: err = 0, rv = 0x0,0x0
proc 19487 (sh): native num 202 call: __sysctl(0x7ffd3470, 0x2, 0x101a1c70, 0x7ffd3480, 0x0, 0x0)
proc 19487 (sh): native num 202 ret: err = 0, rv = 0x0,0x25
proc 19487 (sh): native num 202 call: __sysctl(0x7ffd3430, 0x2, 0x1024c4b0, 0x7ffd3440, 0x0, 0x0)
proc 19487 (sh): native num 202 ret: err = 0, rv = 0x0,0x6
proc 19487 (sh): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x57044000,0x3
proc 19487 (sh): native num 74 call: mprotect(0x57044000, 0x4000, 0x1)
proc 19487 (sh): native num 74 ret: err = 0, rv = 0x0,0x57044018
proc 19487 (sh): native num 20 call: getpid()
proc 19487 (sh): native num 20 ret: err = 0, rv = 0x4c1f,0x0
proc 19487 (sh): native num 202 call: __sysctl(0x7ffd2d30, 0x2, 0x7ffd2d40, 0x7ffd2d20, 0x0, 0x0)
proc 19487 (sh): native num 202 ret: err = 0, rv = 0x0,0x1
proc 19487 (sh): native num 58 call: readlink(0x10186c30, 0x7ffd2e90, 0x3f)
proc 19487 (sh): native num 58 ret: err = 2, rv = 0x0,0x10254008
proc 19487 (sh): native num 253 call: issetugid()
proc 19487 (sh): native num 253 ret: err = 0, rv = 0x0,0xffffffffffffffff
proc 19487 (sh): native num 20 call: getpid()
proc 19487 (sh): native num 20 ret: err = 0, rv = 0x4c1f,0x0
proc 19487 (sh): native num 197 call: mmap(0x0, 0xc000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x5833c000,0x3
proc 19487 (sh): native num 74 call: mprotect(0x5833c000, 0x4000, 0x0)
proc 19487 (sh): native num 74 ret: err = 0, rv = 0x0,0x3
proc 19487 (sh): native num 74 call: mprotect(0x58344000, 0x4000, 0x0)
proc 19487 (sh): native num 74 ret: err = 0, rv = 0x0,0x3
proc 19487 (sh): native num 20 call: getpid()
proc 19487 (sh): native num 20 ret: err = 0, rv = 0x4c1f,0x100000000
proc 19487 (sh): native num 197 call: mmap(0x0, 0x2000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x5ce80000,0x3
proc 19487 (sh): native num 74 call: mprotect(0x10254000, 0x4000, 0x1)
proc 19487 (sh): native num 74 ret: err = 0, rv = 0x0,0x4b545478
proc 19487 (sh): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x5084c000,0x3
proc 19487 (sh): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x50368000,0x3
proc 19487 (sh): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x5c278000,0x3
proc 19487 (sh): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x5454c000,0x3
proc 19487 (sh): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x5b930000,0x3
proc 19487 (sh): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x5a57c000,0x3
proc 19487 (sh): native num 46 call: sigaction(0x2, 0x1023b270, 0x7ffd2f60)
proc 19487 (sh): native num 46 ret: err = 0, rv = 0x0,0xc0
proc 19487 (sh): native num 46 call: sigaction(0x2, 0x7ffd2f60, 0x0)
proc 19487 (sh): native num 46 ret: err = 0, rv = 0x0,0xe8
proc 19487 (sh): native num 46 call: sigaction(0x3, 0x1023b270, 0x7ffd2f60)
proc 19487 (sh): native num 46 ret: err = 0, rv = 0x0,0xc0
proc 19487 (sh): native num 46 call: sigaction(0x3, 0x7ffd2f60, 0x0)
proc 19487 (sh): native num 46 ret: err = 0, rv = 0x0,0xe8
proc 19487 (sh): native num 46 call: sigaction(0xf, 0x1023b270, 0x7ffd2f60)
proc 19487 (sh): native num 46 ret: err = 0, rv = 0x0,0x40
proc 19487 (sh): native num 46 call: sigaction(0xf, 0x7ffd2f60, 0x0)
proc 19487 (sh): native num 46 ret: err = 0, rv = 0x0,0x68
proc 19487 (sh): native num 46 call: sigaction(0x1, 0x1023b270, 0x7ffd2f60)
proc 19487 (sh): native num 46 ret: err = 0, rv = 0x0,0x200
proc 19487 (sh): native num 46 call: sigaction(0x1, 0x7ffd2f60, 0x0)
proc 19487 (sh): native num 46 ret: err = 0, rv = 0x0,0x228
proc 19487 (sh): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x5554c000,0x3
proc 19487 (sh): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x5212c000,0x3
proc 19487 (sh): native num 20 call: getpid()
proc 19487 (sh): native num 20 ret: err = 0, rv = 0x4c1f,0x0
proc 19487 (sh): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 19487 (sh): native num 197 ret: err = 0, rv = 0x547fc000,0x3
proc 19487 (sh): native num 304 call: __getcwd(0x547fc010, 0x400)
proc 19487 (sh): native num 304 ret: err = 0, rv = 0x2,0x1
proc 19487 (sh): native num 39 call: getppid()
proc 19487 (sh): native num 39 ret: err = 0, rv = 0x1,0x1


Trap cause = 11 Frame 0x9800000005df7da8
Trap PC 0xffffffff8112c050 RA 0xffffffff811179ec fault 0x100c0c28
0xffffffff8112bf80 (0,9800000005df4000,9800000005df4000,1000002c) ra 0xffffffff811179ec sp 0x9800000005df7f00, sz 0
0xffffffff811179e0 (0,9800000005df4000,9800000005df4000,1000002c) ra 0x0 sp 0x9800000005df7f00, sz 0
User-level: pid 19487
stopped on non ddb fault
Stopped at 0xffffffff8112c050: lwc1 f0,320(a1)

Saturday, August 7, 2010

com driver implementation started

Unfortunately doesn't work yet.

Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2010 OpenBSD. All rights reserved. http://www.OpenBSD.org


OpenBSD 4.7-current (RAMDISK.MP) #2: Fri Aug 6 15:37:02 JST 2010
syuu@macbook.localdomain:/home/syuu/openbsd-octeon/src/sys/arch/octeon/compile/RAMDISK.MP
real mem = 77742080 (74MB)
avail mem = 70664192 (67MB)
mainbus0 at root: Generic OCTEON
cpu0 at mainbus0: Unknown CPU type (0x6) rev 0.0 499 MHz, Unknown FPU type (0x6) rev 0.0
cpu0: cache L1-I 32KB D 16KB 4 way, L2 128KB direct
cpu0: Setsize 0:0
cpu0: Alias mask 0x0
cpu0: Config Register 8000c48f
cpu0: Cache configuration 0
cpu0: Status Register 508000e0
clock0 at mainbus0: ticker on int5 using count register
obio0 at mainbus0com0 at obio0 base 0x00000800 irq 34
Trap cause = 2 Frame 0x98000000015e3bf8
Trap PC 0xffffffff810028ac RA 0xffffffff81127764 fault 0x0
0xffffffff81002870 (0,0,2580,1dc13000) ra 0xffffffff81127764 sp 0x98000000015e3d50, sz 0
0xffffffff811276f8 (0,0,2580,1dc13000) ra 0x0 sp 0x98000000015e3d50, sz 0
User-level: pid 0
stopped on non ddb fault
Stopped at 0xffffffff810028ac: ld v0,128(a0)
0xffffffff81002870 (0,0,2580,1dc13000) ra 0xffffffff81127764 sp 0x98000000015e
3d50, sz 0
0xffffffff811276f8 (0,0,2580,1dc13000) ra 0x0 sp 0x98000000015e3d50, sz 0
User-level: pid 0
ddb{0}> Connection closed by foreign host.

Tuesday, August 3, 2010

Now it runs with "option MULTIPROCESSOR"

Even single core environment, we needs additional codes to enable "option MULTIPROCESSOR", such as mutex and giant lock primitives.
Just imported these codes from sgi, only works on single core yet though.

syscall debug of /sbin/init

U-Boot 1.1.1 (U-boot build #: 235) (SDK version: 1.9.0-312) (Build time: Apr 23 2009 - 19:30:08)


DRAM: 384 MB
Using default environment


Copying user supplied environment from file flash
Configuring boot bus for full 256meg access
Flash: 256 MB


ELF file is 64 bit
Attempting to allocate memory for ELF segment: addr: 0xffffffff81000000 (adjusted to: 0x0000000001000000), size 0x5d54e0
Allocated memory for ELF segment: addr: 0xffffffff81000000, size 0x5d54e0
Processing PHDR 0
Loading 550350 bytes at ffffffff81000000
Clearing 85190 bytes at ffffffff81550350
## Loading Linux kernel with entry point: 0xffffffff81000000 ...
Bootloader: Done loading app on coremask: 0x1
cvmctl:b00043f0 cvmmemctl:46104
Boot Descriptor Ver: 7 -> 1/2 CPU clock: 700MHz Core Mask: 0x1
Dram: 384 MB Board Type: 1 Revision: 1/0
Octeon Chip: 0 Rev 0/0 Mac Address 00.DE.AD.BE.EF.00 (255)
l1icache size:32768 line:128 set:0
l1dcache size:16384 line:128 set:0
l2size:131072 l3size:0
Initial setup done, switching console.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2010 OpenBSD. All rights reserved. http://www.OpenBSD.org


OpenBSD 4.7-current (RAMDISK.MP) #3: Tue Aug 3 05:46:58 JST 2010
syuu@openbsd0.plan9-jp.info:/home/syuu/octeon/src/sys/arch/octeon/compile/RAMDISK.MP
real mem = 77758464 (74MB)
avail mem = 70696960 (67MB)
mainbus0 at root: Generic OCTEON
cpu0 at mainbus0: Unknown CPU type (0x6) rev 0.0 499 MHz, Unknown FPU type (0x6) rev 0.0
cpu0: cache L1-I 32KB D 16KB 4 way, L2 128KB direct
cpu0: Setsize 0:0
cpu0: Alias mask 0x0
cpu0: Config Register 8000c48f
cpu0: Cache configuration 0
cpu0: Status Register 508000e0
clock0 at mainbus0: ticker on int5 using count register
Timecounters tick every 10.000 msec
rd0: fixed, 8192 blocks
root on rd0a swap on rd0b dump on rd0b
dev=0x800 chrdev=0x1600 rawdev=0x1602
WARNING: No TOD clock, believing file system.
WARNING: CHECK AND RESET THE DATE!
init: copying out path `/sbin/init' 11
proc 1 (init): native num 202 call: __sysctl(0x7ffdfa40, 0x2, 0x101a1c70, 0x7ffdfa50, 0x0, 0x0)
proc 1 (init): native num 202 ret: err = 0, rv = 0x0,0x25
proc 1 (init): native num 202 call: __sysctl(0x7ffdfa00, 0x2, 0x1024c4b0, 0x7ffdfa10, 0x0, 0x0)
proc 1 (init): native num 202 ret: err = 0, rv = 0x0,0x6
proc 1 (init): native num 197 call: mmap(0x0, 0x4000, 0x3, 0x1002, 0xffffffffffffffff, 0x0, 0x0)
proc 1 (init): native num 197 ret: err = 0, rv = 0x56d18000,0x3
proc 1 (init): native num 74 call: mprotect(0x56d18000, 0x4000, 0x1)
proc 1 (init): native num 74 ret: err = 0, rv = 0x0,0x56d18018
proc 1 (init): native num 24 call: getuid()
proc 1 (init): native num 24 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 20 call: getpid()
proc 1 (init): native num 20 ret: err = 0, rv = 0x1,0x0
proc 1 (init): native num 147 call: setsid()
proc 1 (init): native num 147 ret: err = 0, rv = 0x1,0x10175fd8
proc 1 (init): native num 50 call: setlogin(0x10176000)
proc 1 (init): native num 50 ret: err = 0, rv = 0x0,0x10175fd8
proc 1 (init): native num 46 call: sigaction(0xc, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x6, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x8, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x4, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0xb, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0xa, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x18, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x19, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x1, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0xf, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x12, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x1e, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x1f, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0xe, 0x7ffdf970, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 48 call: sigprocmask(0x3, 0xffffffff9e7d9156)
proc 1 (init): native num 48 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x15, 0x7ffdfa30, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 46 call: sigaction(0x16, 0x7ffdfa30, 0x0)
proc 1 (init): native num 46 ret: err = 0, rv = 0x0,0x0
proc 1 (init): native num 6 call: close(0x0)
proc 1 (init): native num 6 ret: err = 9, rv = 0x0,0x0
proc 1 (init): native num 6 call: close(0x1)
proc 1 (init): native num 6 ret: err = 9, rv = 0x0,0xffffffffffffffff
proc 1 (init): native num 6 call: close(0x2)
proc 1 (init): native num 6 ret: err = 9, rv = 0x0,0xffffffffffffffff
proc 1 (init): native num 202 call: __sysctl(0x7ffdf110, 0x2, 0x7ffdf120, 0x7ffdf128, 0x0, 0x0)
proc 1 (init): native num 202 ret: err = 0, rv = 0x0,0x1
proc 1 (init): native num 2 call: fork()
proc 1 (init): native num 2 ret: err = 0, rv = 0x6724,0x0
proc 1 (init): native num 7 call: wait4(0xffffffffffffffff, 0x7ffdf154, 0x2, 0x0)
proc 26404 (init): native num 56 call: revoke(0x10176158)
proc 26404 (init): native num 56 ret: err = 0, rv = 0x0,0x1
proc 26404 (init): native num 240 call: nanosleep(0x7ffdf0e0, 0x7ffdf0f0)

Monday, August 2, 2010

Now it can entry into /sbin/init

Unfortunately it doesn't work, probably because com driver isn't correctly implemented.

U-Boot 1.1.1 (U-boot build #: 235) (SDK version: 1.9.0-312) (Build time: Apr 23 2009 - 19:30:08)


DRAM: 384 MB
Using default environment


Copying user supplied environment from file flash
Configuring boot bus for full 256meg access
Flash: 256 MB


ELF file is 64 bit
Attempting to allocate memory for ELF segment: addr: 0xffffffff81000000 (adjusted to: 0x0000000001000000), size 0x5bff30
Allocated memory for ELF segment: addr: 0xffffffff81000000, size 0x5bff30
Processing PHDR 0
Loading 53b5f0 bytes at ffffffff81000000
Clearing 84940 bytes at ffffffff8153b5f0
## Loading Linux kernel with entry point: 0xffffffff81000000 ...
Bootloader: Done loading app on coremask: 0x1
cvmctl:b00043f0 cvmmemctl:46104
Boot Descriptor Ver: 7 -> 1/2 CPU clock: 700MHz Core Mask: 0x1
Dram: 384 MB Board Type: 1 Revision: 1/0
Octeon Chip: 0 Rev 0/0 Mac Address 00.DE.AD.BE.EF.00 (255)
l1icache size:32768 line:128 set:0
l1dcache size:16384 line:128 set:0
l2size:131072 l3size:0
Initial setup done, switching console.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2010 OpenBSD. All rights reserved. http://www.OpenBSD.org


OpenBSD 4.7-current (RAMDISK) #16: Sun Aug 1 17:19:56 MDT 2010
syuu@noname.my.domain:/home/syuu/octeon/src/sys/arch/octeon/compile/RAMDISK
real mem = 77856768 (74MB)
avail mem = 70893568 (67MB)
mainbus0 at root: Generic OCTEON
cpu0 at mainbus0: Unknown CPU type (0x6) rev 0.0 499 MHz, Unknown FPU type (0x6) rev 0.0
cpu0: cache L1-I 32KB D 16KB 4 way, L2 128KB direct
cpu0: Setsize 0:0
cpu0: Alias mask 0x0
cpu0: Config Register 8000c48f
cpu0: Cache configuration 0
cpu0: Status Register 508000e0
clock0 at mainbus0: ticker on int5 using count register
Timecounters tick every 10.000 msec
rd0: fixed, 8192 blocks
root on rd0a swap on rd0b dump on rd0b
dev=0x800 chrdev=0x1600 rawdev=0x1602
WARNING: No TOD clock, believing file system.
WARNING: CHECK AND RESET THE DATE!
init: copying out path `/sbin/init' 11