From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0142e2c9bd=gilbert.chen@hpe.com) Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by groups.io with SMTP; Mon, 26 Aug 2019 23:26:38 -0700 Received: from pps.filterd (m0134424.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7R51rZx026905 for ; Tue, 27 Aug 2019 06:26:37 GMT Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0b-002e3701.pphosted.com with ESMTP id 2umhy7naw6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 27 Aug 2019 06:26:37 +0000 Received: from G1W8106.americas.hpqcorp.net (g1w8106.austin.hp.com [16.193.72.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2352.austin.hpe.com (Postfix) with ESMTPS id D34D9C8 for ; Tue, 27 Aug 2019 06:26:09 +0000 (UTC) Received: from G9W8666.americas.hpqcorp.net (16.220.49.25) by G1W8106.americas.hpqcorp.net (16.193.72.61) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 27 Aug 2019 06:26:09 +0000 Received: from G2W6311.americas.hpqcorp.net (16.197.64.53) by G9W8666.americas.hpqcorp.net (16.220.49.25) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 27 Aug 2019 06:26:09 +0000 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (15.241.52.10) by G2W6311.americas.hpqcorp.net (16.197.64.53) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 27 Aug 2019 06:26:09 +0000 Received: from TU4PR8401MB1056.NAMPRD84.PROD.OUTLOOK.COM (10.169.47.148) by TU4PR8401MB0624.NAMPRD84.PROD.OUTLOOK.COM (10.169.44.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Tue, 27 Aug 2019 06:26:07 +0000 Received: from TU4PR8401MB1056.NAMPRD84.PROD.OUTLOOK.COM ([fe80::cc02:a574:b9e3:cf1e]) by TU4PR8401MB1056.NAMPRD84.PROD.OUTLOOK.COM ([fe80::cc02:a574:b9e3:cf1e%8]) with mapi id 15.20.2199.021; Tue, 27 Aug 2019 06:26:07 +0000 From: "Chen, Gilbert" To: "devel@edk2.groups.io" CC: "Chen, Gilbert" Subject: [PATCH 08/15] [platforms/devel-riscv]: U500Pkg/Include: Header files of SiFive U500 platform Thread-Topic: [PATCH 08/15] [platforms/devel-riscv]: U500Pkg/Include: Header files of SiFive U500 platform Thread-Index: AdVcoE6PwO+KYI4DQ7+LLa51OdE9QA== Date: Tue, 27 Aug 2019 06:26:07 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [16.242.247.133] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cb7b2de3-6e2b-4f9b-c700-08d72ab77230 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:TU4PR8401MB0624; x-ms-traffictypediagnostic: TU4PR8401MB0624: x-ms-exchange-purlcount: 1 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1002; x-forefront-prvs: 0142F22657 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6029001)(39860400002)(366004)(136003)(376002)(396003)(346002)(199004)(189003)(86362001)(316002)(6436002)(2351001)(2501003)(7736002)(6306002)(478600001)(55016002)(102836004)(3846002)(9686003)(6116002)(476003)(53936002)(26005)(256004)(76116006)(486006)(14444005)(2906002)(66946007)(64756008)(5640700003)(66476007)(5660300002)(66446008)(66556008)(186003)(71200400001)(71190400001)(966005)(16799955002)(8936002)(66066001)(14454004)(6916009)(19627235002)(53376002)(52536014)(74316002)(8676002)(1730700003)(81166006)(81156014)(25786009)(6506007)(305945005)(15188155005)(99286004)(33656002)(4326008)(7696005);DIR:OUT;SFP:1102;SCL:1;SRVR:TU4PR8401MB0624;H:TU4PR8401MB1056.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 2DXj9qfF5sQU5RBPe2/xxHI3tjjAY/q37un1tEcEYtmtlsWArL531uHaYTuzTXjiN6z4gK7xqYUhFY5OWdgyrNRGFfM+KpwF+NdW2fqQrQjcgSialoGTITJliUXSrRGT00vIkQ/5kUw8aJzvF4ipASTP6p5Tx760OcR/DE5jr+VQbk3QuSjVQ/40G8VCkMfxgF8HxH2YdB5H0S0NDDqsgU36dPpaHbeBjvGvhA5S3v2AS9FQycjv5ey8PqrR6ctfO5+BSB0hmQUhAT4aModpd++9GT3kHY/gg8WM75C4nY5IKmYumMjjQePH2yT6lu5ExoZZJDmpDSJibIJIXk6kBck7Ymx6zRYKjGBZkL3Ztw6phAKeUEdo/zyokNRzchlx3EK5sdsyxMrE6H+UZ0a2V210Bf/WRJkRcubDKuyL3Vg= arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HHL0Qxak29jMfadueLzHhpDh5HjqqSzTlvAiEgYftOgbJpLJuttS/5pD/JWLbOqtFoHmpRjLhHWWrWJ/13itFThzYmKn0bnyHPR2bvXpKX55mkfobzs3JCuLT638ClFaXmRxPfAfcj9xky28XSfbweyz5xmsjEL6EP59xCnFsO++RQdbwCANHZowoPudwlQVNRsLmLt5elHRvEke6eL0bpJKZFvm4aRNX/hHN50jZkQ+BzcVKWSlCjwrcd61lRyj5CKwr9YCV0krqq9QHdXQM6WWtuhAq9qs70Y9LvUH/e/KSM6B6/rYR+ft1wmHKeL6Xj32hRROihh3fw5mUMIq6g== arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ujq9Yzfh0q0da4Gb92HhC9FHlCDH3tlSSEfM7/e66qE=; b=MAT2kNaFd1AGuVn4rvnhQFkB7RSUMTTaaiKUTw+EPTrc2RZtGPokkh4IC3Z4OLyO3q9HnpcnY9kKxQAtYIX7Bya9yDN1WLcxKubnwaKckPU3NCIAL8H4V0tx3ygBZ8F0jRozIx5NDa0QIL4T+OJVMwGolM9pHXZAFXMOLWsj7sRO5asmjePtiuvt+RTGEp7KTNPJ6hDftPH28SKXmmLc4TKjp7+0zEeTt8pt4zKktXSAdiZb77jYdrYcFZDUcvD/TlJaTQ8vdpJvaKaIw4bsC9SamEl5Ni+v6i1mNbpoLLgAwx4mGD4r0bEZvl9Bgh7cRRF+KjI91+/71L4mQuyyBQ== arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none x-ms-exchange-crosstenant-network-message-id: cb7b2de3-6e2b-4f9b-c700-08d72ab77230 x-ms-exchange-crosstenant-originalarrivaltime: 27 Aug 2019 06:26:07.8655 (UTC) x-ms-exchange-crosstenant-fromentityheader: Hosted x-ms-exchange-crosstenant-id: 105b2061-b669-4b31-92ac-24d304d195dc x-ms-exchange-crosstenant-mailboxtype: HOSTED x-ms-exchange-crosstenant-userprincipalname: K3iEO9IWGXB/GYYnDESBvJ8qku85l8Jse2HRQTLEw0qNynOualt7UeZo+/eYBCdaCV1h+ycsw+SsW+CpssO82w== x-ms-exchange-transport-crosstenantheadersstamped: TU4PR8401MB0624 X-OriginatorOrg: hpe.com X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-26_08:2019-08-26,2019-08-26 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 clxscore=1015 mlxscore=0 phishscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1906280000 definitions=main-1908260158 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The initial header file commit for SiFive U5-MC Coreplex and U500 Core Loca= l interrupt definitions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gilbert Chen --- .../SiFive/U500Pkg/Include/SiFiveU5MCCoreplex.h | 57 ++++++++++++++++++= ++++ Platform/RiscV/SiFive/U500Pkg/Include/U500Clint.h | 24 +++++++++ 2 files changed, 81 insertions(+) create mode 100644 Platform/RiscV/SiFive/U500Pkg/Include/SiFiveU5MCCoreple= x.h create mode 100644 Platform/RiscV/SiFive/U500Pkg/Include/U500Clint.h diff --git a/Platform/RiscV/SiFive/U500Pkg/Include/SiFiveU5MCCoreplex.h b/P= latform/RiscV/SiFive/U500Pkg/Include/SiFiveU5MCCoreplex.h new file mode 100644 index 0000000..c0323a5 --- /dev/null +++ b/Platform/RiscV/SiFive/U500Pkg/Include/SiFiveU5MCCoreplex.h @@ -0,0 +1,57 @@ +/** @file + SiFive U54 Coreplex library definitions. + + Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All right= s reserved.
+ + This program and the accompanying materials are licensed and made availa= ble under + the terms and conditions of the BSD License that accompanies this distri= bution. + 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 IMP= LIED. + +**/ +#ifndef __SIFIVE_U5MC_COREPLEX_H__ +#define __SIFIVE_U5MC_COREPLEX_H__ + +#include + +#include +#include + +#define SIFIVE_U5MC_COREPLEX_MC_HART_ID 0 + +/** + Build up U5MC coreplex processor core-specific information. + + @param UniqueId U5MC unique ID. + + @return EFI_STATUS + +**/ +EFI_STATUS +EFIAPI +CreateU5MCCoreplexProcessorSpecificDataHob ( + IN UINTN UniqueId + ); + +/** + Function to build processor related SMBIOS information. RISC-V SMBIOS DX= E driver collect + this information and build SMBIOS Type4 and Type7 record. + + @param ProcessorUid Unique ID of pysical processor which owns th= is core. + @param SmbiosDataHobPtr Pointer to receive RISC_V_PROCESSOR_SMBIOS_D= ATA_HOB. The pointers + maintained in this structure is only valid b= efore memory is discovered. + Access to those pointers after memory is ins= talled will cause unexpected issues. + + @return EFI_SUCCESS The PEIM initialized successfully. + +**/ +EFI_STATUS +EFIAPI +CreateU5MCProcessorSmbiosDataHob ( + IN UINTN ProcessorUid, + OUT RISC_V_PROCESSOR_SMBIOS_DATA_HOB **SmbiosDataHobPtr + ); +#endif diff --git a/Platform/RiscV/SiFive/U500Pkg/Include/U500Clint.h b/Platform/R= iscV/SiFive/U500Pkg/Include/U500Clint.h new file mode 100644 index 0000000..426bf43 --- /dev/null +++ b/Platform/RiscV/SiFive/U500Pkg/Include/U500Clint.h @@ -0,0 +1,24 @@ +/** @file + RISC-V Timer Architectural definition for U500 platform. + + Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All right= s reserved.
+ + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D 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 IMP= LIED. +**/ +#ifndef _U500_H_ +#define _U500_H_ + +#define CLINT_REG_MTIME 0x0200BFF8 +#define CLINT_REG_MTIMECMP0 0x02004000 +#define CLINT_REG_MTIMECMP1 0x02004008 +#define CLINT_REG_MTIMECMP2 0x02004010 +#define CLINT_REG_MTIMECMP3 0x02004018 +#define CLINT_REG_MTIMECMP4 0x02004020 + +#endif \ No newline at end of file -- 2.7.4