From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=104.47.0.54; helo=eur01-he1-obe.outbound.protection.outlook.com; envelope-from=sami.mujawar@arm.com; receiver=edk2-devel@lists.01.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0054.outbound.protection.outlook.com [104.47.0.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E5C412116DA05 for ; Fri, 12 Oct 2018 08:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YDGSNUe8oZ8LYqWpnPfxVwBPkJEqudJk7ShglpRbKy8=; b=kj2rrKAmGh3NF/aO/dkOQI4+iTeVdkEbYj412zPqlmg7TrrQ8rUOREfH9Knylr58TaMOoQ7qMHQw9fcy9iXfJGjJieU6UVzPfn+irsVlmtUDjD9kHeyIphFVfrPml4hR7qV1qUSTQiWZiKOv05zan9rYqYnCg4q14fj3VsEq4dM= Received: from DB6PR0802MB2375.eurprd08.prod.outlook.com (10.172.228.142) by DB6PR0802MB2407.eurprd08.prod.outlook.com (10.172.250.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Fri, 12 Oct 2018 15:06:13 +0000 Received: from DB6PR0802MB2375.eurprd08.prod.outlook.com ([fe80::25d5:191f:9459:7aee]) by DB6PR0802MB2375.eurprd08.prod.outlook.com ([fe80::25d5:191f:9459:7aee%3]) with mapi id 15.20.1228.020; Fri, 12 Oct 2018 15:06:13 +0000 From: Sami Mujawar To: Ard Biesheuvel CC: "edk2-devel@lists.01.org" , Leif Lindholm , Ruiyu Ni , Evan Lloyd , Matteo Carlini , Stephanie Hughes-Fitt , nd Thread-Topic: [PATCH v1 1/6] PcAtChipsetPkg: Add MMIO Support to SerialIo Lib Thread-Index: AQHUYjrP6c5s9v41I0ySojtTqS1FVqUbsUPw Date: Fri, 12 Oct 2018 15:06:13 +0000 Message-ID: References: <20181012144009.48732-1-sami.mujawar@arm.com> <20181012144009.48732-2-sami.mujawar@arm.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Sami.Mujawar@arm.com; x-originating-ip: [217.140.106.55] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6PR0802MB2407; 6:SOQs5naoGX35g+I95OOOE2sFWjUxnqzx86PcfhB9loxVXqnJMnYnDwWfhjwy6s7zXRDlGOrdBtOhO6veZ5X0Y3dMOt14D0t1W+U49TOCN+fJfx+UY/TWa2aDhn9f4slI1Rju3blDZl5AhWT1RiWyRNbUeAiQqYDQlOQvF8OySgIruVaqLiUw454JXY6CK8PuLyQze0ykXo7KMz9SnRJooO8FxQgRVYwTIb1qQsDKfnFywlNmNBnAFDxYbBKbKky/79tfr+4SF6RHAGGhmsF1ypEW6gBuDx2R7k98N4XbozRTIvWJ63ynlT9crQmv6Hr4ICB1oXVvnYQCEOmiba4rA14OFxCI56mRDTPN366GS7H2IYgsustuzLIrg6QuJGyCFgRpeWthvMxgj3lFB4kXRTFwx2GBqODQlUrfQ+v7pHJYmc8HM6mFv7vQVGqjCB6++QSMWHpZ223WcuO9avy8oA==; 5:prHGVl9tnvIjLKI2c2sKAE5E6Bd457bARLMX2tQjdGvuTsRGLSizWRV2cnm7sv4N1D0dWJk6alZXtMEWGtm+g3o2KlgXm0wCnz93m6iSADpuC1I+z9igegvAt6xn6UsXUSawo4L+rVCjZubNSMYhHpS1kPh4Dc6bElIVk3AqGtw=; 7:DJ2mkXROnZEWWS4ZrFI8Cv15JRXfFnzMrrzD0KIKD6QOH84LKkYrFN4yChxFV6/kjJm0uilPYquykZzevsydUU+yPvpLqoQ495RpOAYruqqRNH6CkxNHuWaPTNS+w7VyMEh2OK+ZG9JhAwaVO0LNsIOHkZfXM/59vfyHrqsUmx65/tlIsyLIrUvcmRgqSZMJyj+oGjhLaPaxhtmmYGMejiM9l1oE5/zaT9PZHE/ufCtwTeIGEUxsmItXRZbGGh0b x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-ms-office365-filtering-correlation-id: e13c38aa-6cb6-430f-7ddb-08d63054405e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB6PR0802MB2407; x-ms-traffictypediagnostic: DB6PR0802MB2407: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(162533806227266)(166708455590820)(105169848403564)(180628864354917)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(201708071742011)(7699051); SRVR:DB6PR0802MB2407; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0802MB2407; x-forefront-prvs: 0823A5777B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6029001)(346002)(376002)(39860400002)(396003)(366004)(136003)(189003)(199004)(13464003)(316002)(7736002)(71190400001)(53546011)(5250100002)(6506007)(305945005)(6306002)(6916009)(14454004)(478600001)(55016002)(86362001)(74316002)(99286004)(476003)(8676002)(81166006)(72206003)(81156014)(71200400001)(25786009)(68736007)(8936002)(2906002)(7696005)(5660300001)(446003)(11346002)(76176011)(256004)(486006)(97736004)(14444005)(3846002)(6116002)(54906003)(53936002)(9686003)(33656002)(2900100001)(105586002)(186003)(66066001)(6436002)(229853002)(4326008)(6246003)(106356001)(26005)(102836004)(966005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0802MB2407; H:DB6PR0802MB2375.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: d4VQdMPizHuNWZQcklYbzpkOf7tVJhofbPuFSY2Lo4Z5RyIeU1Ki2SMu9QM7Jk22P0wws4daQSV5Jk3hc86UV7f1hBNOzrOdCGCG6cB04C3JwTvV69zycnFw+o4SicFVOWkOgne2RUqusE48tzGDNJI8eZAbIp3sa1/ni1j26Y/0qRlVHnbUbqXxuutOJkuuv5dWdi4PBnWFsSyYMPnkJUZQCGFKhmlQaBucYVEsU9DCz5Et3EDxNgE6pHCjRGw/BfocpU6I48Ra7TlWlINMubZhfJFlvldtbNqB2e2lifN9XPmkZF0bkt1DXHjXET826n/KxLkEAEfZ+pRvMisLGaVgx/UXLvaoOgf063MbJTw= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: e13c38aa-6cb6-430f-7ddb-08d63054405e X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2018 15:06:13.3353 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2407 Subject: Re: [PATCH v1 1/6] PcAtChipsetPkg: Add MMIO Support to SerialIo Lib 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: Fri, 12 Oct 2018 15:06:18 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgQXJkLA0KDQpJIGJlbGlldmUgeW91IGFyZSByZWZlcnJpbmcgdG8gTWRlTW9kdWxlUGtnXExp YnJhcnlcQmFzZVNlcmlhbFBvcnRMaWIxNjU1MFxCYXNlU2VyaWFsUG9ydExpYjE2NTUwLmluZg0K SSBoYXZlIHRyaWVkIHVzaW5nIHRoaXMgU2VyaWFsIFBvcnQgTGlicmFyeS4gSG93ZXZlciwgdGhp cyBoYXMgYSBkZXBlbmRlbmN5IG9uIFBjaUxpYiB3aGljaCBpcyBkaWZmaWN1bHQgdG8gcmVzb2x2 ZSBhcyB3ZSB1c2UgdGhlIFNlcmlhbCBwb3J0IGVhcmx5IGluIHRoZSBib290Lg0KUGxlYXNlIGRv IGxldCBtZSBrbm93IGlmIHlvdSBrbm93IGEgd29ya2Fyb3VuZCB0byBzb2x2ZSB0aGlzIGlzc3Vl Lg0KDQpSZWdhcmRzLA0KDQpTYW1pIE11amF3YXINCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0t LS0NCkZyb206IEFyZCBCaWVzaGV1dmVsIDxhcmQuYmllc2hldXZlbEBsaW5hcm8ub3JnPiANClNl bnQ6IDEyIE9jdG9iZXIgMjAxOCAwMzo1MCBQTQ0KVG86IFNhbWkgTXVqYXdhciA8U2FtaS5NdWph d2FyQGFybS5jb20+DQpDYzogZWRrMi1kZXZlbEBsaXN0cy4wMS5vcmc7IExlaWYgTGluZGhvbG0g PGxlaWYubGluZGhvbG1AbGluYXJvLm9yZz47IFJ1aXl1IE5pIDxydWl5dS5uaUBpbnRlbC5jb20+ OyBFdmFuIExsb3lkIDxFdmFuLkxsb3lkQGFybS5jb20+OyBNYXR0ZW8gQ2FybGluaSA8TWF0dGVv LkNhcmxpbmlAYXJtLmNvbT47IFN0ZXBoYW5pZSBIdWdoZXMtRml0dCA8U3RlcGhhbmllLkh1Z2hl cy1GaXR0QGFybS5jb20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