From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c01::242; helo=mail-pl0-x242.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pl0-x242.google.com (mail-pl0-x242.google.com [IPv6:2607:f8b0:400e:c01::242]) (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 8C94F210DF771 for ; Wed, 8 Aug 2018 02:49:55 -0700 (PDT) Received: by mail-pl0-x242.google.com with SMTP id ba4-v6so792053plb.11 for ; Wed, 08 Aug 2018 02:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=OFgvVuKjVG4CFa0k2Z3EqadBFn0o50ckoIm5NKckpgw=; b=OdKsQ4J/Y1TWPfWsOkzNoHcYSSFe952Mxl8dafbIuFtR7qVPHTve8bp5HPgoSnSp5w T1Z4wbH2jYLAliJOh4Qtcxv+sLykKhvpwpEHoEZERotGK4oK8qo/UpRjddkgFRWhrrPB V6KZwuqJ5Okl7wxzRrJMcZ73YqiPw/u2bd8MI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=OFgvVuKjVG4CFa0k2Z3EqadBFn0o50ckoIm5NKckpgw=; b=Ihr5gvycmw/ZcEvV51rves0PlM3+Dv1EclE+YIxkna7w49Ecfmki1hQzy5ruOwuznd 0QjgXwb1KBo9VgrgXabOvJqsSE7EqDSbsVIHIDsEG9x8DvcBw5Sm1h9CIbF9iZJI9msh aPG6a7dJlqtKJbMKBmKKy7oXSlOpEybDfAThZCMQdYFGvSA0dIgvxOpjvVu5/qS0W7mr tr002miUOaL1yzeRneJMqR9uKU1QXMktLDrqy2t7C+SYTQqs61zaY0Bh2O1En9tTJjRQ AQty6DEWzjPhX8fIWeUaWJty5p/ItyPWQZqHD1RXVvwsoep6ZHrMEpzL3JP97UK5N1KK Aybw== X-Gm-Message-State: AOUpUlH/8Y6+4QfPWiaD4tab3NNfWJqdSgKI/QQxolorpG+x/g985jxR iu+zcsQRdlGF4opE4z+rTyEIFg== X-Google-Smtp-Source: AA+uWPzesqVc/QAj08cM1ykjp7yRrxU6J5g7RKyVWfUclbR4ZC7/sctgCgozGjwKW7OIBuUOLVE4Vg== X-Received: by 2002:a17:902:4381:: with SMTP id j1-v6mr1923781pld.104.1533721794962; Wed, 08 Aug 2018 02:49:54 -0700 (PDT) Received: from [10.199.0.182] ([64.64.108.224]) by smtp.gmail.com with ESMTPSA id w2-v6sm3990875pge.44.2018.08.08.02.49.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 02:49:54 -0700 (PDT) To: Leif Lindholm Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org, Sun Yuanchen , Wang Yue , Heyi Guo References: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-13-ming.huang@linaro.org> <20180803102836.reor73uzgb3rnina@bivouac.eciton.net> From: Ming Message-ID: <7b5b0d52-3d11-7d23-2ce2-ee46c9c7987d@linaro.org> Date: Wed, 8 Aug 2018 17:49:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180803102836.reor73uzgb3rnina@bivouac.eciton.net> Subject: Re: [PATCH edk2-platforms v1 12/38] Silicon/Hisilicon/D06: Stop watchdog X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2018 09:49:55 -0000 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit ÔÚ 8/3/2018 6:28 PM, Leif Lindholm дµÀ: > On Tue, Jul 24, 2018 at 03:08:56PM +0800, Ming Huang wrote: >> From: Sun Yuanchen >> >> according as watchdog design on D06, watchdog should be >> stoped befor boot a option. > > stopped before > >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Wang Yue >> Signed-off-by: Ming Huang >> Signed-off-by: Heyi Guo >> --- >> Silicon/Hisilicon/Include/Library/IpmiCmdLib.h | 16 ++++++++++++++ >> Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c | 22 ++++++++++++++++++++ >> Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 2 ++ >> 3 files changed, 40 insertions(+) >> >> diff --git a/Silicon/Hisilicon/Include/Library/IpmiCmdLib.h b/Silicon/Hisilicon/Include/Library/IpmiCmdLib.h >> index 8868b76135..b956ee6d07 100644 >> --- a/Silicon/Hisilicon/Include/Library/IpmiCmdLib.h >> +++ b/Silicon/Hisilicon/Include/Library/IpmiCmdLib.h >> @@ -19,6 +19,17 @@ >> #define BOOT_OPTION_BOOT_FLAG_VALID 1 >> #define BOOT_OPTION_BOOT_FLAG_INVALID 0 >> >> +typedef enum { >> + EfiReserved, >> + EfiBiosFrb2, >> + EfiBiosPost, >> + EfiOsLoad, >> + EfiSmsOs, >> + EfiOem, >> + EfiFrbReserved1, >> + EfiFrbReserved2 >> +} EFI_WDT_USER_TYPE; >> + >> typedef enum { >> NoOverride = 0x0, >> ForcePxe, >> @@ -91,4 +102,9 @@ IpmiCmdGetSysBootOptions ( >> IN IPMI_GET_BOOT_OPTION *BootOption >> ); >> >> +EFI_STATUS >> +IpmiCmdStopWatchdogTimer ( >> + IN EFI_WDT_USER_TYPE UserType >> + ); >> + >> #endif >> diff --git a/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c b/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c >> index f7536bfea3..9636f29dce 100644 >> --- a/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c >> +++ b/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c >> @@ -19,8 +19,10 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> +#include > > Please put this line after Library/DevicePathLib.h. > >> #include >> #include >> #include >> @@ -615,6 +617,8 @@ PlatformBootManagerAfterConsole ( >> { >> EFI_STATUS Status; >> ESRT_MANAGEMENT_PROTOCOL *EsrtManagement = NULL; >> + OEM_CONFIG_DATA SetupData; >> + UINTN DataSize = sizeof (OEM_CONFIG_DATA); >> >> // >> // Show the splash screen. >> @@ -651,6 +655,24 @@ PlatformBootManagerAfterConsole ( >> ); >> >> HandleBmcBootType (); >> + >> + //Disable POST Watch Dog before enter setup > > Before entering setup (as stated here) or before attempting boot (as > stated in commit message)? > Before attempting boot >> + Status = gRT->GetVariable ( >> + OEM_CONFIG_NAME, >> + &gOemConfigGuid, >> + NULL, >> + &DataSize, >> + &SetupData >> + ); >> + >> + if (!EFI_ERROR (Status)) { >> + if (SetupData.BmcWdtEnable) { >> + Status = IpmiCmdStopWatchdogTimer (EfiBiosPost); >> + if (EFI_ERROR (Status)) { >> + DEBUG ((DEBUG_ERROR, "%a:%r\n", __FUNCTION__, Status)); >> + } >> + } >> + } >> } >> >> /** >> diff --git a/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf >> index a093f13fb0..21afb53fc5 100644 >> --- a/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf >> +++ b/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf >> @@ -47,6 +47,7 @@ >> DevicePathLib >> DxeServicesLib >> MemoryAllocationLib >> + IpmiCmdLib > > Please move up one line. > > / > Leif > All comments will be apply. Thanks. Ming >> PcdLib >> PrintLib >> TimerLib >> @@ -69,6 +70,7 @@ >> gEfiEndOfDxeEventGroupGuid >> gEfiTtyTermGuid >> gHisiOemVariableGuid >> + gOemConfigGuid >> >> [Protocols] >> gEfiGenericMemTestProtocolGuid >> -- >> 2.17.0 >>