From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.41]) by mx.groups.io with SMTP id smtpd.web12.204.1587653106463132515 for ; Thu, 23 Apr 2020 07:45:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nxp1.onmicrosoft.com header.s=selector2-nxp1-onmicrosoft-com header.b=Wkrmc5ex; spf=pass (domain: oss.nxp.com, ip: 40.107.22.41, mailfrom: pankaj.bansal@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jUBujWMUl2zscpD1gFGtErYIyf03SD+fnTpLotKqep3rRykVSxvwjzeiE/gtq0Z4YkGdho6FlAzcEjQrMXzaFUxJfN5Ju+ufjOqF7lJcXx3KLJxBYqy1iMsDpDEhjP41elKaWd+wPurDxIbLq7TrRWFQV6RVAYj7sLndAu7vZV7ImvnmzxiD9xEs17mSwo9JEIOsU+PCWLHw4hmUd3JbTxWLbJRdbkj4L8sinsIjwXWZprLAajCKBgStKR2g/u6ERegO7LSWpw/Dut98rQQrotKwapU5NOVsS/tetFEI3r0HQAbrQmHcgsnkqvA9kPEFci8OS2Re0f4N9XuvRX6FcQ== 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=Ee6UxdKHo0YB1yHyiu9ikRoAsMXvXuazobH5vVyjpCw=; b=QJSN6zz6uMS7ok9RGWNQzNHKOsAOloOQqFHEx3A5MZ3Ii9pKuz+Fkv6qNWyNhgPI+sdMXxmccwB0eaNz8RYgj8JNM9FXgMVkDwFS4T0qOprL5NWe24UVaGI1PSUcVJt6+/Pm9yIWtCsUAqNy36vt4c5V0pL7hh0tiJnui3vn8N0ZBtInFgVTmfPqSWbuWJ39fg6cWIrBGNkIXRuff6+n+sHLvA7/Xiu/SKW3JlH2lUPsSxqpO54zKqoMEulZlevwlI74DFRWLiawC+aaXmeppE412+5moh/Yf6Fx+ssD2h/0F1Wevzgh9iZfDq5aaR1wheU0C07zJeg6Ou2eDEDmpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ee6UxdKHo0YB1yHyiu9ikRoAsMXvXuazobH5vVyjpCw=; b=Wkrmc5ex6SiaNm8/r2+3Xp7RIbLi/U5Xha2EDigbx8E9GEB2T4Rxw2NCIPRLDhI3Vt5DdLUi0v576VxuGixcCxR7Yyw+h547PkrbZXlacvjvU/mUlnBh4sUcCY+Eh2gEYJ6HNkZwRJJxvNbGUiqfH6ONd/GwgepxujWiLCiLs4Q= Received: from VI1PR04MB5135.eurprd04.prod.outlook.com (2603:10a6:803:62::11) by VI1PR04MB5086.eurprd04.prod.outlook.com (2603:10a6:803:62::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.26; Thu, 23 Apr 2020 14:45:03 +0000 Received: from VI1PR04MB5135.eurprd04.prod.outlook.com ([fe80::e51b:b40c:9a6d:fbf]) by VI1PR04MB5135.eurprd04.prod.outlook.com ([fe80::e51b:b40c:9a6d:fbf%5]) with mapi id 15.20.2921.030; Thu, 23 Apr 2020 14:45:03 +0000 From: "Pankaj Bansal" To: Leif Lindholm CC: Meenakshi Aggarwal , Michael D Kinney , "devel@edk2.groups.io" , Varun Sethi , Samer El-Haj-Mahmoud , Jon Nettleton , Ard Biesheuvel Subject: Re: [PATCH edk2-platforms v3 16/24] Silicon/NXP: Add Chassis2 Package Thread-Topic: [PATCH edk2-platforms v3 16/24] Silicon/NXP: Add Chassis2 Package Thread-Index: AQHWElZluN07dp8m8E+u4dCBzq4gzKiGjtUAgAAE4nCAABQ7gIAAAEbwgAACGoCAABpAoIAACu8AgAAFDNA= Date: Thu, 23 Apr 2020 14:45:03 +0000 Message-ID: References: <20200415121342.9246-1-pankaj.bansal@oss.nxp.com> <20200415121342.9246-17-pankaj.bansal@oss.nxp.com> <20200423102714.GW14075@vanye> <20200423115707.GB14075@vanye> <20200423120537.GC14075@vanye> <20200423141842.GF14075@vanye> In-Reply-To: <20200423141842.GF14075@vanye> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=pankaj.bansal@oss.nxp.com; x-originating-ip: [49.36.135.81] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 823726da-b29e-45ad-0527-08d7e794e883 x-ms-traffictypediagnostic: VI1PR04MB5086:|VI1PR04MB5086: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 03827AF76E x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5135.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10009020)(4636009)(376002)(396003)(366004)(39860400002)(346002)(136003)(86362001)(55016002)(52536014)(66946007)(8676002)(26005)(5660300002)(6916009)(9686003)(6506007)(186003)(54906003)(2906002)(478600001)(316002)(7696005)(76116006)(4326008)(66556008)(64756008)(66476007)(19627235002)(8936002)(71200400001)(66446008)(33656002)(81156014)(966005);DIR:OUT;SFP:1101; received-spf: None (protection.outlook.com: oss.nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: J1F4I9ukVKAJ7g++G7lppgEa0/FqWb9JcqcqmwTqh2mTq8E86yKKuBvfgpSPe6LYR2RxwgLhIixhpYpzhcOGzYk83EKjf6xZyd3+3KCCKleP3OTWAI4A8nO6n8Vp1Ect9RJ8P1QDcNd6j5O1T88bKlaHPlyBbY67d7S4sbhJ6Ty5+/ZkxrO6OAwPU5zO+qfzE5zNYzc2c5qZ3qE6+pPrc56aPNKkQdIT/cSm0zNUeoX/6QSmq74ZZ+Ka+2kB6WyXoYtDKN3/l2ZA3AWJkGFWCKnMxciMHO0gDIKVaCx0FAPsAU12zyWDYwY4vTispPqWLeXJ4hnVjZq5Ad627oW2IjRZTIQAytsw9sdCrA2E2boOboGLRGEGwV+2E+Wq/ENkRQd+arAK993xA5jn9kEswZVFJkUjpBrC3N3HazhAI1gRb/eXTgvKFreYepn5g0icpPcvj7S5mTwAgIDetdM76vGRd+wbbD4GWpQidfshDuJVqbYknOOm8QYMKf6759RNRUagtupBTWr00jjDVHSHVA== x-ms-exchange-antispam-messagedata: Ax+gv0I/BcuO41cT19Nyoj7Dt2onFieWvI3GeSrm2VT74J38B9YT+sUpmQjENmDSEMfD5R55dLwCVI6GXZEBARq+CxihMWwAbGZ4MeVTvSWBoRtffps6imn/QyZeEyvvwIKXfjCYixc2IVJLdngAAA== MIME-Version: 1.0 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 823726da-b29e-45ad-0527-08d7e794e883 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Apr 2020 14:45:03.7981 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ab3FkYJXZIB3AssRUY0XSxM8gH9sVBV08OcYfC090t0+cQSqZ/S8zFqbSV0s7HJ6ixv2J+tyqzCSNPfcMnYgFpfsdIgjtdqk9SSrNbP2LocYL/UI0Z73y7aPXMir2ikk X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5086 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > > > > You mean put ChassisLibConstructor() call in SerialPortInitialize (= ) ? > > > > > > Or before the call to SerialPortInitialize in ChassisInit. > > > > But SerialPortInitialize would be called from each module. >=20 > Why would multiple modules need to initialize the serial port? That's how the DebugLib has been designed. DebugLib is used by all modules to print info on console. BaseDebugLibSerialPortConstructor calls SerialPortInitialize. So SerialPortInitialize is called by all the modules. Which is the reason when I forked the BaseSerialPortLib16550, I removed SerialPortInitalize functionality. https://edk2.groups.io/g/devel/message/54011 >=20 > > Each module that has SerialPort and ChassiLib linked to it would have a > > local copy of mDcfgOps, which needs to be initialized. >=20 > On the surface it makes more sense for the function that initializes > mmio accessors for chassis to be in the chassis initialization > function. >=20 > In the current tree I can only see one user of SerialPortLib and one > of ChassisLib - but you are suggesting there will be several per > platform? If so, A better splution may ne to consider wrapping > DcfgRead32/DcfgWrite32 in a protocol instead of depending on the > ChassisLib. The protocol would not be available in SEC and PEI phase. >=20 > / > Leif