Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4238528pxb; Tue, 17 Nov 2020 15:27:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJynz5hFnZytTSRWx8ovl/eEZ3sL8u2+ZNXH3DCMiUtst++bVhy4xIJAYzBVKlgtDGQ7pl10 X-Received: by 2002:a50:f40a:: with SMTP id r10mr23208070edm.229.1605655663910; Tue, 17 Nov 2020 15:27:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605655663; cv=none; d=google.com; s=arc-20160816; b=Y0a77f5s5P0zwhYiSYkKNQGMP63Zw61iNVFQdiRMUDQFmZqUU720ht7hxjhLAicZeL FkGts+MQhVBXUtPeVlkGqtYuqXyefUzMMHZcEKpm/GS1cishmiagNA8PDs+lQvgl/6HU fXBWzQiiI0oeEqlVmZCXqeUd2uqOfhe8oP8u8tNJtmq4fQ8QvHnf1xzNSpl9CGDM37yl zkW229bGWXwFDC10xS1daAzQthLF8Acjfm8DCs40YXUPDWrMcVSJrgrgaCdi1bEHBXPi 4Dit1NOYrzEmeLvmPfXSWONmzHxbc3jmgBM3Yax15tiWnqhhltXkCoj1/xpvDzxwoghX qY7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=kITuww2ahLZuCCtkTmU/9GdLFPSTFU/rSOFcgScUBfQ=; b=CQgHLGi54o+n15e75j9eBAstGEOr+DDB5vBX0+RyU/4KcRvVHxnS3PEaiR1/hiJXyV SmBvJsiMEycUKFckm/hlAmUfrQVpSAd24WlMEDMVQuHAt3YXUKHz/VvuetOi2psy7y0j NHDhnB+36W22paiVJPcJgtozMk0lf21/irkEPUWE6Aq5NH9YSBx9ypWHcUn3G5ffuM6Q rdQaARka9IR7NbP/iT+flvVAiMFUXHKUdzFbwOt6ythxLqwcQtHW3MwuyEzvP9F9Ec/J pQGsIgnVLYu00GLc/sQWJzu97E2dpgGCQbEBW0TZGI+bXwWEc7VMtT1kP/Nsav2J6l/S XtAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=TLib962k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si14697830edq.55.2020.11.17.15.27.21; Tue, 17 Nov 2020 15:27:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=TLib962k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728458AbgKQXYD (ORCPT + 99 others); Tue, 17 Nov 2020 18:24:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727842AbgKQXYA (ORCPT ); Tue, 17 Nov 2020 18:24:00 -0500 Received: from mail-oi1-x264.google.com (mail-oi1-x264.google.com [IPv6:2607:f8b0:4864:20::264]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64BD5C0617A6 for ; Tue, 17 Nov 2020 15:24:00 -0800 (PST) Received: by mail-oi1-x264.google.com with SMTP id d9so126657oib.3 for ; Tue, 17 Nov 2020 15:24:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=kITuww2ahLZuCCtkTmU/9GdLFPSTFU/rSOFcgScUBfQ=; b=TLib962kYixicJAUBcsWgjFAiBifR0oK8/cAaeYh1AVvrP1M6GUdt3tIZhwKVBKEy2 xzHhic3CheYDPqgZRb6vAdaUdHbmM9F8uFVxZ8YerrdBdxTnjj8CTwp/kN9loTXKcsQX 15xXB9UJEbVA6dBqAoIqJl++1J0tFG4kJHY74= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=kITuww2ahLZuCCtkTmU/9GdLFPSTFU/rSOFcgScUBfQ=; b=WMFPqocyRvs7KaRPUwtG6IbVMjJO2I4lWrCTZLlUfnKPQbVZjmtBXMeZHkDLlSrE2e 914Oa//YMk6MbBcaGej83zdGJSda5yzGCznD+LHwEO3ZVmWHu7Vr9FFJVW+5Ru4MPX9P sadIp5LOVLe2/NvidsZi6fAUcl5k0Z4sV6ZvOwfbYRm0BzIYqIZ9tpPFiasMjQxTeeFE KPKYN2DRPqr0uomG4WBLB1GI6LqI8290WhcgCrb/un/n6tSAZmLJEyxh0gKBVbGM8/gQ VvSGuWGC6d/0gaEizdiNDQaLq2rq7hb7KRMG74/3TyVVcfeAPST9QhAIupUbnva6sWbe gAKQ== X-Gm-Message-State: AOAM532zsI0o5izicKjNwEfMhMy6kZdr4oqJMkWgzUMHcsFLYzUnqWA/ nINuc0JHKIMEkPGXaK+266xWmG2HBP8j6bcSWPQO5YFbABhU X-Received: by 2002:aca:a951:: with SMTP id s78mr1057274oie.114.1605655439555; Tue, 17 Nov 2020 15:23:59 -0800 (PST) Received: from lbrmn-lnxub113.broadcom.net ([192.19.228.250]) by smtp-relay.gmail.com with ESMTPS id q22sm5867076otg.13.2020.11.17.15.23.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 15:23:59 -0800 (PST) X-Relaying-Domain: broadcom.com From: Scott Branden To: Arnd Bergmann , Greg Kroah-Hartman , Scott Branden , Desmond Yan Cc: Kees Cook , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Olof Johansson Subject: [PATCH v7 00/13] Add Broadcom VK driver Date: Tue, 17 Nov 2020 15:23:07 -0800 Message-Id: <20201117232320.4958-1-scott.branden@broadcom.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series drops previous patches in [1] that were incorporated by Kees Cook into patch series "Introduce partial kernel_read_file() support" [2]. Remaining patches are contained in this series to add Broadcom VK driver. (which depends on request_firmware_into_buf API addition which has now been accepted into the upstream kernel as of v5.10-rc1). [1] https://lore.kernel.org/lkml/20200706232309.12010-1-scott.branden@broadcom.com/ [2] https://lore.kernel.org/lkml/20201002173828.2099543-1-keescook@chromium.org/ Changes from v6: - drop QSTATS patch as it needs to be reviewed if trace_printk makes sense - add wdog and IPC interface alerts - add boundary check to msgq and peerlog - clear additional registers on reset Changes from v5: - dropped sysfs patch from series for now as rework to use hwmon - tty patch still at end of series to drop if another solution available - updated cover letter commit to point to Kees' latest patch submission in [2] - specified --base with Kees' patches applied (kernel branches don't have these yet) - removed trivial comment - moved location of const to before the struct in two declarations - changed dev_info to dev_warn and only print when irq don't match expected - changed dev_info to dev_dbg when printing debug QSTATS - removed unnecessary %p print Changes from v4: - fixed memory leak in probe function on failure - changed -1 to -EBUSY in bcm_vk_tty return code - move bcm_vk_tty patch to end of patch series so it can be dropped from current patch series if needed and rearchitected if needed. Changes from v3: - split driver into more incremental commits for acceptance/review - lowered some dev_info to dev_dbg - remove ANSI stdint types and replace with linux u8, etc types - changed an EIO return to EPFNOSUPPORT - move vk_msg_cmd internal to driver to not expose to UAPI at this time Changes from v2: - open code BIT macro in uapi header - A0/B0 boot improvements Changes from v1: - declare bcm_vk_intf_ver_chk as static Scott Branden (13): bcm-vk: add bcm_vk UAPI misc: bcm-vk: add Broadcom VK driver misc: bcm-vk: add autoload support misc: bcm-vk: add misc device to Broadcom VK driver misc: bcm-vk: add triggers when host panic or reboots to notify card misc: bcm-vk: add open/release misc: bcm-vk: add ioctl load_image misc: bcm-vk: add get_card_info, peerlog_info, and proc_mon_info misc: bcm-vk: add VK messaging support misc: bcm-vk: reset_pid support misc: bcm-vk: add mmap function for exposing BAR2 MAINTAINERS: bcm-vk: add maintainer for Broadcom VK Driver misc: bcm-vk: add ttyVK support MAINTAINERS | 7 + drivers/misc/Kconfig | 1 + drivers/misc/Makefile | 1 + drivers/misc/bcm-vk/Kconfig | 15 + drivers/misc/bcm-vk/Makefile | 12 + drivers/misc/bcm-vk/bcm_vk.h | 513 ++++++++++ drivers/misc/bcm-vk/bcm_vk_dev.c | 1651 ++++++++++++++++++++++++++++++ drivers/misc/bcm-vk/bcm_vk_msg.c | 1350 ++++++++++++++++++++++++ drivers/misc/bcm-vk/bcm_vk_msg.h | 163 +++ drivers/misc/bcm-vk/bcm_vk_sg.c | 275 +++++ drivers/misc/bcm-vk/bcm_vk_sg.h | 61 ++ drivers/misc/bcm-vk/bcm_vk_tty.c | 333 ++++++ include/uapi/linux/misc/bcm_vk.h | 84 ++ 13 files changed, 4466 insertions(+) create mode 100644 drivers/misc/bcm-vk/Kconfig create mode 100644 drivers/misc/bcm-vk/Makefile create mode 100644 drivers/misc/bcm-vk/bcm_vk.h create mode 100644 drivers/misc/bcm-vk/bcm_vk_dev.c create mode 100644 drivers/misc/bcm-vk/bcm_vk_msg.c create mode 100644 drivers/misc/bcm-vk/bcm_vk_msg.h create mode 100644 drivers/misc/bcm-vk/bcm_vk_sg.c create mode 100644 drivers/misc/bcm-vk/bcm_vk_sg.h create mode 100644 drivers/misc/bcm-vk/bcm_vk_tty.c create mode 100644 include/uapi/linux/misc/bcm_vk.h -- 2.17.1