Bug 194473 - clang built kernels failing to boot on sparc64
Summary: clang built kernels failing to boot on sparc64
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: sparc64 Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-20 00:44 UTC by craig001
Modified: 2018-03-20 00:26 UTC (History)
3 users (show)

See Also:


Attachments
proposed clang350-import llvm patch (1.53 KB, patch)
2014-12-13 06:36 UTC, craig001
no flags Details | Diff
new clang350-import llvm patch (1.63 KB, patch)
2014-12-14 23:22 UTC, craig001
no flags Details | Diff
changes to clang350-import src to get kernel to build (2.01 KB, patch)
2014-12-14 23:23 UTC, craig001
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description craig001 2014-10-20 00:44:17 UTC
clang kernels are failing to boot on sparc64 boxes.

applying patch and following instructions from;
https://docs.freebsd.org/cgi/getmsg.cgi?fetch=919883+0+/usr/local/www/db/text/2014/freebsd-current/20140716.freebsd-current

produces;
https://docs.freebsd.org/cgi/getmsg.cgi?fetch=94686+98764+/usr/local/www/db/text/2014/freebsd-sparc64/20141019.freebsd-sparc64

#####

jumping to kernel entry at 0xc00a8000
Data Access Exception

#####

It has been suggested that PCPU is at fault and will need non-trivial fix.

Regards

Craig Butler
Comment 1 craig001 2014-12-13 06:36:23 UTC
Created attachment 150537 [details]
proposed clang350-import llvm patch

Roman Divacky <rdivacky@vlakno.cz> has suggested to use this llvm patch against clang350-import branch to get clang built kernels booting.
Comment 2 craig001 2014-12-13 06:37:56 UTC
unfortunately I can't get clang350-import src building on a 10.1-RELEASE sparc64 box.

I have opened up a separate PR for this issue;
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195934
Comment 3 craig001 2014-12-14 03:36:07 UTC
managed to buildkernel with out off tree clang/llvm, but still showing same issue when trying to boot it;

lom>poweron                       
lom>       
LOM event: +8h36m11s host power on
ΓΌ                                 
Sun Fire V120 (UltraSPARC-IIe 648MHz), No Keyboard
OpenBoot 4.0, 1024 MB memory installed, Serial #53822332.
Ethernet address 0:3:ba:35:43:7c, Host ID: 8335437c.



Boot device: disk  File and args:                                     
 
>> FreeBSD/sparc64 boot block
   Boot path:   /pci@1f,0/pci@1/scsi@8/disk@0,0:a
   Boot loader: /boot/loader
Consoles: Open Firmware console  

FreeBSD/sparc64 bootstrap loader, Revision 1.0
(root@bulldog.lerwick.hopto.org, Mon Dec  1 18:28:07 GMT 2014)
bootpath="/pci@1f,0/pci@1/scsi@8/disk@0,0:a"
Loading /boot/defaults/loader.conf 
/boot/kernel/kernel data=0xceda20+0x20fb10 syms=[0x8+0xc11e8+0x8+0xb8b70]
/boot/kernel/geom_mirror.ko text=0x40078 data=0x500+0x18 syms=[0x8+0x1428+0x8+0xed0]

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...               
jumping to kernel entry at 0xc00a8000.
Data Access Exception
ok
Comment 4 craig001 2014-12-14 23:22:19 UTC
Created attachment 150585 [details]
new clang350-import llvm patch
Comment 5 craig001 2014-12-14 23:23:18 UTC
Created attachment 150586 [details]
changes to clang350-import src to get kernel to build
Comment 6 craig001 2018-03-20 00:26:43 UTC
old school and still an issue