Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 5 years ago

Last modified 4 years ago

#586 new enhancement

HelenOS on SPARC Enterprise T5120

Reported by: Jiri Svoboda Owned by:
Priority: minor Milestone:
Component: helenos/unspecified Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

Make HelenOS boot on T5120. Currently we get:

SPARC Enterprise T5120, No Keyboard
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.33.6, 8192 MB memory available, Serial #xxxxxxx.
......

1000 Mbps full duplex Link up
Timed out waiting for BOOTP/DHCP reply
HelenOS bootloader, release 0.5.0 (Fajtl), revision 2112M (martin@decky.cz-20140520143617-mltwrvqip46ugkt7)
Built on 2014-05-22 15:19:09 for sparc64
Copyright (c) 2001-2014 HelenOS project
Error: No physical memory detected, halting.

Change History (9)

comment:1 Changed 5 years ago by Jiri Svoboda

{0} ok .properties
idprom                   01 84 00 14 4f 96 d2 46 00 00 00 00 96 d2 46 de ...
scsi-initiator-id        00000007 
banner-name              SPARC Enterprise T5120
name                     SUNW,SPARC-Enterprise-T5120
stick-frequency          457646c0 
hv-api-groups            00 00 00 00 00 00 00 01 00 00 01 00 00 00 00 02 ...
breakpoint-trap          0000007f 
device_type              sun4v
compatible               sun4v
#address-cells           00000002 
#size-cells              00000002 
{0} ok dev memory@m0,8000000
{0} ok .properties
reg                      00000000 08000000 00000001 00000000 
                         00000004 00000000 00000001 00000000 
available                00000004 fffca000 00000000 0000e000 
                         00000004 00000000 00000000 fff70000 
                         00000001 07f40000 00000000 00008000 
                         00000000 08400000 00000000 ffac0000 
name                     memory

comment:2 Changed 5 years ago by Jiri Svoboda

The problem is in boot/genarch/src/ofw.c function ofw_memmap. The variable size is defined as uint32_t. On a T1000 that has (16 GB - delta) memory HelenOS detects (4 GB - delta) memory. But this T5120 has two blocks of exactly 4 GB, which gives us a size of 0 when truncated to 32 bits.

comment:3 Changed 5 years ago by Jiri Svoboda

After changing size to uintptr_t:

HelenOS bootloader, release 0.5.0 (Fajtl), revision 2112M (martin@decky.cz-20140520143617-mltwrvqip46ugkt7)
Built on 2014-05-22 15:19:09 for sparc64
Copyright (c) 2001-2014 HelenOS project

Memory statistics (total 4092 MB, starting at 0x0000000008400000)
 0x000000000000c280|0x000000000840c280: boot info structure
 0x0000000000400000|0x0000000008800000: kernel entry point
 0x0000000000004000|0x0000000008404000: loader entry point
 0x000000000000cd5c|0x000000000840cd5c: kernel image (864192/139193 bytes)
 0x000000000002ed15|0x000000000842ed15: ns image (154273/64361 bytes)
 0x000000000003e87e|0x000000000843e87e: loader image (152848/64209 bytes)
 0x000000000004e34f|0x000000000844e34f: init image (154702/64620 bytes)
 0x000000000005dfbb|0x000000000845dfbb: locsrv image (162143/68159 bytes)
 0x000000000006e9fa|0x000000000846e9fa: rd image (152084/63461 bytes)
 0x000000000007e1df|0x000000000847e1df: vfs image (169379/71547 bytes)
 0x000000000008f95a|0x000000000848f95a: logger image (158166/66232 bytes)
 0x000000000009fc12|0x000000000849fc12: ext4fs image (238605/98124 bytes)
 0x00000000000b7b5e|0x00000000084b7b5e: initrd image (8388608/1556853 bytes)

Inflating components ... initrd ext4fs logger vfs rd locsrv init loader ns kernel .
Setting up boot allocator ...
Setting up screens ...
Canonizing OpenFirmware device tree ...
Booting the kernel ...
SPARTAN kernel, release 0.5.0 (Fajtl), revision 2112M (martin@decky.cz-20140520143617-mltwrvqip46ugkt7)
Built on 2014-05-22 15:19:09 for sparc64
Copyright (c) 2001-2014 HelenOS project
Detected 1 CPU(s), 4092 MiB free memory
Program loader at 0xffff800100040000
RAM disk at 0x0000000008a2c000 (size 8388608 bytes)
Kernel console ready (press any key to activate)
ns: HelenOS IPC Naming Service
ns: Accepting connections
init: HelenOS init
loc: HelenOS Location Service
rd: HelenOS RAM disk server
rd: Found RAM disk at 0x0000000008a2c000, 8388608 bytes
vfs: HelenOS VFS server
logger: HelenOS Logging Service
ext4fs: HelenOS ext4 file system server
loc: Accepting connections
vfs: Accepting connections
logger: Accepting connections
rd: Accepting connections
ext4fs: Accepting connections
init: Root filesystem mounted on / (ext4fs at bd/initrd)
init: Unable to stat /srv/tmpfs
init: Starting /srv/klog
[kernel/other] note: Program loader at 0xffff800100040000
init: Starting /srv/locfs
[kernel/other] note: RAM disk at 0x0000000008a2c000 (size 8388608 bytes)
locfs: HelenOS Device Filesystem
locfs: Accepting connections
init: Unable to stat /srv/taskmon
init: Location service filesystem mounted on /loc (locfs)
init: Temporary filesystem unknown type (tmpfs)
init: Starting /srv/devman
devman: HelenOS Device Manager
devman: Accepting connections.
root: HelenOS root device driver
init: Unable to stat /srv/apic
init: Unable to stat /srv/i8259
[devman] note: The `root' driver was successfully registered as running.
init: Starting /srv/obio
[devman] error: No driver found for device `/virt'.
[devman] error: No driver found for device `/hw'.
Task devman (11) killed due to an exception at program counter 0x000000000000f798.
TSTATE=0x4400001204
TPC=0xf798 (unknown)
TNPC=0xf79c (unknown)
Kill message: mem_address_not_aligned.
obio: HelenOS OBIO driver
obio: No OBIO registers found
init: Server /srv/obio failed to start (exit code -1)
init: Unable to stat /srv/cuda_adb
init: Unable to stat /srv/s3c24xx_uart
init: Unable to stat /srv/s3c24xx_ts
init: Unable to stat /srv/loopip
init: Unable to stat /srv/ethip
init: Unable to stat /srv/inetsrv
init: Unable to stat /srv/tcp
init: Unable to stat /srv/udp
init: Unable to stat /srv/dnsrsrv
init: Unable to stat /srv/dhcp
init: Unable to stat /srv/nconfsrv
init: Unable to stat /srv/clipboard
init: Unable to stat /srv/remcons
init: Starting /srv/input
input: HelenOS input service
input: Accepting connections
init: Starting /srv/output
output: HelenOS output service

Note that only 4 GB is detected still as memory comes in two discontinuous 4 GB blocks and ofw_memory() can only use the first one.

Devman seems to be having trouble. Not sure if that's the reason why we don't get to the shell prompt.

comment:4 Changed 4 years ago by Jakub Jermář

It would make sense to retest on T5120 wrt. the devman crash and the missing prompt after mainline,2409.

comment:5 Changed 4 years ago by Jiri Svoboda

Here's mainline,2409 on a T5120 (this is not the same machine, this one has 16 GiB memory):

Copyright (c) 2001-2015 HelenOS project
Detected 1 CPU(s), 16252 MiB free memory
Program loader at 0xffff800100040000
RAM disk at 0x0000000008a6c000 (size 8388608 bytes)
Kernel console ready (press any key to activate)
ns: HelenOS IPC Naming Service
ns: Accepting connections
init: HelenOS init
loc: HelenOS Location Service
Task init:locsrv (4) killed due to an exception at program counter 0x000000000001c460.
TSTATE=0x4400001200
TPC=0x1c460 (unknown)
TNPC=0x1c464 (unknown)
Kill message: instruction_access_exception.
rd: HelenOS RAM disk server
rd: Found RAM disk at 0x0000000008a6c000, 8388608 bytes
vfs: HelenOS VFS server
logger: HelenOS Logging Service
ext4fs: HelenOS ext4 file system server
vfs: Accepting connections
logger: Accepting connections
ext4fs: Accepting connections

comment:6 Changed 4 years ago by Jiri Svoboda

From locsrv.disasm:

000000000001c460 <hash_table_find>:
   1c460:       9d e3 bf 50     save  %sp, -176, %sp
   1c464:       02 c6 00 27     brz,pn   %i0, 1c500 <hash_table_find+0xa0>
   1c468:       11 00 00 9a     sethi  %hi(0x26800), %o0
   1c46c:       c2 5e 20 08     ldx  [ %i0 + 8 ], %g1

comment:7 Changed 4 years ago by Jakub Jermář

Thanks. Would it be possible to try once more without the TSB support?

comment:8 Changed 4 years ago by Jiri Svoboda

With TSB disabled the system boots all the way up to bdsh.

comment:9 Changed 4 years ago by Jakub Jermář

Thanks again. There is a TSB alignment bug that was introduced with the new frame allocator, I am going to commit a fix soon.

Note: See TracTickets for help on using tickets.