From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (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 5E593210DBE78 for ; Tue, 14 Aug 2018 08:39:42 -0700 (PDT) Received: by mail-wm0-x241.google.com with SMTP id s12-v6so12763740wmc.0 for ; Tue, 14 Aug 2018 08:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6KCGGSi9volrd7Oz2d0gajs7S+BBlTr1+k6bh8PQS1E=; b=JB5u4plt2Lg2nQaqKE/XnY7VlL8cDZwGTnKrDModQQcpaa/l6vkiQcMopYafr0pVT3 SdjwoEVGEk1hqg4woJbT/mpzzjmyI//qiKhBwez+/dJKVHQxAZgZ/M2xG5cC7XuvA4wm elvagu2Ktt70WbdDyWiJ1ncY7p3rOiQLrWA7I= 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6KCGGSi9volrd7Oz2d0gajs7S+BBlTr1+k6bh8PQS1E=; b=WUcjiAvGQ1uaOAx0glDnuuTx4yuDVwLrlymVbAIXtQkH3LpirFyNpulnbHMm6+A+nf PApVIHfJwj7/8vjY3ZI3qjxXwr6EJcKjnyQva6tZVVrKH9OJX5GjY0h6lwk9n9OS6M+z DumYq6mj1a+MLjz/xaEhj+lYOnJAX8AaMc7emQ8s31Hcqube51S6DWdWF+z5ABO95sF5 5WzVJkTtP5UXHdyr8BUzCOGFOzZBRORUCogg+f+glygcw/osXfRYgvIheGrLSGOQToTn x4nvi5SaV+ayJ2YJtiU9y+RGUyi+dGXUoTdoSzKTHVCs7Ar4TDlMi+70rE+9ARrFJL/p 5+Iw== X-Gm-Message-State: AOUpUlHj3lcaO3kCDDZqk3ycDFHic9Qt960tzd89wg01wbPwlIGDMBnx UK6SmPKWebHucE9nHM5hi4IRTA== X-Google-Smtp-Source: AA+uWPxtoZMVxmVxhfA5+HtuP76KQ9zUZhVos4wUNt45ixjW2hE1wn0UarJT3KphnilvGhN6URAyeA== X-Received: by 2002:a1c:e189:: with SMTP id y131-v6mr10925059wmg.44.1534261181443; Tue, 14 Aug 2018 08:39:41 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id i125-v6sm21071158wmd.23.2018.08.14.08.39.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Aug 2018 08:39:40 -0700 (PDT) Date: Tue, 14 Aug 2018 16:39:38 +0100 From: Leif Lindholm To: Ming 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, Luqi Jiang , Heyi Guo Message-ID: <20180814153938.7hvetyxd2lfn2tro@bivouac.eciton.net> References: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-31-ming.huang@linaro.org> <20180804144714.nz2j7nrx6q3ayyrs@bivouac.eciton.net> <5d23fc72-0b1f-b253-f5c0-85cfc2a3af06@linaro.org> MIME-Version: 1.0 In-Reply-To: <5d23fc72-0b1f-b253-f5c0-85cfc2a3af06@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms v1 30/38] Hisilicon/D06: add apei driver 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: Tue, 14 Aug 2018 15:39:43 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Aug 10, 2018 at 10:46:34AM +0800, Ming wrote: > >> --- /dev/null > >> +++ b/Silicon/Hisilicon/Hi1620/Drivers/Apei/Apei.inf > >> +[sources.common] > >> + Apei.c > > > > Apei.h? > > As Apei.h is included by Apei.c, so I think Apei.h > is no need to add here. Will the build system still generate correct build dependencies if Apei.h is modified? > >> + Bert/bert.c > >> + Bert/bert.h And if so, why are these other .h files explicitly specified? > >> + Einj/einj.c > >> + Einj/einj.h > >> + Erst/erst.c > >> + Erst/erst.h > >> + Hest/hest.c > >> + Hest/hest.h > >> + ErrorSource/Ghes.c > >> + ErrorSource/Ghes.h > >> + OemApeiHi1620.c > >> diff --git a/Silicon/Hisilicon/Hi1620/Drivers/Apei/Einj/einj.h b/Silicon/Hisilicon/Hi1620/Drivers/Apei/Einj/einj.h > >> new file mode 100644 > >> index 0000000000..a5342b600f > >> --- /dev/null > >> +++ b/Silicon/Hisilicon/Hi1620/Drivers/Apei/Einj/einj.h > >> @@ -0,0 +1,154 @@ > >> +/** @file > >> +* > >> +* Copyright (c) 2017 Hisilicon Limited. All rights reserved. > >> +* > >> +* This program and the accompanying materials > >> +* are licensed and made available under the terms and conditions of the BSD License > >> +* which accompanies this distribution. The full text of the license may be found at > >> +* http://opensource.org/licenses/bsd-license.php > >> +* > >> +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > >> +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > >> +* > >> +**/ > >> + > >> +#ifndef _EINJ_H_ > >> +#define _EINJ_H_ > >> + > >> +#include "Apei.h" > >> + > >> +#define EINJ_ACTION_NO 10 > >> +#define EINJ_BEGIN_OPERATION_VALUE 0xFFFF > >> +#define EINJ_END_OPERATION_VALUE 0 > >> +#define EINJ_WRITE_MASK 0xFFFFFFFF > >> +#define EINJ_READ_VALUE 0xFFFF > >> +#define EINJ_READ_MASK 0xFFFFFFFF > >> + > >> +#define EINJ_TRIGGER_ERROR_ACTION_NO 1 > >> + > >> +#define EFI_ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS 0x08 > >> +#define EFI_ACPI_EINJ_GET_EXCUTE_OPERATION_TIMINGS 0x09 > >> + > >> + > >> +extern EFI_ACPI_TABLE_PROTOCOL *mAcpiTableProtocol; > >> +extern EFI_ACPI_SDT_PROTOCOL *mAcpiSdtProtocol; > >> +extern APEI_TRUSTFIRMWARE_STRUCTURE *mApeiTrustfirmwareStruc; > >> + > >> +// > >> +// Error Type Definition > >> +// > >> +#define EINJ_PROCESSOR_CORRECTABLE BIT0 > >> +#define EINJ_PROCESSOR_UNCORRECTABLE_NONFATAL BIT1 > >> +#define EINJ_PROCESSOR_UNCORRECTABLE_FATAL BIT2 > >> +#define EINJ_MEMORY_CORRECTABLE BIT3 > >> +#define EINJ_MEMORY_UNCORRECTABLE_NONFATAL BIT4 > >> +#define EINJ_MEMORY_UNCORRECTABLE_FATAL BIT5 > >> +#define EINJ_PCIE_CORRECTABLE BIT6 > >> +#define EINJ_PCIE_UNCORRECTABLE_NONFATAL BIT7 > >> +#define EINJ_PCIE_UNCORRECTABLE_FATAL BIT8 > >> +#define EINJ_PLATFORM_CORRECTABLE BIT9 > >> +#define EINJ_PLATFORM_UNCORRECTABLE_NONFATAL BIT10 > >> +#define EINJ_PLATFORM_UNCORRECTABLE_FATAL BIT11 > >> +#define EINJ_VENDOR_DEFINED_ERROR_TYPE BIT31 > >> + > >> +// > >> +#define EINJ_PROCESSOR_APIC_VALID BIT0 > >> +#define EINJ_MEMORY_ADDRESS_VALID BIT1 > >> +#define EINJ_PCIE_SBDF_VALID BIT2 > >> + > >> +//CPER > >> +#define EFI_GENERIC_ERROR_PROC_TYPE_ARM 0x02 > >> + > >> +#define EFI_GENERIC_ERROR_PROC_ISA_ARM32 0x03 > >> +#define EFI_GENERIC_ERROR_PROC_ISA_ARM64 0x04 > > > > Surely these should be added to MdePkg/Include/Guid/Cper.h instead? > > Please submit a patch. > > OK, should this macro be add to MdePkg/Include/Guid/Cper.h ? > EFI_GENERIC_ERROR_PROC_TYPE_ARM Yes please - I could have been more clear on that. / Leif