From owner-freebsd-arm@freebsd.org Tue Oct 15 20:26:40 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B7A0153A99 for ; Tue, 15 Oct 2019 20:26:40 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46t6Ql2Jk9z3Jyr for ; Tue, 15 Oct 2019 20:26:39 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: by mail-wm1-x333.google.com with SMTP id r19so442691wmh.2 for ; Tue, 15 Oct 2019 13:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=iKDHG63bxDJXMrPw6l5F1mbMdTG0G/NBDXsHPax7nsE=; b=hRyu0IKwxiqWD+BioiZEd8ETk7SylccI7VdRwjgkqLs6S8K3YrNcNWI+9nWz6xFEJl 9lelIeEeqbZFveEKUz4VpGtrxRNCSq7nWWcY/0qvIyXA/nCbZAnsOiK2z7XtHUrrVXtw 36TAPxWI1F1gJsJrpxHCgpMw/tHNajookQM76SdaQcgAIfOavdYDxe3YeQB/nGPWvlRO CrKruc18zOYwy5FO42lg/LfAuFdeyzdt7dDhBRo0LjYAuZZ6RCr/GC2B7ywkpqWLeaIb B8/j3P+eEUx53+ezDM52isAvviZJNzhGj/YNWJMxfc7cwMH76hYQTfFSejiu0MbwWFWc nKGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=iKDHG63bxDJXMrPw6l5F1mbMdTG0G/NBDXsHPax7nsE=; b=p040n3BsBvganIApdR7LdqQ7YptcXQCTA6Sa2cx94IZUswiWvTfwSZzFSKqgj/6YZ4 qEK9Xngag2SAZkHAQdbdM2mhi55LRbq0rNgXzYdM2hDbqvuNFla4XfdEXR6ddlJUAaul oGikwAv4HVX6FYwd6ZpYLYnMS9LwpUXrbfXCcwrMe2uQKhq3r+lRfqjLLrHiDPsUxbzj o1lNFozKBhex7Q/UsvqH/CchvYqajdloqJidc0INPJI4iS8I2XX5/HQqOeOOE6kxlTeb bVKQpTE2WwDMzpQ3xkGGvF0MJIUBzEIHzn5DKrhx0Lz3/OrucX2y13KFbEISHtWBP1VE KdKg== X-Gm-Message-State: APjAAAV2ze38/LkyWiqbJZpKOqixWPo3OIr8htv0guu2yCR5vfxbNgO8 kIbcD3Vxqe8PCUh5oXqZFUkEWTYJ X-Google-Smtp-Source: APXvYqy0Gs/LVFWbfbuqKld+GSiZhCE2d+H+e8FqavFaOixPAcop18OWxGJVTtz3jDeCbXXgfQVmCQ== X-Received: by 2002:a1c:f201:: with SMTP id s1mr273845wmc.59.1571171197679; Tue, 15 Oct 2019 13:26:37 -0700 (PDT) Received: from mac.deepcore.dk ([85.27.186.9]) by smtp.gmail.com with ESMTPSA id x129sm490323wmg.8.2019.10.15.13.26.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Oct 2019 13:26:36 -0700 (PDT) From: =?utf-8?Q?S=C3=B8ren_Schmidt?= Message-Id: <184A8618-F027-42F2-B930-C3331DB43A50@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Trouble starting AP cpu's on all winner R40/V40 chip, help needed? Date: Tue, 15 Oct 2019 22:26:35 +0200 In-Reply-To: <07E4329F-3DFD-49FB-A3BC-A63790DCC798@gmail.com> Cc: freebsd-arm To: Emmanuel Vadot References: <0AE907CC-0CBC-4A8A-A2D3-71EF37330503@gmail.com> <20191015140210.82d406d7a7b86720e4771206@bidouilliste.com> <07E4329F-3DFD-49FB-A3BC-A63790DCC798@gmail.com> X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 46t6Ql2Jk9z3Jyr X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=hRyu0IKw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of sorenschmidt@gmail.com designates 2a00:1450:4864:20::333 as permitted sender) smtp.mailfrom=sorenschmidt@gmail.com X-Spamd-Result: default: False [-1.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[3.3.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(0.00)[ip: (-8.88), ipnet: 2a00:1450::/32(-2.85), asn: 15169(-2.10), country: US(-0.05)]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2019 20:26:40 -0000 >>=20 >>>=20 >>> R40 seems to use different registers for cpu bringup, so you will = need >>> to define a new platform for it in aw_machdep.c and defines some new >>> function for ap bringup in aw_mp.c >>> The User Manual section 3.2 of the R40 have all the needed info. >>>=20 >>=20 >> Yeps, already did that, and I can reset the cores etc, that seems to = work (register bits flips), but there are no mention of regs to put the = starting address into. >>=20 >> Chap 3.2 doesn=E2=80=99t mention anything in that regard (at least in = the docs I=E2=80=99ve found online) its moved to chap 4.2 in the latest = R40/V40/T3 docs I=E2=80=99ve found bu still no mention of starting = address. >>=20 >> I looks somewhat like the A20 ie it has control for 2 cpu=E2=80=99s = the last two are missing from the register ref, which suggests to me = that the docs might be inaccurate at best. >>=20 >> I looked into =E2=80=9CTina-linux=E2=80=9D that they made for it, but = I havn=E2=80=99t found out how they start it there either.. >>=20 >> I might also just have stared me blind at it :) >=20 > Found that the start adresse is somewhere else: >=20 > CPU software entry register offset 00bc in sysctl instead of cpuctl=E2=80= =A6 >=20 > I=E2=80=99ll try that when I get home later today,,, Success, I now have all 4 cores running, took a little experimenting = though, release the power switch/clamp is non-std too. Now to the last part, the gmac 1G ether controller :) PS: I have had to add devices to the .dtsi and dts files for the r40/v40 = for this to work at all, std-linux doesn=E2=80=99t support this setup = either. PPS: when this is all done, any chance for it to get into the official = sources ? (Yeah I retired my src commit bit long ago :))=20 -S=C3=B8ren