Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Feb 2015 00:04:38 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   RE: HEADS UP: powerpc64 kernel format change [booted a PowerMac G5 quad-core]
Message-ID:  <2AD25D1A-80C0-473B-BD04-9AA512811AF6@dsl-only.net>

next in thread | raw e-mail | index | archive | help
Just an FYI, not a request for anything.

I've booted my powerpc64 11.0-CURRENT -r277990 "GENERIC64vtsc" variant =
on a PowerMac G5 quad core, but a little oddly. I've also used the new =
loader to boot 10.1-RELEASE-p5 and 10.1-STABLE (-r277808), =
10.1-RELEASE-p5 being a normal boot but 10.1-STABLE also being odd in =
the same way as 11.0-CURRENT. (The oddity is not new to the -r277990 =
context.)

Before attempting this I'd already adapted my =
powermac-g5-more-reliable-booting-investigation-hacks to powerpc64 =
11-CURRENT after the relocatable kernel changes touched ofwcall64.S and =
I had booted a with-hack 11.0-CURRENT kernel before this. (The recent =
Justin H. patch for fan/pump RPMs is also present, although the problem =
powermac is gone.)

Like for 10.1-STABLE, for 11-CURRENT (-R277990) the sequence buildworld, =
buildkernel, installkernel, installworld, reboot failed to boot before =
getting to the "any other key for a command prompt" stage, although the =
SRR0 figure was different.

%SRR0: 00000000.01c287ac (10.1-STABLE reports 1c277fc)
%SRR1: 10000000.00003030

But the same technique that allows me to boot 10.1-STABLE works for =
11-CURRENT as well. More below for what I did to have 11-CURRENT =
kernel+world running despite the above.

To make swapping contexts easier I've established copies of the 3 =
vintages of loader, each copy established just after the matching =
installworld:

$ ls -F /boot/loader /boot/loader1*
/boot/loader*				/boot/loader10.1S_from_usr_obj*
/boot/loader10.1RE*			/boot/loader11C*
/boot/loader10.1RE_from_usr_obj*	/boot/loader11C_from_usr_obj*
/boot/loader10.1S*

and I copy /boot/loader11C to /boot/loader to test using it for whatever =
I'm going to boot with it. (I've not tried any that I copied from =
/usr/obj/... I may just delete those.) "RE" stands for RelEng, "S" for =
Stable, "C" for Current.

Note that 10.1RE here is 10.1-RELEASE-p5 (RELENG -r277807) but with my =
original powermac-g5-more-reliable-booting-investigation-hacks and the =
fan/pump RPM patch. (My 10.1-STABLE has those as well.)

I also have separate kernel copies (via INSTKERNNAME use):

$ ls -Fd /boot/kernel*
/boot/kernel/		/boot/kernel10.1RE/	/boot/kernel10.1S/	=
/boot/kernel11C/

(Ignore /boot/kernel here. I tend to use the other ones.)

And I use /boot/loader.conf to control which kernel is initially =
started, such as:

$ more /boot/loader.conf=20
kernel=3D"kernel10.1RE"
verbose_loading=3D"YES"
kern.vty=3Dvt

The kernel10.RE one boots and runs fine with any of the 3 vintages of =
loader. Listing kernel10.1S or kernel11C in loader.conf instead gets the =
SRR0/SRR1 failures referenced above, even when loader (and world) is =
from the matching buildworld.

So I boot as above (kernel10.1RE) but use the "any other key for a =
command prompt" to stop it and then (for example):

unload
boot kernel11C

and that boots and runs fine if I've done the 11-CURRENT installworld =
before the reboot.

(At this point 10.1-RELEASE-p5 and 10.1-STABLE buildworlds (loader =
updated) do not mix very well with 11-CURRENT kernels. "init: getting =
kqueues resource limit invalid argument" notices are an example. And I =
had kernel panics after a while for such combinations. So far the above =
11-CURRENT kernel+world combination seems okay despite the boot sequence =
having a 10.1-RELEASE-p5 kernel variant involved for a bit.)

$ freebsd-version -ku; uname -a
10.1-RELEASE-p5
11.0-CURRENT
FreeBSD FBSDG5M1 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r277990M: Sat Jan =
31 18:27:29 PST 2015     =
root@FBSDG5M1:/usr/obj/usr/home/markmi/src_11_current/sys/GENERIC64vtsc  =
powerpc



Other details controlling how things were built (all 3 are built =
similarly):

$ more /etc/make.conf
WRKDIRPREFIX=3D/usr/obj/portswork
WITH_DEBUG=3D
MALLOC_PRODUCTION=3D

$ more /etc/src.conf
#WITH_DEBUG_FILES=3D
#WITHOUT_CLANG=3D

(I have separate svn source directory trees for 10.1-RELEASE-p5, =
10.1-STABLE (-r277808), and 11.0-CURRENT (-r277990).)

$ more ~markmi/src_11_current/sys/powerpc/conf/GENERIC64vtsc
include GENERIC64
ident   GENERIC64vtsc

nooptions       PS3                     #Sony Playstation 3              =
 HACK!!! to allow sc

options         DDB                     # HACK!!! to dump early crash =
info (but 11.0-CURRENT already has it)
options         GDB                     # HACK!!! ...
#options        KTR
#options        KTR_MASK=3DKTR_TRAP
#options        KTR_CPUMASK=3D0xF
#options        KTR_VERBOSE

# HACK!!! to allow sc for 2560x1440 display on Radeon X1950 that vt =
historically mishandled during booting
device          sc
#device          kbdmux         # HACK: already listed by vt
options         SC_OFWFB        # OFW frame buffer
options         SC_DFLT_FONT    # compile font in
makeoptions     SC_DFLT_FONT=3Dcp437


# Disable extra checking typically used for FreeBSD 11.0-CURRENT:
nooptions       DEADLKRES               #Enable the deadlock resolver
nooptions       INVARIANTS              #Enable calls of extra sanity =
checking
nooptions       INVARIANT_SUPPORT       #Extra sanity checks of internal =
structures, required by INVARIANTS
nooptions       WITNESS                 #Enable checks to detect =
deadlocks and cycles
nooptions       WITNESS_SKIPSPIN        #Don't run witness on spinlocks =
for speed
nooptions       MALLOC_DEBUG_MAXZONES   # Separate malloc(9) zones

(My 10.1-RELEASE-p5 and 10.1-STABLE variants use the same file contents =
as above.)

$ svnlite status ~markmi/src_11_current/
M       /home/markmi/src_11_current/sys/ddb/db_main.c
M       /home/markmi/src_11_current/sys/ddb/db_script.c
?       /home/markmi/src_11_current/sys/powerpc/conf/GENERIC64vtsc
M       /home/markmi/src_11_current/sys/powerpc/ofw/ofw_machdep.c
M       /home/markmi/src_11_current/sys/powerpc/ofw/ofwcall64.S
M       =
/home/markmi/src_11_current/sys/powerpc/powermac/powermac_thermal.c

$ svnlite info ~markmi/src_11_current/
Path: /home/markmi/src_11_current
Working Copy Root Path: /home/markmi/src_11_current
URL: https://svn0.us-west.freebsd.org/base/head
Relative URL: ^/head
Repository Root: https://svn0.us-west.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 277990
Node Kind: directory
Schedule: normal
Last Changed Author: nwhitehorn
Last Changed Rev: 277990
Last Changed Date: 2015-01-31 11:16:51 -0800 (Sat, 31 Jan 2015)

=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2AD25D1A-80C0-473B-BD04-9AA512811AF6>