From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::442; helo=mail-pf1-x442.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (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 29B0821B02822 for ; Wed, 15 Aug 2018 01:57:38 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id a26-v6so272291pfo.4 for ; Wed, 15 Aug 2018 01:57:38 -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=rFZKZeYspAVyqzpEyNx7fB00aaYMzP28sP2vzgr9poA=; b=OwXakGYBjNmN6IzhJXjJWIHM60ibmxekpSdGbQ6ncvkfcST/0oyzhpugSggqjVe8UM vSBw4f28ZU0zvQngAc01lJru7ea3OdVfGF9Jl/OTutVVFdOnFFk0rzh8z2np8sqAuV5c 0AQXZMofmGg+V/RsyNKx3DTmkF0gX95Fu6Sxk= 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=rFZKZeYspAVyqzpEyNx7fB00aaYMzP28sP2vzgr9poA=; b=XNSgSceJHkaoWemj7HjGX70nlQuGKv76vFUT9tyo/Y11538t2n5JNUEVnTAQBiQhsr lV9U5FrOhuLoS3VEpyjMCIPNHA0uKsZ0fGRVyrndzFXhlEBOdNbTLHjPnu/V6SwAPCJA w1/Swhipk+He3wsrYk6DPHyInNI7451tLaqByvjRjFFqP/XvbAmKJ/kjNsbZ2L2u9lOe jo0ZGCSsnCGxovDYq8+EqlWsFGhrL8Gbc8RVdsSTUBnoTTbzKwqZjmNRENDN/ViGCCHw i5lMasj/3dUvC74Gs8xWTPFSfvQLuk0tAHC5cGjEdYlkdr0KGqtteJVzLoJmSFHq/GWG SolA== X-Gm-Message-State: AOUpUlFGe6vEpM+QrG/WPmFuy90eBnS0CR6HpkhP0q1CArEJp+MIa68X C+FEupzd5iGtjMeYYkj79PcG4A== X-Google-Smtp-Source: AA+uWPxFJ+r0OAMAO+ajeulg9jb3sPrayghwNfvyUVX+x1dit1iq3LuSG/y69//5wdKzoET195CWbA== X-Received: by 2002:a63:e001:: with SMTP id e1-v6mr21693530pgh.380.1534323458403; Wed, 15 Aug 2018 01:57:38 -0700 (PDT) Received: from [10.174.0.166] ([64.64.108.240]) by smtp.gmail.com with ESMTPSA id s73-v6sm33699105pfi.154.2018.08.15.01.57.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Aug 2018 01:57:37 -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, Luqi Jiang , Heyi Guo 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> <20180814153938.7hvetyxd2lfn2tro@bivouac.eciton.net> From: Ming Message-ID: <7b1f519d-1669-8af5-3d8a-24e41d09e53b@linaro.org> Date: Wed, 15 Aug 2018 16:57:20 +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: <20180814153938.7hvetyxd2lfn2tro@bivouac.eciton.net> 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: Wed, 15 Aug 2018 08:57:39 -0000 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit ÔÚ 8/14/2018 11:39 PM, Leif Lindholm дµÀ: > 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? Yes > >>>> + Bert/bert.c >>>> + Bert/bert.h > > And if so, why are these other .h files explicitly specified? I will remove these .h files in v3. > >>>> + 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 >