From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.101.70; helo=foss.arm.com; envelope-from=thomas.abraham@arm.com; receiver=edk2-devel@lists.01.org Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id C63B52119EF26 for ; Mon, 17 Dec 2018 23:13:58 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C330715AB for ; Mon, 17 Dec 2018 23:13:57 -0800 (PST) Received: from mail-io1-f48.google.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A81823F6A8 for ; Mon, 17 Dec 2018 23:13:57 -0800 (PST) Received: by mail-io1-f48.google.com with SMTP id m19so12003957ioh.3 for ; Mon, 17 Dec 2018 23:13:57 -0800 (PST) X-Gm-Message-State: AA+aEWbbBOYoAstDQJIWVptY8rdzLpD6C6EltuCes2X9wRjJ3x4rib28 4jPOAhA4JhErQiBgjc7QSgmfZJdRZ3QmGOsShtM= X-Google-Smtp-Source: AFSGD/UmbdDIIkj31w38AY+UlK1cnlLyFq4KLPKmLVtrOzhaQe3vAdc11opd9PCcsba9H0RPiHud1btsnI4wwQGXcCc= X-Received: by 2002:a6b:5f14:: with SMTP id t20mr14541525iob.268.1545117236781; Mon, 17 Dec 2018 23:13:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Thomas Abraham Date: Tue, 18 Dec 2018 12:43:45 +0530 X-Gmail-Original-Message-ID: Message-ID: To: Leif Lindholm Cc: Sami Mujawar , edk2-devel@lists.01.org Subject: Re: 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: Tue, 18 Dec 2018 07:13:58 -0000 Content-Type: text/plain; charset="UTF-8" Hi Leif, On Mon, Dec 17, 2018 at 6:25 PM Leif Lindholm wrote: > > 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? Would it be okay to fix this driver by calling 'ResetSystem' instead of removing this driver? Thanks, Thomas. > > 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 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel