From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::133; helo=mail-lf1-x133.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 90E112119A872 for ; Mon, 17 Dec 2018 04:55:33 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id u18so9352969lff.10 for ; Mon, 17 Dec 2018 04:55:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=WmlD3P0QFUw1B+lvef/GDJ4I8QND5cNv4Pu7Ibmgsy0=; b=H4t7IDNdbpSX/NuwzW3D9daR5SkGJ9DxvTmS2CZV4Bv+9l5BDafyzyNPbmE57GdS2V eDSgBKJPRYUODlC7hfEiSbLgPfZsdZHQdPI+x3ksIT1sOVk0XcR9bj+LwPZ01fslovNe hVTmn2ZLtAD6i/NjCc8MZhN5aF/jAUDO+vWts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=WmlD3P0QFUw1B+lvef/GDJ4I8QND5cNv4Pu7Ibmgsy0=; b=bqFhjMAG+IbxIFq1b+BC92M3kEX+U4ngK+CAGwEI85gCNwghz4c9MNtrLoe8930NvN ZTy4cpMa7o53X5qQiG0HKwV4YjDZ9HFw9e22p0N/uHmY/Rka7BfC6P6QKYSvjetY3Vf8 HGLAqevpjqCgx/bG22/lsYeNLkxW1L0Zd29hh/mc2iywhdIpGfVP7ikV7K5px+Xr0ZN5 fDUAi6lSL9M1Jo7Z7cPD12ahN++1UxtSMf6QY63Gm7YB8dATrv+M51Lw5EL+vQGVfW7p uNcFW/yCiLs+TsF4uBret19xXEIawHRqebpGBq6/UN0/Qm4qjPYTo5fsTmyHPwccoPzH LyhA== X-Gm-Message-State: AA+aEWYeeZsfL4ZMeEjBx87NRWeEyMjkkggbBLJLRWVWzI6AaxntRgkj o5b4zSJ0St+ozBW/lroTcFASGg22WfFjnj1lCUwzkQ== X-Google-Smtp-Source: AFSGD/WvlT33FnwnjgQokQT7GOZsq+u+I5TpaDqWBOq2G5qmvXoFOxF6SGbcY01wtw2qAGe5ns8l+GQMudtNR5F07iw= X-Received: by 2002:a19:8d01:: with SMTP id p1mr6825592lfd.149.1545051331202; Mon, 17 Dec 2018 04:55:31 -0800 (PST) MIME-Version: 1.0 From: Leif Lindholm Date: Mon, 17 Dec 2018 12:55:19 +0000 Message-ID: To: Sami Mujawar , Thomas Panakamattam Abraham Cc: Meenakshi Aggarwal , Udit Kumar , Ard Biesheuvel , "edk2-devel (edk2-devel@lists.01.org)" , Ming Huang , Heyi Guo , Matteo Carlini , Nariman Poushin X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: SP805 driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2018 12:55:34 -0000 Content-Type: text/plain; charset="UTF-8" Hi Sami, Thomas, (and others on cc) NXP are upstreaming a set containing an implementation of EFI_WATCHDOG_TIMER_ARCH_PROTOCOL using a hardware watchdog as backing. This idea comes from the SP805 driver ArmPlatformPkg/Drivers/SP805WatchdogDxe, which does the same. The problem is that this is a horrible idea. The point of the EFI_WATCHDOG_TIMER_ARCH_PROTOCOL is that it lets you schedule software events when the watchdog timer expires. However, the SP805 driver does not let you do this: EFI_STATUS EFIAPI SP805RegisterHandler ( IN CONST EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction ) { // ERROR: This function is not supported. // The hardware watchdog will reset the board return EFI_INVALID_PARAMETER; } >>From section 12.14 of the PI 1.6 spec: "If no handler has been registered, or the registered handler returns, then the system will be reset by calling the Runtime Service ResetSystem()." Blatantly, any driver that does the above (and initializes hardware that will reset the system without software control) will violate this. Meanwhile, the only two ARM platforms that include this driver are TC2 and FVP. Now, NXP are not at fault for following examples given to them in the reference ARM driver section - but can we please keep further people from making the same mistake? So my question to {Sami|Thomas} is - can we nuke this driver, and if so, can you provide the patches to remove it from edk2 and the resulting ones needed for edk2-platforms? I have no issues with reintroducing a fixed SP805 driver in the future that does not claim to conform to the above protocol. Finally - both the D03 and D05 platform .dsc files, as well as the Hisilicon ArmPlatformLib, contain references to it. (Ming/Heyi - please provide a patch.) / Leif