From owner-freebsd-arm@freebsd.org Wed Aug 9 22:08:48 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 638F6DD70C4 for ; Wed, 9 Aug 2017 22:08:48 +0000 (UTC) (envelope-from sylvain@sylvaingarrigues.com) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9BEE360F for ; Wed, 9 Aug 2017 22:08:47 +0000 (UTC) (envelope-from sylvain@sylvaingarrigues.com) Received: by mail-wm0-x229.google.com with SMTP id t201so6500200wmt.1 for ; Wed, 09 Aug 2017 15:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sylvaingarrigues-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JDNBHNoAw5Y/ol23rva421Xi68IYW/yIh1ySd5eWFtw=; b=MHscqNhCMiGcVyl9MFNUNxyuUu1ZHEX9x7dd/hvukB+sF8uyzqdnuj4Fo3SmlJDkyM BiJLOKqFnZ0Rkqf2QL9y6/OzeyNmh6ob05UdTjoxOL1jdZxjcgEaPQX75NAU6USVUMn0 XS6+j5ebuDgNqaops51EuF7v8iE/Q4KC2CLDTWsKvDht7YoGatmBnwoo5ctaVy1n2M3t +wT9rHjISblLpspyI/kb0U7cELn76j0vWW9d61Wbsp2OyzFecNjucBp+Iniz6F18aqmu 1jEj/z23elyB4oiPKKyUvWexhxnopNgiD+LqPkJpKyTogbX5Oz3kAVjYzGXrrlHV7j4u PHag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JDNBHNoAw5Y/ol23rva421Xi68IYW/yIh1ySd5eWFtw=; b=SI6cMh8MMNm0k4oAC48f7TBQLPjkJoQUYy07/GCeTDDVZRUYUF5wSF8okc153Vvava 0FCNfW0Kq7lif2fi0jMFylUGEAAojO2BWWJYq/VKV4DfFZj9NKkv/+Prt+xI8qjVnJ2+ 4WVcNtRKji7fTEG2Ysp1Ly8CQom6SXM1wXlym5En1RCTRjverXVzS/avHOGXGPATicJL Xsb07TfEf1UO/l1YNpn8jHVUz8Qf5ul0X2UMSyMoPa2K/7IijDDc3a5cvS55dGcvn8x4 D6N+ukg7nTsLwIMZzPdOx92lkEi3AuCv+pZxmEjK6SrUed0vAhBp1tSNgi/SMe/ot6Mb YbPA== X-Gm-Message-State: AHYfb5jE008qYFUhiIoY+Cl6cqkdWy2W/YB+WqBSuMIx0x94X4lbhP0a 8hW4tGyj0m7KPTRitHHXY3ycUrzZ8W9HMuY= X-Received: by 10.80.188.21 with SMTP id j21mr9443007edh.139.1502316526350; Wed, 09 Aug 2017 15:08:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.129.229 with HTTP; Wed, 9 Aug 2017 15:08:45 -0700 (PDT) X-Originating-IP: [82.251.149.119] In-Reply-To: References: From: Sylvain Garrigues Date: Thu, 10 Aug 2017 00:08:45 +0200 Message-ID: Subject: Re: armv6 kernel support for Raspberry Pi 3 in default aarch32 mode To: Mark Millard Cc: freebsd-arm Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Aug 2017 22:08:48 -0000 Hello, 2017-08-09 22:38 GMT+02:00 Mark Millard : > > FreeBSD does not have the state change management for ARMv8: it only > uses/has an aarch64 configuration (once FreeBSD's initial configuration > is in place anyway). There is no logic for ongoing execution-state > changes as far as I know. > > As far as I know no one has set up a boot sequence for FreeBSD to > go to an aarch32 variant of FreeBSD from some earlier stage of > the boot sequence. On Raspberry Pi 3, the cortex-a53 processor starts in the aarch32 state if I'm correct, provided you don't add any arm_control=0x200 line in config.txt (no arm_control by default). > > So what's wrong and what shall be done to make our armv6 kernel boot on a > > raspberry pi 3? > > > I am interested in getting directions to make this happen (modifications > > needed in locore-v6.S?) > > To my knowledge no one has said they have ever figured this > out for FreeBSD: it is a research project for whoever is > interested enough to bother. Apparently some people may have, so did Warner say a few weeks ago: *"I've been told of people claiming to run a newer rpi2 **(v1.2 or newer) in 32-bit mode, but I've not been able to confirm the **people who are making the claims."* (see this "Creating armv7 MACHINE_ARCH" thread: https://docs.freebsd.org/cgi/getmsg.cgi?fetch=168619+0+/usr/local/www/mailindex/archive/2017/freebsd-arm/20170618.freebsd-arm ) I just plugged my serial cable and put debug char at almost every instruction in locore-v6.S to understand why we get the to raspberry pi rainbow screen of depth before entering initarm: it seems to happen just after the switch to virtual address with "ldr pc, =1f" ( https://github.com/freebsd/freebsd/blob/master/sys/arm/arm/locore-v6.S#L491). That's when I don't get any more serial output although I did setup early_putc and SOCDEV_PA & VA machinery to have early boot output - which I do get with rpi2 v1.1). I can try more debug if given instructions. Sylvain