Bug 233863 - r341705 on PowerMac G5 may require kern.smp.disabled=1 and must set usefdt=1 which causes net interface reorder
Summary: r341705 on PowerMac G5 may require kern.smp.disabled=1 and must set usefdt=1 ...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: powerpc Any
: --- Affects Only Me
Assignee: freebsd-ppc mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-08 05:42 UTC by Dennis Clarke
Modified: 2019-01-09 16:03 UTC (History)
1 user (show)

See Also:


Attachments
dmesg output from r341705 on ppc64 with kern.smp.disabled=1 and usefdt=1 (92.54 KB, text/plain)
2018-12-08 05:42 UTC, Dennis Clarke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Clarke 2018-12-08 05:42:47 UTC
Created attachment 199947 [details]
dmesg output from r341705 on ppc64 with kern.smp.disabled=1 and usefdt=1

As discovered while working on bugid 233579 we require usefdt=1 as well 
as kern.smp.disabled=1 in order for the system to boot. The unit will
then boot normally however network devices are status "no carrier".
Also the devices are listing in a different order from RC3 r341271.

See dmesg attached.
Comment 1 Dennis Clarke 2018-12-09 22:33:33 UTC
It was seen that the physical MAC addresses of the bge0 and bge1
interfaces were exchanged in the output from 'ifconfig -a' and thus the
flat device tree option usefdt=1 may be the cause. 

Once this was seen it was trivial to bring up both interfaces and to
assign the correct ip to bge1 and then stop start ntpd and sshd etc.

eris# uname -aU
FreeBSD eris 13.0-CURRENT FreeBSD 13.0-CURRENT r341705 GENERIC  powerpc 1200086
eris# ifconfig -a 
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 02:11:24:e5:13:d0
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        ch 1 dma -1
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
        ether 00:14:51:64:67:11
        inet 172.16.35.8 netmask 0xffffffc0 broadcast 172.16.35.63 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (none)
        status: no carrier
bge1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
        ether 00:14:51:64:67:10
        inet 172.16.35.7 netmask 0xffffffc0 broadcast 172.16.35.63 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex,master>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 
        inet 127.0.0.1 netmask 0xff000000 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: lo 
eris#
Comment 2 Dennis Clarke 2018-12-09 23:04:31 UTC
As yet another variable in the mix we see all four cpu's are online
if and only if one performs are warm boot aka shutdown -r 'now' : 

1) power on system and wait for loader
2) interrupt the load kernel process
3) set kern.smp.disabled=1 
4) set usefdt=1
5) boot -sv
6) once the shell is running simply shutdown -r 'now'
7) interrupt the load kernel process
8) set usefdt=1
9) boot normally 

All processor cores wwill come online : 


eris# uname -aU
FreeBSD eris 13.0-CURRENT FreeBSD 13.0-CURRENT r341705 GENERIC  powerpc 1200086

eris# uptime
11:04PM  up 15 mins, 1 user, load averages: 0.18, 0.21, 0.17

eris# sysctl kern.smp.cpus hw.ncpu 
kern.smp.cpus: 4
hw.ncpu: 4
Comment 3 Mark Millard 2018-12-10 04:30:31 UTC
(In reply to Dennis Clarke from comment #2)

Just an FYI about my from-source builds based on devel/powerpc64-xtoolchain-gcc
and the reverted-to-before /usr/src/sys/powerpc/include/vmparam.h -r334498 .

I jumped from -r340287 to -r341766 . It booted fine as smp.

I tried booting with "set usefdt=1" and the ethernet connection moved to
the other plugin position. It also booted fine as smp and the ethernet
works fine.

[I have occasional access to a G5 Quad Core (system total count) again.]
Comment 4 Mark Millard 2018-12-10 08:55:48 UTC
(In reply to Mark Millard from comment #3)

It appears that one difference I get with set usefdt=1 is
that for shutdown -r or -p bufdeamon, bufspacedaemon-1,
and bugspacedaemon-2 time out.

Another difference may be that the fans may be more likely
to go full blast.