From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93C28C43461 for ; Sun, 13 Sep 2020 20:18:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27ADB221E3 for ; Sun, 13 Sep 2020 20:18:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ChKqu/jG"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pu7wiTAm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 27ADB221E3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=4fJTBx6/tO5ygKg/pBrIRPjJ94gRiRBTostMErGSI1o=; b=ChKqu/jG1dc6LtQcbMf4a0WaQR UGf42lQn/Kdyn0YUYfUbIncQ5+CHo/VF5UnB7x40EDhINcvSyUfHYO8+02pvuXNC//yQTXYSyRUCX 6HO47ciDBQa/IRjEm83MLhWjxUd3P2PhNUvIICAH8WVphC9A3vfhWy5JSChXijn80JdblYD4Ax5bP aWlfqW7HvUtAc9TwPEv0h3J0utGIPEwRz56wBuHtGYPDOCkhsKtYJJDkse9iVTTXdTbfiAowqhzdQ H2SQMqGtzzAvoBLcir/Hl/2mhXjB6ALgHqLrCa8gwv4WxsThds9/aIPKNnFPZ4PBCHVK696cdVczT 3H4Tfz+A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHYQ6-0006fN-Fr; Sun, 13 Sep 2020 20:16:18 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHYQ3-0006ev-HR for linux-arm-kernel@lists.infradead.org; Sun, 13 Sep 2020 20:16:16 +0000 Received: by mail-pj1-x1043.google.com with SMTP id t7so4384032pjd.3 for ; Sun, 13 Sep 2020 13:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=GYBP2JGLGUtUqH27ROonim0LtfWgpWeL3ItWWerhmjU=; b=pu7wiTAm08HRyago4fRRrd4D2Cc94CvxLelosy9RBi4+LLeaS+q2eieDd+SUC6P8tw bPa1ThB4ifU/6Qcy2EUhufFyPHHhaMHqeH5vQhnVkMB1bXkhOjxp44r32wPHrsmfT6SO T4b2NnWJzxgxDFIsJiTquJB6UbMj9E4tUiVyhsmBBW7w91g7S2wUQQzCUkv1XVP9hRN7 aNT39f8KUfxXytqTicpvsjksjnnVXLuDTbS4fl3fCeR5EURxEeHy9DmaWWH80Lvngbks eKkvl+V7MLDGMxWUgGOpGJ9H3GIySriN8BJa8OW3B6r87g75q//RKN2SlWlbVhNX+WHE JCaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=GYBP2JGLGUtUqH27ROonim0LtfWgpWeL3ItWWerhmjU=; b=IKBgA0/yTYSDoCjaqJuGpkIBnziKGcYMvNp05Y2kOSqE90Hf33BblhOqiOFEd0fTVc 6W6eE7fDZk0ZhtHiCc+VCI01usH4GorT1InDxk4KjTIxNWYsmy1ZR9j1U6ciC6gUgc+u Nksh3zwQVb1GjLM00/5J3mILqciyhIIY/WxB83lko0DG9Ab9jRT9EAVJOBi5rwouPocu 7xc+t6IK1ZRDzp1hjj7z8VWerTfhYWa2Zoq89fzI2No/WpRyG+/V+RdHhWKu94deAYGc ONp4Pdw73YmP0XNiz8lZEMRa6lmZIQQ/LlU0udbnmrMYEbDrG4UuXukxsKIiifdjbf0S XAOQ== X-Gm-Message-State: AOAM533mKtU4oloH56xt4/e8gpHC4sBG7QHFGtLC2mklssQmbnnpSCJz P7/MFh12Hh4NVV+teCdH6ep48QwlfpQ= X-Google-Smtp-Source: ABdhPJy/rXknAFZ1m9Q03M8SCXA20TLxJKE5LdA2+d0TzMoEWovqOXJZRvcl9ZeSy/NROZOmCNPIAg== X-Received: by 2002:a17:90a:ee16:: with SMTP id e22mr10157492pjy.81.1600028172021; Sun, 13 Sep 2020 13:16:12 -0700 (PDT) Received: from bDebian ([2601:647:5800:2ac5:9eef:d5ff:fefc:64ae]) by smtp.gmail.com with ESMTPSA id r206sm8298764pfr.91.2020.09.13.13.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Sep 2020 13:16:11 -0700 (PDT) Date: Sun, 13 Sep 2020 13:16:08 -0700 From: Brian Norris To: Andy Gross , Bjorn Andersson Subject: [RFC] qcom_scm: IPQ4019 firmware does not support atomic API? Message-ID: <20200913201608.GA3162100@bDebian> MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200913_161615_614323_CB050D48 X-CRM114-Status: GOOD ( 15.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org [ TL;DR: I have an IPQ4019 firmware that needs to effectively revert commit 13e77747800e ("firmware: qcom: scm: Use atomic SCM for cold boot"). Am I insane, or is this something that upstream can support (pending a patch, of course)? ] Hi Qualcomm maintainers, I'm bringing up mainline support for an IPQ4019-based system (the original Google WiFi, if anyone cares), and I'm trying to avoid having to update its bootloader too -- frankly, I'm not even sure I can effect any meaningful change on its "secure world" firmware. Currently, I'm finding that SMP doesn't work, because qcom_scm_set_cold_boot_addr() returns -4 (QCOM_SCM_EOPNOTSUPP?). If I switch back to the non-atomic SMC variant (and hack up scm_legacy_call() a lot, to avoid the DMA API), things work beautifully. Similarly, the vendor/BSP kernel only uses the non-atomic API for this function. This suggests to me that my firmware does not support the atomic variant at all (I see no other such calls being made, besides SMP initialization). IOW, my current patch looks to effectively revert 13e77747800e ("firmware: qcom: scm: Use atomic SCM for cold boot"), and bring back ARM32-specific portions of commit 16e59467a446 ("firmware: qcom: scm: Convert to streaming DMA APIS"). The latter is necessary because the DMA API is not available to early SMP init, when there is no "device" available. I would just post a patch, but: (a) this looks to be totally opposite of the direction that ARM support is "supposed" to be moving and (b) I've tried that before, for a similar problem domain [1], and was met with deafening silence. Considering this patch would be much more invasive, I thought I'd just pose a question first instead. So, back to the TL;DR, am I insane? Well, I may be insane regardless, but is it reasonable to bring back non-atomic support for this case? I can try to limit the damage to ARM32 at least (that's the only user of qcom_scm_set_cold_boot_addr()), but it still isn't the prettiest, given the "unified" nature of the current qcom_scm driver. Note that I can't find evidence that other IPQ4019 users have the same problem (presumably someone (e.g., in the OpenWRT community) would be complaining about lack of SMP otherwise?), so I have to assume there are endless firmware variants out there, as with everything in the ARM world. Thanks, Brian [1] [RFC PATCH] firmware: qcom_scm: disable SDI at boot https://lore.kernel.org/linux-arm-msm/20200721080054.2803881-1-computersforpeace@gmail.com/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel