From nobody Wed Jun 08 12:25:29 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 321988396D7 for ; Wed, 8 Jun 2022 12:25:42 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LJ5zS4FF3z3jm0 for ; Wed, 8 Jun 2022 12:25:40 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-ot1-x330.google.com with SMTP id g17-20020a9d6491000000b0060c0f0101ffso2715898otl.7 for ; Wed, 08 Jun 2022 05:25:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=WDcyBq3JqjJWv8OJANUvLUE8AaC91ivgXJpt4v12buw=; b=JAApVDQ+wn6TnniZlFoC0zLQYxRFjCRNDf+GYva5m2cBTxFR7W0VY8g2ucQdpBqZRv qVndHa1gOgaFyd6j0u2WKHIAn0oRKupZXll2DtRvZHKTJZvAXJMZmHo5RWxS+2pHByhZ CFat7VCJ00o/EQLX02xF5GCmZUgVrB0x0/Gfs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=WDcyBq3JqjJWv8OJANUvLUE8AaC91ivgXJpt4v12buw=; b=qyMb5lffvUXFzaLQXoloqyJXYyrZc5mvSerBtqt164S7JO8cupypzLZiGY2tM39CC5 FKd3UtD8KZWKrr004eECbj/qB/fVYDN7i/EQUg159yXfztEZa5B7t+oJJ7KN0f1Na6ZY oiwFpfjeo77MwMXbsQV7SAKXFSKi0QAe7AEPm2HPcR653ZOJY/7OOztkw5b2FbWS3ozk Q7tIR1YFQXuU2//k8xXBbtzMmJSlxq6BrUqF5ymmltuRxXxXxlKKJD+ttHcJEmVEpGG9 ZdlapwYBii3J0WfN4RNOcb0scoo//aRJuj2XZATsjoX6JRElruh+6mo1KUZkqkM5xDim D7rg== X-Gm-Message-State: AOAM532GggghOKWpH5VpLEjPwWyaQlbhazmGUdp9nh8Gfmeow/DU0pN2 ZXlOimp3LfcsHbeLT+/usIQQwlNWnTdmVA== X-Google-Smtp-Source: ABdhPJyWg0Mj2mWIf2RVS41HY3xPahF7yg1qfGKeP62d9w1go76ndTN6Xxqn2Qrmg+KE2um2OEsu9w== X-Received: by 2002:a9d:877:0:b0:60c:1b8d:9b90 with SMTP id 110-20020a9d0877000000b0060c1b8d9b90mr503837oty.214.1654691134002; Wed, 08 Jun 2022 05:25:34 -0700 (PDT) Received: from ?IPV6:2804:29b8:5099:52c:378e:75f1:1e7e:4f18? ([2804:29b8:5099:52c:378e:75f1:1e7e:4f18]) by smtp.gmail.com with ESMTPSA id t11-20020a0568301e2b00b0060bf9d6c060sm4343371otr.1.2022.06.08.05.25.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jun 2022 05:25:33 -0700 (PDT) Message-ID: <11716ede-92fa-9a20-ace5-1fae854123b4@bsd.com.br> Date: Wed, 8 Jun 2022 09:25:29 -0300 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: Wrong number of CPUs detected on RPI3 and FreeBSD 13.1 Content-Language: en-US To: greg@unrelenting.technology, Ronald Klop Cc: freebsd-arm@freebsd.org References: <8fcbebf4-60c3-0ccb-259b-3324b123245c@bsd.com.br> <1047394639.643.1654181685742@localhost> From: Otacilio In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4LJ5zS4FF3z3jm0 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsd.com.br header.s=capeta header.b=JAApVDQ+; dmarc=none; spf=pass (mx1.freebsd.org: domain of otacilio.neto@bsd.com.br designates 2607:f8b0:4864:20::330 as permitted sender) smtp.mailfrom=otacilio.neto@bsd.com.br X-Spamd-Result: default: False [-3.34 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsd.com.br:s=capeta]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[bsd.com.br]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsd.com.br:+]; NEURAL_HAM_SHORT(-0.84)[-0.836]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::330:from]; MLMMJ_DEST(0.00)[freebsd-arm]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Em 05/06/2022 14:31, greg@unrelenting.technology escreveu: > June 5, 2022 2:18 PM, "Otacilio" wrote: > >> After some debug I found that this routine is returning -1: >> >> Someone can give-me a hint about the function of psci_callfn ? > PSCI is an interface for calling into power management firmware. > Just saying that *a* PSCI call failed is not informative, we really need the arguments of the call. > > I'm not sure what firmware you have on the SD card but armstub8 from > https://github.com/gonzoua/rpi3-psci-monitor should support: > PSCI_VERSION, PSCI_CPU_ON, PSCI_SYSTEM_OFF, and PSCI_SYSTEM_RESET. > Which should be all the calls that FreeBSD ever does… I did a ofwdump on the RPI3 running the sdcard with my local FreeBSD13.1 build (bad) and the same RPI3 running another sdcard with a downloaded image from freebsd.org (good) and the results are very different. The god one: Node 0x48:   Node 0x110: framebuffer@3e513000   Node 0x1c0: psci   Node 0x1fc: system   Node 0x230: axi     Node 0x238: vc_mem   Node 0x264: aliases   Node 0x6f0: chosen     Node 0x878: bootloader   Node 0x890: reserved-memory     Node 0x8e0: linux,cma   Node 0x94c: thermal-zones     Node 0x960: cpu-thermal ... FreeBSD generic 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC arm64 ====================== Tha bad one: Node 0x58:   Node 0x120: framebuffer@3e513000   Node 0x1d0: psci   Node 0x20c: system   Node 0x240: axi     Node 0x248: vc_mem   Node 0x274: aliases   Node 0x6e0: chosen   Node 0x810: thermal-zones     Node 0x824: cpu-thermal       Node 0x888: cooling-maps   Node 0x8a8: soc     Node 0x934: dma@7e007000 ... FreeBSD azul 13.1-RELEASE FreeBSD 13.1-RELEASE #2 releng/13.1-n250148-fc952ac2212-dirty: Sat Jun  4 22:14:44 -03 2022 ota@azul:/usr/local/www/apache24/storage/FreeBSD/obj/usr/local/www/apache24/storage/FreeBSD/src/arm64.aarch64/sys/GENERIC arm64 The ofwdump output must be the same on both? Thanks a lot