From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web11.1188.1573087771547870847 for ; Wed, 06 Nov 2019 16:49:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=mRMyMSVe; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: michael.a.kubacki@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 16:49:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,276,1569308400"; d="scan'208";a="212898346" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by fmsmga001.fm.intel.com with ESMTP; 06 Nov 2019 16:49:30 -0800 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 16:49:30 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.54) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 16:49:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yptf1FjCyxQrHjEKTRdIWncZnRkSipRyur+z+Rl3ytj7xnDWw2rSprs0KXdrUnKZuilbg4Y388FrNX8NG5g0a8sjt9Gtvj+RI1SdJwcsnmtZpQXeVM2yX1Ttss5jWpqNmwVifgvGdlsrsFII8yvkMLZoKOQtcOvwo6Ny0GSbgD5CD/JyxYKVHaIXByOPn/o8ecGU3r+10FyTCH3svyiX1So4GSF2E1dv8vrHBh0sdeQqq0if8NbR/2jQXrFO4fquYDQNPZwojQuSvBSr3UoB7B/8wGGhPV9qHQ/nHcoDbdXFXMJ14WwoP98MVtz6Cf8NQshqM79wAjYGWAsVPf1J2A== 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=oAumf56cByFG2DMo2Rm/TxLAYf5qzt90XaVzv4G4fkM=; b=iU8Y5Mq0S9TevkRBQ9d8CetsUlAwIPDPN5t5OyyWYkQo11RexHndqSfcUEsd1T7bu63P4WOQIHdlZseBQUzapbdzNCftezNGUs9pn+EcrMh3lNvsi+fLcEfqpsQiURyu+dm1nvB8DKnBr34vRrrxuBRg+kSjFccuw/fDngpfwyGjXh9NBKngHQCWRDT/V5yVNzVP13/SPzIwfhstYcxUsrKL5QpdUli87RU6wuO9j7rpCEtCRIor+uH9MeCgX2dCu5aEwIYtXoFvfKUrLzk12BAr5bs5Q5at9vIBDvM+qC0QXS0x7Ds7FVbjwqz1ScKuizvjPEUpf05tyzdggPaqWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oAumf56cByFG2DMo2Rm/TxLAYf5qzt90XaVzv4G4fkM=; b=mRMyMSVe3WeC2lZ84c+OiJE/WSefY6yFqcKqIY8/yEDFlZ5IPHaS2EEuLfwRF0cPRPFshlEqwcsLNyQRdFJz8LNA4Ep+ifdDTTdIC1cnKoCVBko+NRADzo/pgfsL5vz127rLOLR6Fka8doL7zqgTLhhReim9ODmujmHzELcIKkA= Received: from BY5PR11MB4484.namprd11.prod.outlook.com (52.132.254.155) by BY5PR11MB3976.namprd11.prod.outlook.com (10.255.160.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2408.24; Thu, 7 Nov 2019 00:49:27 +0000 Received: from BY5PR11MB4484.namprd11.prod.outlook.com ([fe80::c1ef:6e0b:90c8:55e2]) by BY5PR11MB4484.namprd11.prod.outlook.com ([fe80::c1ef:6e0b:90c8:55e2%7]) with mapi id 15.20.2430.020; Thu, 7 Nov 2019 00:49:27 +0000 From: "Kubacki, Michael A" To: "Agyeman, Prince" , "devel@edk2.groups.io" CC: "Chiu, Chasel" , "Desimone, Nathaniel L" Subject: Re: [edk2-platforms] [Patch v2 2/9] SimicsOpenBoardPkg: Remove Super I/O DXE driver Thread-Topic: [edk2-platforms] [Patch v2 2/9] SimicsOpenBoardPkg: Remove Super I/O DXE driver Thread-Index: AQHVlEE5R2yDthW6OEmes+Dr94Fez6d+21EQ Date: Thu, 7 Nov 2019 00:49:26 +0000 Message-ID: References: <20191106012603.4724-1-prince.agyeman@intel.com> <20191106012603.4724-3-prince.agyeman@intel.com> In-Reply-To: <20191106012603.4724-3-prince.agyeman@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDUwN2ExYzgtZjFhYy00OGU4LWFjNDktZjMzNDM3OTRlMjM3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibUIraVwvdloxS0NnbG9VWUdWa29QdUdFUnozelpXdnJiVHRRRFNxekZ1d3lTMlNKaWpOQ2FlOGdqSGt1czB6UloifQ== dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=michael.a.kubacki@intel.com; x-originating-ip: [134.134.136.217] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ee9b3cce-944d-44fe-b657-08d7631c573e x-ms-traffictypediagnostic: BY5PR11MB3976: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 0214EB3F68 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(136003)(376002)(396003)(346002)(366004)(13464003)(199004)(189003)(486006)(11346002)(6436002)(305945005)(66066001)(55016002)(6246003)(2501003)(14454004)(2906002)(19627235002)(4326008)(86362001)(6116002)(14444005)(3846002)(33656002)(110136005)(7736002)(71190400001)(478600001)(25786009)(99286004)(446003)(8676002)(107886003)(52536014)(81166006)(81156014)(8936002)(54906003)(9686003)(316002)(256004)(66946007)(53546011)(66446008)(6506007)(64756008)(26005)(66556008)(7696005)(74316002)(76176011)(102836004)(476003)(186003)(71200400001)(66476007)(76116006)(229853002)(30864003)(5660300002)(579004)(569006);DIR:OUT;SFP:1102;SCL:1;SRVR:BY5PR11MB3976;H:BY5PR11MB4484.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eMRXoksyqrTy0+kJcIBqWVBXc58iU9IUh6pwMp0q6Ui32UKra28hRhGVYbXlM/kptpnngjGkRCsXtKX0uYcFsvkcpTzIVtyKSodh/S8PM1z1dVp9VeQpfOUgSs7NVzV7t2IGS1vY4yJu0RXyH65eLVrLe1MG+mxsReckH/CTLe8ao5oBMZewUVOkyadRXwuJqwQ0dSFXwg+adwXPTlbe39rVyWWMm9YaNJ/hpa+0pEuK692Xc4SgScFk+g6IcgZllfVpZhLyMBJxjfkrT+2RZvIqca5hipFlSJcGD4+v/VpRyhOuF1RqL3RzSFiHnemEJd78VTaxQVZuNqZqMN7BEMbIldCThT3VXNSxWC0luprTr4D6/vHI/JCC3ssLRkU7aLOy6aLFY4m11v8QAAv1GTiyNvwXTYi8WY9cp056tB2MJ4YdfirOcDFLZ2siJFvA MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ee9b3cce-944d-44fe-b657-08d7631c573e X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Nov 2019 00:49:26.8127 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OugVRbZ+kje+pJVX2y41o/mt5zQzNiaIoGwE4nj1PDi0eHP2sfJWNONoNQ33B6FmsEX/+TbrTvFAzW67y9v42IRsGmaokFKr6Tm8PL1XO00= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB3976 Return-Path: michael.a.kubacki@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Typo "BoardModulePky" -> "BoardModulePkg". Can be fixed before pushed. Reviewed-by: Michael Kubacki > -----Original Message----- > From: Agyeman, Prince > Sent: Tuesday, November 5, 2019 5:26 PM > To: devel@edk2.groups.io > Cc: Kubacki, Michael A ; Chiu, Chasel > ; Desimone, Nathaniel L > > Subject: [edk2-platforms] [Patch v2 2/9] SimicsOpenBoardPkg: Remove > Super I/O DXE driver >=20 > Removed the Super I/O DXE driver from SimicsOpenBoardPkg. > This driver will be added to the BoardModulePky as it is > generic and can be shared by other open board packages >=20 > Cc: Michael Kubacki > Cc: Chasel Chiu > Cc: Nate DeSimone >=20 > Signed-off-by: Prince Agyeman > --- > .../BoardX58Ich10/OpenBoardPkg.dsc | 1 - > .../BoardX58Ich10/OpenBoardPkg.fdf | 1 - > .../LegacySioDxe/ComponentName.c | 173 ----- > .../LegacySioDxe/ComponentName.h | 87 --- > .../LegacySioDxe/LegacySioDxe.inf | 54 -- > .../LegacySioDxe/Register.h | 15 - > .../SimicsOpenBoardPkg/LegacySioDxe/SioChip.c | 272 -------- > .../SimicsOpenBoardPkg/LegacySioDxe/SioChip.h | 195 ------ > .../LegacySioDxe/SioDriver.c | 600 ------------------ > .../LegacySioDxe/SioDriver.h | 134 ---- > .../LegacySioDxe/SioService.c | 249 -------- > .../LegacySioDxe/SioService.h | 143 ----- > 12 files changed, 1924 deletions(-) > delete mode 100644 > Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.c > delete mode 100644 > Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.h > delete mode 100644 > Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/LegacySioDxe.inf > delete mode 100644 > Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/Register.h > delete mode 100644 > Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.c > delete mode 100644 > Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.h > delete mode 100644 > Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioDriver.c > delete mode 100644 > Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioDriver.h > delete mode 100644 > Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioService.c > delete mode 100644 > Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioService.h >=20 > diff --git > a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc > b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc > index 78f1e80990..e0a02b4efc 100644 > --- > a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc > +++ > b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc > @@ -280,7 +280,6 @@ > ####################################### > $(BOARD_PKG)/AcpiTables/AcpiTables.inf > $(BOARD_PKG)/AcpiTables/MinPlatformAcpiTables/AcpiPlatform.inf > - $(BOARD_PKG)/LegacySioDxe/LegacySioDxe.inf > $(BOARD_PKG)/SimicsDxe/SimicsDxe.inf > $(BOARD_PKG)/SimicsVideoDxe/SimicsVideoDxe.inf > $(BOARD_PKG)/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > diff --git > a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf > b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf > index 39226251a7..6dc7b4aa56 100644 > --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf > +++ > b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf > @@ -213,7 +213,6 @@ INF > MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf > INF MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf > INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf >=20 > -INF $(BOARD_PKG)/LegacySioDxe/LegacySioDxe.inf > INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf >=20 > INF $(BOARD_PKG)/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > diff --git > a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.c > b/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.c > deleted file mode 100644 > index 4ba02f92c0..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.c > +++ /dev/null > @@ -1,173 +0,0 @@ > -/** @file > - Install Base and Size Info Ppi for Firmware Volume Recovery. > - > - Copyright (c) 2013 - 2019 Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#include "SioDriver.h" > - > -/// > -/// Component Name Protocol instance > -/// > -GLOBAL_REMOVE_IF_UNREFERENCED > EFI_COMPONENT_NAME_PROTOCOL mSioComponentName =3D { > - SioComponentNameGetDriverName, > - SioComponentNameGetControllerName, > - "eng" > -}; > - > -/// > -/// Component Name 2 Protocol instance > -/// > -GLOBAL_REMOVE_IF_UNREFERENCED > EFI_COMPONENT_NAME2_PROTOCOL mSioComponentName2 =3D { > - (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) > SioComponentNameGetDriverName, > - > (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)SioComponentName > GetControllerName, > - "en" > -}; > - > -/// > -/// Table of driver names > -/// > -GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE > mSioDriverNameTable[] =3D { > - { > - "eng;en", > - L"Super I/O Driver" > - }, > - { > - NULL, > - NULL > - } > -}; > - > -/// > -/// Table of Controller names > -/// > -GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE > mSioControllerNameTable[] =3D { > - { > - "eng;en", > - L"Super I/O Controller" > - }, > - { > - NULL, > - NULL > - } > -}; > - > -/** > - Retrieves a Unicode string that is the user-readable name of the EFI D= river. > - > - @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL > instance. > - @param Language A pointer to a three-character ISO 639-2 language > identifier. > - This is the language of the driver name that that t= he caller > - is requesting, and it must match one of the languag= es specified > - in SupportedLanguages. The number of languages sup= ported by > a > - driver is up to the driver writer. > - @param DriverName A pointer to the Unicode string to return. This > Unicode string > - is the name of the driver specified by This in the = language > - specified by Language. > - > - @retval EFI_SUCCESS The Unicode string for the Driver specif= ied by > This > - and the language specified by Language w= as returned > - in DriverName. > - @retval EFI_INVALID_PARAMETER Language is NULL. > - @retval EFI_INVALID_PARAMETER DriverName is NULL. > - @retval EFI_UNSUPPORTED The driver specified by This does not > support the > - language specified by Language. > - > -**/ > -EFI_STATUS > -EFIAPI > -SioComponentNameGetDriverName ( > - IN EFI_COMPONENT_NAME_PROTOCOL *This, > - IN CHAR8 *Language, > - OUT CHAR16 **DriverName > - ) > -{ > - return LookupUnicodeString2 ( > - Language, > - This->SupportedLanguages, > - mSioDriverNameTable, > - DriverName, > - (BOOLEAN)(This =3D=3D &mSioComponentName) > - ); > -} > - > -/** > - Retrieves a Unicode string that is the user readable name of the contr= oller > - that is being managed by an EFI Driver. > - > - @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL > instance. > - @param ControllerHandle The handle of a controller that the driver > specified by > - This is managing. This handle specifies the = controller > - whose name is to be returned. > - @param ChildHandle The handle of the child controller to retriev= e the > name > - of. This is an optional parameter that may b= e NULL. It > - will be NULL for device drivers. It will als= o be NULL > - for a bus drivers that wish to retrieve the n= ame of the > - bus controller. It will not be NULL for a bu= s driver > - that wishes to retrieve the name of a child c= ontroller. > - @param Language A pointer to a three character ISO 639-2 lang= uage > - identifier. This is the language of the cont= roller name > - that the caller is requesting, and it must ma= tch one > - of the languages specified in SupportedLangua= ges. The > - number of languages supported by a driver is = up to the > - driver writer. > - @param ControllerName A pointer to the Unicode string to return. T= his > Unicode > - string is the name of the controller specifie= d by > - ControllerHandle and ChildHandle in the langu= age specified > - by Language, from the point of view of the dr= iver specified > - by This. > - > - @retval EFI_SUCCESS The Unicode string for the user-readable= name > in the > - language specified by Language for the d= river > - specified by This was returned in Driver= Name. > - @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. > - @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a > valid EFI_HANDLE. > - @retval EFI_INVALID_PARAMETER Language is NULL. > - @retval EFI_INVALID_PARAMETER ControllerName is NULL. > - @retval EFI_UNSUPPORTED The driver specified by This is not curr= ently > managing > - the controller specified by ControllerHa= ndle and > - ChildHandle. > - @retval EFI_UNSUPPORTED The driver specified by This does not > support the > - language specified by Language. > - > -**/ > -EFI_STATUS > -EFIAPI > -SioComponentNameGetControllerName ( > - IN EFI_COMPONENT_NAME_PROTOCOL *This, > - IN EFI_HANDLE ControllerHandle, > - IN EFI_HANDLE ChildHandle OPTIONAL, > - IN CHAR8 *Language, > - OUT CHAR16 **ControllerName > - ) > -{ > - EFI_STATUS Status; > - > - // > - // Make sure this driver is currently managing ControllHandle > - // > - Status =3D EfiTestManagedDevice ( > - ControllerHandle, > - mSioDriver.DriverBindingHandle, > - &gEfiPciIoProtocolGuid > - ); > - if (EFI_ERROR (Status)) { > - return Status; > - } > - // > - // ChildHandle must be NULL for a Device Driver > - // > - if (ChildHandle !=3D NULL) { > - return EFI_UNSUPPORTED; > - } > - > - return LookupUnicodeString2 ( > - Language, > - This->SupportedLanguages, > - mSioControllerNameTable, > - ControllerName, > - (BOOLEAN)(This =3D=3D &mSioComponentName) > - ); > -} > diff --git > a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.h > b/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.h > deleted file mode 100644 > index 5368f94bcd..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.h > +++ /dev/null > @@ -1,87 +0,0 @@ > -/** @file > - Install Base and Size Info Ppi for Firmware Volume Recovery. > - > - Copyright (c) 2013 - 2019 Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -/** > - Retrieves a Unicode string that is the user-readable name of the EFI D= river. > - > - @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL > instance. > - @param Language A pointer to a three-character ISO 639-2 language > identifier. > - This is the language of the driver name that that t= he caller > - is requesting, and it must match one of the languag= es specified > - in SupportedLanguages. The number of languages sup= ported by > a > - driver is up to the driver writer. > - @param DriverName A pointer to the Unicode string to return. This > Unicode string > - is the name of the driver specified by This in the = language > - specified by Language. > - > - @retval EFI_SUCCESS The Unicode string for the Driver specif= ied by > This > - and the language specified by Language w= as returned > - in DriverName. > - @retval EFI_INVALID_PARAMETER Language is NULL. > - @retval EFI_INVALID_PARAMETER DriverName is NULL. > - @retval EFI_UNSUPPORTED The driver specified by This does not > support the > - language specified by Language. > - > -**/ > -EFI_STATUS > -EFIAPI > -SioComponentNameGetDriverName ( > - IN EFI_COMPONENT_NAME_PROTOCOL *This, > - IN CHAR8 *Language, > - OUT CHAR16 **DriverName > - ); > - > -/** > - Retrieves a Unicode string that is the user readable name of the contr= oller > - that is being managed by an EFI Driver. > - > - @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL > instance. > - @param ControllerHandle The handle of a controller that the driver > specified by > - This is managing. This handle specifies the = controller > - whose name is to be returned. > - @param ChildHandle The handle of the child controller to retriev= e the > name > - of. This is an optional parameter that may b= e NULL. It > - will be NULL for device drivers. It will als= o be NULL > - for a bus drivers that wish to retrieve the n= ame of the > - bus controller. It will not be NULL for a bu= s driver > - that wishes to retrieve the name of a child c= ontroller. > - @param Language A pointer to a three character ISO 639-2 lang= uage > - identifier. This is the language of the cont= roller name > - that the caller is requesting, and it must ma= tch one > - of the languages specified in SupportedLangua= ges. The > - number of languages supported by a driver is = up to the > - driver writer. > - @param ControllerName A pointer to the Unicode string to return. T= his > Unicode > - string is the name of the controller specifie= d by > - ControllerHandle and ChildHandle in the langu= age specified > - by Language, from the point of view of the dr= iver specified > - by This. > - > - @retval EFI_SUCCESS The Unicode string for the user-readable= name > in the > - language specified by Language for the d= river > - specified by This was returned in Driver= Name. > - @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. > - @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a > valid EFI_HANDLE. > - @retval EFI_INVALID_PARAMETER Language is NULL. > - @retval EFI_INVALID_PARAMETER ControllerName is NULL. > - @retval EFI_UNSUPPORTED The driver specified by This is not curr= ently > managing > - the controller specified by ControllerHa= ndle and > - ChildHandle. > - @retval EFI_UNSUPPORTED The driver specified by This does not > support the > - language specified by Language. > - > -**/ > -EFI_STATUS > -EFIAPI > -SioComponentNameGetControllerName ( > - IN EFI_COMPONENT_NAME_PROTOCOL *This, > - IN EFI_HANDLE ControllerHandle, > - IN EFI_HANDLE ChildHandle OPTIONAL, > - IN CHAR8 *Language, > - OUT CHAR16 **ControllerName > - ); > diff --git > a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/LegacySioDxe.inf > b/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/LegacySioDxe.inf > deleted file mode 100644 > index 275f36ca47..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/LegacySioDxe.inf > +++ /dev/null > @@ -1,54 +0,0 @@ > -## @file > -# Module information that produces the > -# EFI_SIO_PROTOCOL. > -# > -# Copyright (c) 2010 - 2019 Intel Corporation. All rights reserved.
> -# > -# SPDX-License-Identifier: BSD-2-Clause-Patent > -# > -## > - > -[Defines] > - INF_VERSION =3D 0x00010017 > - BASE_NAME =3D HitachiH8s2113Dxe > - FILE_GUID =3D 7807E404-8281-4FF1-8457-0B54BABE263= F > - VERSION_STRING =3D 1.0 > - MODULE_TYPE =3D UEFI_DRIVER > - ENTRY_POINT =3D SioDriverEntryPoint > -# > -# The following information is for reference only and not required by th= e > build tools. > -# > -# VALID_ARCHITECTURES =3D IA32 X64 IPF EBC > -# > - > -[LibraryClasses] > - BaseLib > - UefiLib > - DebugLib > - MemoryAllocationLib > - PcdLib > - DevicePathLib > - IoLib > - UefiDriverEntryPoint > - UefiBootServicesTableLib > - S3BootScriptLib > - S3IoLib > - > -[Packages] > - MdePkg/MdePkg.dec > - MdeModulePkg/MdeModulePkg.dec > - > -[Sources] > - SioChip.c > - SioChip.h > - SioService.c > - SioService.h > - SioDriver.c > - SioDriver.h > - ComponentName.c > - > -[Protocols] > - gEfiPciIoProtocolGuid ## CONSUMES > - gEfiDevicePathProtocolGuid ## PRODUCES > - gEfiSioProtocolGuid ## PRODUCES > - > diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/Register.h > b/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/Register.h > deleted file mode 100644 > index f61f713cf2..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/Register.h > +++ /dev/null > @@ -1,15 +0,0 @@ > -/** @file > - Super I/O register definitions > - > - Copyright (c) 2010 - 2019 Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#ifndef _REGISTER_H_ > -#define _REGISTER_H_ > - > -#define EC_COMMAND_PORT 0x66 > -#define EC_DATA_PORT 0x62 > - > -#endif > diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.c > b/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.c > deleted file mode 100644 > index b9a7b9cd24..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.c > +++ /dev/null > @@ -1,272 +0,0 @@ > -/** @file > - Super I/O specific implementation. > - > - Copyright (c) 2010 - 2019 Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#include "SioDriver.h" > -#include > - > -LOCAL_IO_WRITE8 mIoWrite8 =3D IoWrite8; > -// > -// System configuration (setup) information > -// > -// SYSTEM_CONFIGURATION mSystemConfiguration; > - > -// > -// COM 1 UART Controller > -// > -ACPI_SIO_RESOURCES_IO_IRQ mCom1Resources =3D { > - { > - { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, > - 0x3f8, > - 8 > - }, > - { > - { ACPI_IRQ_NOFLAG_DESCRIPTOR }, > - BIT4 // IRQ4 > - }, > - { > - ACPI_END_TAG_DESCRIPTOR, > - 0 > - } > -}; > - > -// > -// PS/2 Keyboard Controller > -// > -ACPI_SIO_RESOURCES_IO_IRQ mKeyboardResources =3D { > - { > - { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, > - 0x60, > - 5 > - }, > - { > - { ACPI_IRQ_NOFLAG_DESCRIPTOR }, > - BIT1 > - }, > - { > - ACPI_END_TAG_DESCRIPTOR, > - 0 > - } > -}; > - > -// > -// PS/2 Mouse Controller > -// > -ACPI_SIO_RESOURCES_IO_IRQ mMouseResources =3D { > - { > - { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, > - 0x60, > - 5 > - }, > - { > - { ACPI_IRQ_NOFLAG_DESCRIPTOR }, > - BIT12 > - }, > - { > - ACPI_END_TAG_DESCRIPTOR, > - 0 > - } > -}; > - > -// > -// Table of SIO Controllers > -// > -DEVICE_INFO mDeviceInfo[] =3D { > - { > - { > - EISA_PNP_ID(0x501), > - 0 > - }, > - 0, > - RESOURCE_IO | RESOURCE_IRQ, > - { (ACPI_SMALL_RESOURCE_HEADER *) &mCom1Resources }, > - { (ACPI_SMALL_RESOURCE_HEADER *) &mCom1Resources } > - }, // COM 1 UART Controller > - { > - { > - EISA_PNP_ID(0x303), > - 0 > - }, > - 0, > - 0, // Cannot change resource > - { (ACPI_SMALL_RESOURCE_HEADER *) &mKeyboardResources }, > - { (ACPI_SMALL_RESOURCE_HEADER *) &mKeyboardResources } > - }, // PS/2 Keyboard Controller > - { > - { > - EISA_PNP_ID(0xF03), > - 0 > - }, > - 0, > - 0, // Cannot change resource > - { (ACPI_SMALL_RESOURCE_HEADER *) &mMouseResources }, > - { (ACPI_SMALL_RESOURCE_HEADER *) &mMouseResources } > - } // PS/2 Mouse Controller > -}; > - > - > -/** > - Return the supported devices. > - > - @param[out] Devices Pointer to pointer of EFI_SIO_ACPI_DEVICE_= ID. > - Caller is responsible to free the buffer. > - @param[out] Count Pointer to UINTN holding the device count. > -**/ > -VOID > -DeviceGetList ( > - OUT EFI_SIO_ACPI_DEVICE_ID **Devices, > - OUT UINTN *Count > - ) > -{ > - EFI_SIO_ACPI_DEVICE_ID *LocalDevices; > - UINTN LocalCount; > - UINTN DeviceCount; > - UINTN Index; > - > - // > - // Allocate enough memory for simplicity > - // > - DeviceCount =3D sizeof (mDeviceInfo) / sizeof (mDeviceInfo[0]); > - LocalDevices =3D AllocatePool (sizeof (EFI_SIO_ACPI_DEVICE_ID) * > DeviceCount); > - ASSERT (LocalDevices !=3D NULL); > - if (LocalDevices =3D=3D NULL) { > - return; > - } > - LocalCount =3D 0; > - > - for (Index =3D 0; Index < DeviceCount; Index++) { > - CopyMem (&LocalDevices[LocalCount], &mDeviceInfo[Index].Device, > sizeof (EFI_SIO_ACPI_DEVICE_ID)); > - LocalCount++; > - } > - > - *Devices =3D LocalDevices; > - *Count =3D LocalCount; > -} > - > - > -/** > - Super I/O controller initialization. > - > - @retval EFI_SUCCESS The super I/O controller is found and in= itialized. > - @retval EFI_UNSUPPORTED The super I/O controller is not found. > -**/ > -EFI_STATUS > -SioInit ( > - VOID > - ) > -{ > - > - return EFI_SUCCESS; > -} > - > - > -/** > - Find the DEVICE_INFO for specified Device. > - > - @param[in] Device Pointer to the EFI_SIO_ACPI_DEVICE_ID. > - > - @retval DEVICE_INFO* Pointer to the DEVICE_INFO. > -**/ > -DEVICE_INFO * > -DeviceSearch ( > - IN EFI_SIO_ACPI_DEVICE_ID *Device > - ) > -{ > - UINTN Index; > - > - for (Index =3D 0; Index < sizeof (mDeviceInfo) / sizeof (mDeviceInfo[0= ]); > Index++) { > - if (CompareMem (Device, &mDeviceInfo[Index].Device, sizeof (*Device)= ) > =3D=3D 0) { > - return &mDeviceInfo[Index]; > - } > - } > - > - ASSERT (FALSE); > - return NULL; > -} > - > - > -/** > - Program the SIO chip to enable the specified device using the default > resource. > - > - @param[in] Device Pointer to EFI_SIO_ACPI_DEVICE_ID. > -**/ > -VOID > -DeviceEnable ( > - IN EFI_SIO_ACPI_DEVICE_ID *Device > - ) > -{ > -} > - > - > -/** > - Get the ACPI resources for specified device. > - > - @param[in] Device Pointer to EFI_SIO_ACPI_DEVICE_ID. > - @param[out] Resources Pointer to ACPI_RESOURCE_HEADER_PTR. > - > - @retval EFI_SUCCESS The resources are returned successfully. > -**/ > -EFI_STATUS > -DeviceGetResources ( > - IN EFI_SIO_ACPI_DEVICE_ID *Device, > - OUT ACPI_RESOURCE_HEADER_PTR *Resources > - ) > -{ > - DEVICE_INFO *DeviceInfo; > - > - DeviceInfo =3D DeviceSearch (Device); > - > - *Resources =3D DeviceInfo->Resources; > - > - return EFI_SUCCESS; > -} > - > - > -/** > - Set the ACPI resources for specified device. > - > - The SIO chip is programmed to use the new resources and the > - resources setting are saved. The function assumes the resources > - are valid. > - > - @param[in] Device Pointer to EFI_SIO_ACPI_DEVICE_ID. > - @param[in] Resources ACPI_RESOURCE_HEADER_PTR. > - > - @retval EFI_UNSUPPORTED > -**/ > -EFI_STATUS > -DeviceSetResources ( > - IN EFI_SIO_ACPI_DEVICE_ID *Device, > - IN ACPI_RESOURCE_HEADER_PTR Resources > - ) > -{ > - return EFI_UNSUPPORTED; > -} > - > - > -/** > - Get the possible ACPI resources for specified device. > - > - @param[in] Device Pointer to EFI_SIO_ACPI_DEVICE_ID. > - @param[out] Resources Pointer to ACPI_RESOURCE_HEADER_PTR. > - > - @retval EFI_SUCCESS The resources are returned successfully. > -**/ > -EFI_STATUS > -DevicePossibleResources ( > - IN EFI_SIO_ACPI_DEVICE_ID *Device, > - OUT ACPI_RESOURCE_HEADER_PTR *Resources > - ) > -{ > - DEVICE_INFO *DeviceInfo; > - > - DeviceInfo =3D DeviceSearch (Device); > - > - *Resources =3D DeviceInfo->PossibleResources; > - > - return EFI_SUCCESS; > -} > diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.h > b/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.h > deleted file mode 100644 > index 48e28c44b0..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.h > +++ /dev/null > @@ -1,195 +0,0 @@ > -/** @file > - Super I/O specific header. > - > - Copyright (c) 2010 - 2019 Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#ifndef _SIO_H_ > -#define _SIO_H_ > - > - > -#include "Register.h" > - > -typedef > -UINT8 > -(EFIAPI *LOCAL_IO_WRITE8) ( > - IN UINTN Port, > - IN UINT8 Value > - ); > - > -#define RESOURCE_IO BIT0 > -#define RESOURCE_IRQ BIT1 > -#define RESOURCE_DMA BIT2 > -#define RESOURCE_MEM BIT3 > - > -#pragma pack(1) > - > -typedef struct { > - EFI_ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR Io; > - EFI_ACPI_IRQ_NOFLAG_DESCRIPTOR Irq; > - EFI_ACPI_END_TAG_DESCRIPTOR End; > -} ACPI_SIO_RESOURCES_IO_IRQ; > -#pragma pack() > - > -typedef struct { > - UINT32 HID; > - UINT32 UID; > -} EFI_SIO_ACPI_DEVICE_ID; > - > -typedef struct { > - EFI_SIO_ACPI_DEVICE_ID Device; > - UINT8 DeviceId; > - UINT8 ResourceMask; > - ACPI_RESOURCE_HEADER_PTR Resources; > - ACPI_RESOURCE_HEADER_PTR PossibleResources; > -} DEVICE_INFO; > - > - > -/** > - Initialize the SIO chip for S3. > -**/ > -VOID > -SioInitForS3 ( > - VOID > - ); > - > - > -/** > - Return the supported devices. > - > - @param[out] Devices Pointer to pointer of EFI_SIO_ACPI_DEVICE_= ID. > - Caller is responsible to free the buffer. > - @param[out] Count Pointer to UINTN holding the device count. > -**/ > -VOID > -DeviceGetList ( > - OUT EFI_SIO_ACPI_DEVICE_ID **Devices, > - OUT UINTN *Count > - ); > - > - > -/** > - Program the SIO chip to enable the specified device using the default > resource. > - > - @param[in] Device Pointer to EFI_SIO_ACPI_DEVICE_ID. > -**/ > -VOID > -DeviceEnable ( > - IN EFI_SIO_ACPI_DEVICE_ID *Device > - ); > - > - > -/** > - Get the possible ACPI resources for specified device. > - > - @param[in] Device Pointer to EFI_SIO_ACPI_DEVICE_ID. > - @param[out] Resources Pointer to ACPI_RESOURCE_HEADER_PTR. > - > - @retval EFI_SUCCESS The resources are returned successfully. > -**/ > -EFI_STATUS > -DevicePossibleResources ( > - IN EFI_SIO_ACPI_DEVICE_ID *Device, > - OUT ACPI_RESOURCE_HEADER_PTR *Resources > - ); > - > - > -/** > - Set the ACPI resources for specified device. > - > - The SIO chip is programmed to use the new resources and the > - resources setting are saved. The function assumes the resources > - are valid. > - > - @param[in] Device Pointer to EFI_SIO_ACPI_DEVICE_ID. > - @param[in] Resources ACPI_RESOURCE_HEADER_PTR. > - > - @retval EFI_SUCCESS The resources are set successfully. > -**/ > -EFI_STATUS > -DeviceSetResources ( > - IN EFI_SIO_ACPI_DEVICE_ID *Device, > - IN ACPI_RESOURCE_HEADER_PTR Resources > - ); > - > - > -/** > - Get the ACPI resources for specified device. > - > - @param[in] Device Pointer to EFI_SIO_ACPI_DEVICE_ID. > - @param[out] Resources Pointer to ACPI_RESOURCE_HEADER_PTR. > - > - @retval EFI_SUCCESS The resources are returned successfully. > -**/ > -EFI_STATUS > -DeviceGetResources ( > - IN EFI_SIO_ACPI_DEVICE_ID *Device, > - OUT ACPI_RESOURCE_HEADER_PTR *Resources > - ); > - > - > -/** > - Program the SIO chip to enter the configure mode. > -**/ > -VOID > -EnterConfigMode ( > - VOID > - ); > - > - > -/** > - Program the SIO chip to exit the configure mode. > -**/ > -VOID > -ExitConfigMode ( > - VOID > - ); > - > - > -/** > - Perform a 8-bit I/O write to SIO register. > - > - @param[in] Index The register index. > - @param[in] Data The value to write to register. > -**/ > -VOID > -WriteRegister ( > - IN UINT8 Index, > - IN UINT8 Data > - ); > - > - > -/** > - Perform a 8-bit I/O read from SIO register. > - > - @param[in] Index The register index. > - > - @retval Value The value written to the register. > -**/ > -UINT8 > -ReadRegister ( > - IN UINT8 Index > - ); > - > -// > -// Prototypes for the sio internal function > -// > -// > -// Internal function > -// > - > - > -/** > - Find Super I/O controller. > - > - @retval EFI_SUCCESS Super I/O controller exists. > - @retval EFI_UNSUPPORTED Super I/O controller does not exist. > -**/ > -EFI_STATUS > -SioInit ( > - VOID > - ); > - > -#endif > diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioDriver.c > b/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioDriver.c > deleted file mode 100644 > index 408c6ff301..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioDriver.c > +++ /dev/null > @@ -1,600 +0,0 @@ > -/** @file > - EFI Driver following Driver Binding Protocol. > - > - Copyright (c) 2010 - 2019 Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#include "SioDriver.h" > - > - > -// > -// This driver is for ACPI(PNP0A03,0)/PCI(0x1f,0) > -// > -// > -// Sio Driver Global Variables > -// > -EFI_DRIVER_BINDING_PROTOCOL mSioDriver =3D { > - SioDriverSupported, > - SioDriverStart, > - SioDriverStop, > - 1, > - NULL, > - NULL > -}; > - > -// > -// The list of the created SIO_DEV > -// > -LIST_ENTRY mSioDevPool =3D INITIALIZE_LIST_HEAD_VARIABL= E > (mSioDevPool); > - > -// > -// Template structure to create SIO_DEV > -// > -SIO_DEV mSioDevTemplate =3D { > - SIO_DEV_SIGNATURE, // Signature > - NULL, // PciHandle > - { > - 0x00000000, // HID > - 0x00000000 // UID > - }, > - NULL, // Handle > - { // Sio Instance > - SioRegisterAccess, > - SioGetResources, > - SioSetResources, > - SioPossibleResources, > - SioModify > - }, > - NULL, // DevicePath > - { > - NULL, // ForwardLink > - NULL, // BackLink > - } > -}; > - > -// > -// Template ACPI_HID_DEVICE_PATH structure to create device path > -// > -ACPI_HID_DEVICE_PATH mAcpiNodeTemplate =3D { > - { > - ACPI_DEVICE_PATH, // Type > - ACPI_DP, // SubType > - { > - sizeof (ACPI_HID_DEVICE_PATH), // Length[0] > - 0 // Length[1] > - } > - }, > - 0x00000000, // HID > - 0x00000000 // UID > -}; > - > - > -/** > - The user Entry Point for module Lpc47m17x. The user code starts with t= his > function. > - > - @param[in] ImageHandle The firmware allocated handle for the EFI > image. > - @param[in] SystemTable A pointer to the EFI System Table. > - > - @retval EFI_SUCCESS The entry point is executed successfully. > - @retval other Some error occurs when executing this entry= point. > -**/ > -EFI_STATUS > -EFIAPI > -SioDriverEntryPoint ( > - IN EFI_HANDLE ImageHandle, > - IN EFI_SYSTEM_TABLE *SystemTable > - ) > -{ > - if (EFI_ERROR (SioInit())) { > - return EFI_UNSUPPORTED; > - } else { > - > - // > - // Install protocols > - // > - return EfiLibInstallDriverBindingComponentName2 ( > - ImageHandle, > - SystemTable, > - &mSioDriver, > - ImageHandle, > - &mSioComponentName, > - &mSioComponentName2 > - ); > - } > -} > - > - > -/** > - Test to see if this driver supports Controller Handle. > - > - @param[in] This Protocol instance pointer. > - @param[in] Controller Handle of device to test > - @param[in] RemainingDevicePath Optional parameter use to pick a > specific child > - device to start. > - > - @retval EFI_SUCCESS This driver supports this device > - @retval EFI_ALREADY_STARTED This driver is already running on this > device > - @retval other This driver does not support this devi= ce > -**/ > -EFI_STATUS > -EFIAPI > -SioDriverSupported ( > - IN EFI_DRIVER_BINDING_PROTOCOL *This, > - IN EFI_HANDLE Controller, > - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath > - ) > -{ > - EFI_STATUS Status; > - EFI_PCI_IO_PROTOCOL *PciIo; > - EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath; > - ACPI_HID_DEVICE_PATH *AcpiNode; > - PCI_TYPE00 Pci; > - UINTN Index; > - EFI_SIO_ACPI_DEVICE_ID *Devices; > - UINTN Count; > - UINTN SegmentNumber; > - UINTN BusNumber; > - UINTN DeviceNumber; > - UINTN FunctionNumber; > - > - // > - // If RemainingDevicePath is not NULL, it should verify that the first= device > - // path node in RemainingDevicePath is an ACPI Device path node which = is > a > - // legal Device Path Node for this bus driver's children. > - // > - if (RemainingDevicePath !=3D NULL) { > - if (!IsDevicePathEnd (RemainingDevicePath)) { > - if ((RemainingDevicePath->Type !=3D ACPI_DEVICE_PATH) || > - (((RemainingDevicePath->SubType !=3D ACPI_DP) || > (DevicePathNodeLength (RemainingDevicePath) !=3D sizeof > (ACPI_HID_DEVICE_PATH))) && > - ((RemainingDevicePath->SubType !=3D ACPI_EXTENDED_DP) || > (DevicePathNodeLength (RemainingDevicePath) !=3D sizeof > (ACPI_EXTENDED_HID_DEVICE_PATH)))) > - ) { > - return EFI_UNSUPPORTED; > - } > - > - DeviceGetList (&Devices, &Count); > - if (Devices =3D=3D NULL) { > - return EFI_OUT_OF_RESOURCES; > - } > - AcpiNode =3D (ACPI_HID_DEVICE_PATH *) RemainingDevicePath; > - for (Index =3D 0; Index < Count; Index++) { > - if ((AcpiNode->HID =3D=3D Devices[Index].HID) && > - (AcpiNode->UID =3D=3D Devices[Index].UID)) { > - break; > - } > - } > - FreePool (Devices); > - if (Index =3D=3D Count) { > - return EFI_UNSUPPORTED; > - } > - } > - } > - > - // > - // See if the parent device path can be opened BY_DRIVER > - // > - Status =3D gBS->OpenProtocol ( > - Controller, > - &gEfiDevicePathProtocolGuid, > - (VOID **) &ParentDevicePath, > - This->DriverBindingHandle, > - Controller, > - EFI_OPEN_PROTOCOL_BY_DRIVER > - ); > - if (EFI_ERROR (Status) && (Status !=3D EFI_ALREADY_STARTED)) { > - return Status; > - } > - > - gBS->CloseProtocol ( > - Controller, > - &gEfiDevicePathProtocolGuid, > - This->DriverBindingHandle, > - Controller > - ); > - > - // > - // Get PciIo protocol instance > - // > - Status =3D gBS->OpenProtocol ( > - Controller, > - &gEfiPciIoProtocolGuid, > - (VOID **) &PciIo, > - This->DriverBindingHandle, > - Controller, > - EFI_OPEN_PROTOCOL_BY_DRIVER > - ); > - > - if (!EFI_ERROR (Status)) { > - Status =3D PciIo->Pci.Read ( > - PciIo, > - EfiPciIoWidthUint32, > - 0, > - sizeof (Pci) / sizeof (UINT32), > - &Pci > - ); > - ASSERT_EFI_ERROR (Status); > - > - Status =3D EFI_UNSUPPORTED; > - if ((Pci.Hdr.Command & (EFI_PCI_COMMAND_IO_SPACE | > EFI_PCI_COMMAND_MEMORY_SPACE)) > - =3D=3D (EFI_PCI_COMMAND_IO_SPACE | > EFI_PCI_COMMAND_MEMORY_SPACE) > - ) { > - if (Pci.Hdr.ClassCode[2] =3D=3D PCI_CLASS_BRIDGE) { > - // > - // See if this is a standard PCI to ISA Bridge from the Base Cod= e and Class > Code > - // > - if (Pci.Hdr.ClassCode[1] =3D=3D PCI_CLASS_BRIDGE_ISA) { > - Status =3D EFI_SUCCESS; > - } > - > - // > - // See if this is an Intel PCI to ISA Bridge in Positive Decode = Mode > - // > - if ((Pci.Hdr.ClassCode[1] =3D=3D PCI_CLASS_BRIDGE_ISA_PDECODE) &= & > - (Pci.Hdr.VendorId =3D=3D 0x8086)) { > - // > - // See if this is on Function #0 to avoid false positive on > - // PCI_CLASS_BRIDGE_OTHER that has the same value as > - // PCI_CLASS_BRIDGE_ISA_PDECODE > - // > - Status =3D PciIo->GetLocation ( > - PciIo, > - &SegmentNumber, > - &BusNumber, > - &DeviceNumber, > - &FunctionNumber > - ); > - if (!EFI_ERROR (Status) && (FunctionNumber =3D=3D 0)) { > - Status =3D EFI_SUCCESS; > - } else { > - Status =3D EFI_UNSUPPORTED; > - } > - } > - } > - } > - > - gBS->CloseProtocol ( > - Controller, > - &gEfiPciIoProtocolGuid, > - This->DriverBindingHandle, > - Controller > - ); > - } > - if (EFI_ERROR (Status) && (Status !=3D EFI_ALREADY_STARTED)) { > - return Status; > - } > - > - return EFI_SUCCESS; > -} > - > - > -/** > - Destroy the SIO controller handle. > - > - @param[in] ChildHandle The SIO controller handle. > - > - @retval EFI_SUCCESS The SIO controller handle is destroyed > successfully. > -**/ > -EFI_STATUS > -SioDestroyDevice ( > - IN EFI_HANDLE ChildHandle > - ) > -{ > - EFI_STATUS Status; > - SIO_DEV *SioDev; > - EFI_SIO_PROTOCOL *Sio; > - EFI_PCI_IO_PROTOCOL *PciIo; > - > - Status =3D gBS->HandleProtocol ( > - ChildHandle, > - &gEfiSioProtocolGuid, > - (VOID **) &Sio > - ); > - ASSERT_EFI_ERROR (Status); > - > - SioDev =3D SIO_DEV_FROM_THIS (Sio); > - > - Status =3D gBS->CloseProtocol ( > - SioDev->PciHandle, > - &gEfiPciIoProtocolGuid, > - mSioDriver.DriverBindingHandle, > - ChildHandle > - ); > - ASSERT_EFI_ERROR (Status); > - > - Status =3D gBS->UninstallMultipleProtocolInterfaces ( > - ChildHandle, > - &gEfiDevicePathProtocolGuid, > - SioDev->DevicePath, > - &gEfiSioProtocolGuid, > - &SioDev->Sio, > - NULL > - ); > - if (EFI_ERROR (Status)) { > - gBS->OpenProtocol ( > - SioDev->PciHandle, > - &gEfiPciIoProtocolGuid, > - (VOID **) &PciIo, > - mSioDriver.DriverBindingHandle, > - ChildHandle, > - EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER > - ); > - return Status; > - } > - > - RemoveEntryList (&SioDev->Link); > - FreePool (SioDev->DevicePath); > - FreePool (SioDev); > - return EFI_SUCCESS; > -} > - > - > -/** > - Create the SIO controller handle. > - > - @param[in] Controller The parent PCI controller handle. > - @param[in] Device Pointer to EFI_SIO_ACPI_DEVICE_ID. > - @param[in] ParentDevicePath The device path of the parent controller. > - @param[out] PciIo The PciIo instance of the parent controll= er. > -**/ > -VOID > -SioCreateDevice ( > - IN EFI_HANDLE Controller, > - IN EFI_SIO_ACPI_DEVICE_ID *Device, > - IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath, > - OUT EFI_PCI_IO_PROTOCOL *PciIo > - ) > -{ > - EFI_STATUS Status; > - SIO_DEV *SioDev; > - > - DeviceEnable (Device); > - SioDev =3D AllocateCopyPool (sizeof (SIO_DEV), &mSioDevTemplate); > - ASSERT (SioDev !=3D NULL); > - if (SioDev =3D=3D NULL) { > - return; > - } > - InsertHeadList (&mSioDevPool, &SioDev->Link); > - > - SioDev->PciHandle =3D Controller; > - > - CopyMem (&SioDev->Device, Device, sizeof (*Device)); > - > - mAcpiNodeTemplate.HID =3D Device->HID; > - mAcpiNodeTemplate.UID =3D Device->UID; > - SioDev->DevicePath =3D AppendDevicePathNode (ParentDevicePath, > (EFI_DEVICE_PATH_PROTOCOL *) &mAcpiNodeTemplate); > - ASSERT (SioDev->DevicePath !=3D NULL); > - > - Status =3D gBS->InstallMultipleProtocolInterfaces ( > - &SioDev->Handle, > - &gEfiSioProtocolGuid, &SioDev->Sio, > - &gEfiDevicePathProtocolGuid, SioDev->DevicePath, > - NULL > - ); > - ASSERT_EFI_ERROR (Status); > - > - Status =3D gBS->OpenProtocol ( > - Controller, > - &gEfiPciIoProtocolGuid, > - (VOID **) &PciIo, > - mSioDriver.DriverBindingHandle, > - SioDev->Handle, > - EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER > - ); > - ASSERT_EFI_ERROR (Status); > -} > - > - > -/** > - Start this driver on ControllerHandle. > - > - @param[in] This Protocol instance pointer. > - @param[in] Controller Handle of device to bind driver to > - @param[in] RemainingDevicePath Optional parameter use to pick a > specific child > - device to start. > - > - @retval EFI_SUCCESS This driver is added to ControllerHan= dle > - @retval EFI_ALREADY_STARTED This driver is already running on > ControllerHandle > - @retval other This driver does not support this dev= ice > -**/ > -EFI_STATUS > -EFIAPI > -SioDriverStart ( > - IN EFI_DRIVER_BINDING_PROTOCOL *This, > - IN EFI_HANDLE Controller, > - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath > - ) > -{ > - EFI_STATUS Status; > - EFI_PCI_IO_PROTOCOL *PciIo; > - EFI_DEVICE_PATH_PROTOCOL *DevicePath; > - EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath; > - EFI_SIO_ACPI_DEVICE_ID *Devices; > - SIO_DEV *SioDev; > - UINTN Count; > - UINTN Index; > - ACPI_HID_DEVICE_PATH *AcpiNode; > - BOOLEAN *HasCreated; > - BOOLEAN *RequestCreate; > - LIST_ENTRY *Node; > - > - HasCreated =3D NULL; > - RequestCreate =3D NULL; > - // > - // Get the ISA bridge's Device Path > - // > - Status =3D gBS->OpenProtocol ( > - Controller, > - &gEfiDevicePathProtocolGuid, > - (VOID **) &ParentDevicePath, > - This->DriverBindingHandle, > - Controller, > - EFI_OPEN_PROTOCOL_BY_DRIVER > - ); > - if (EFI_ERROR (Status) && Status !=3D EFI_ALREADY_STARTED) { > - return Status; > - } > - > - // > - // Get Pci IO > - // > - Status =3D gBS->OpenProtocol ( > - Controller, > - &gEfiPciIoProtocolGuid, > - (VOID **) &PciIo, > - This->DriverBindingHandle, > - Controller, > - EFI_OPEN_PROTOCOL_BY_DRIVER > - ); > - > - if (EFI_ERROR (Status) && Status !=3D EFI_ALREADY_STARTED) { > - gBS->CloseProtocol ( > - Controller, > - &gEfiDevicePathProtocolGuid, > - This->DriverBindingHandle, > - Controller > - ); > - return Status; > - } > - > - if ((RemainingDevicePath !=3D NULL) && IsDevicePathEnd > (RemainingDevicePath)) { > - return EFI_SUCCESS; > - } > - > - DeviceGetList (&Devices, &Count); > - if (Devices =3D=3D NULL) { > - Status =3D EFI_OUT_OF_RESOURCES; > - goto Exit_Start; > - } > - HasCreated =3D AllocatePool (sizeof (BOOLEAN) * Count); > - ASSERT (HasCreated !=3D NULL); > - if (HasCreated =3D=3D NULL) { > - Status =3D EFI_OUT_OF_RESOURCES; > - goto Exit_Start; > - } > - RequestCreate =3D AllocatePool (sizeof (BOOLEAN) * Count); > - ASSERT (RequestCreate !=3D NULL); > - if (RequestCreate =3D=3D NULL) { > - Status =3D EFI_OUT_OF_RESOURCES; > - goto Exit_Start; > - } > - > - // > - // Assume no children has been created. > - // Assume the SIO interface hasn't been initialized. > - // > - ZeroMem (HasCreated, sizeof (BOOLEAN) * Count); > - > - if (Status =3D=3D EFI_ALREADY_STARTED) { > - for (Node =3D GetFirstNode (&mSioDevPool); > - !IsNull (&mSioDevPool, Node); > - Node =3D GetNextNode (&mSioDevPool, Node) > - ) { > - SioDev =3D CR (Node, SIO_DEV, Link, SIO_DEV_SIGNATURE); > - Status =3D gBS->HandleProtocol ( > - SioDev->PciHandle, > - &gEfiDevicePathProtocolGuid, > - (VOID **) &DevicePath > - ); > - ASSERT_EFI_ERROR (Status); > - > - // > - // See if they are under the same PCI to ISA Bridge > - // > - if (CompareMem (DevicePath, ParentDevicePath, GetDevicePathSize > (DevicePath)) =3D=3D 0) { > - for (Index =3D 0; Index < Count; Index++) { > - if (CompareMem (&SioDev->Device, &Devices[Index], sizeof > (EFI_SIO_ACPI_DEVICE_ID)) =3D=3D 0) { > - HasCreated[Index] =3D TRUE; > - break; > - } > - } > - } > - } > - } > - > - AcpiNode =3D (ACPI_HID_DEVICE_PATH *) RemainingDevicePath; > - for (Index =3D 0; Index < Count; Index++) { > - if ((AcpiNode =3D=3D NULL) || > - ((AcpiNode->HID =3D=3D Devices[Index].HID) && (AcpiNode->UID =3D= =3D > Devices[Index].UID)) > - ) { > - RequestCreate[Index] =3D TRUE; > - } else { > - RequestCreate[Index] =3D FALSE; > - } > - } > - > - for (Index =3D 0; Index < Count; Index++) { > - if (RequestCreate[Index] && !HasCreated[Index]) { > - SioCreateDevice (Controller, &Devices[Index], ParentDevicePath, Pc= iIo); > - } > - } > -Exit_Start: > - if (Devices !=3D NULL) { > - FreePool (Devices); > - } > - if (HasCreated !=3D NULL) { > - FreePool (HasCreated); > - } > - if (RequestCreate !=3D NULL) { > - FreePool (RequestCreate); > - } > - > - return Status; > -} > - > - > -/** > - Stop this driver on ControllerHandle. > - > - @param[in] This Protocol instance pointer. > - @param[in] Controller Handle of device to stop driver on > - @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. > If number of > - children is zero stop the entire bus dri= ver. > - @param[in] ChildHandleBuffer List of Child Handles to Stop. > - > - @retval EFI_SUCCESS This driver is removed ControllerHandle > - @retval other This driver was not removed from this de= vice > -**/ > -EFI_STATUS > -EFIAPI > -SioDriverStop ( > - IN EFI_DRIVER_BINDING_PROTOCOL *This, > - IN EFI_HANDLE Controller, > - IN UINTN NumberOfChildren, > - IN EFI_HANDLE *ChildHandleBuffer > - ) > -{ > - EFI_STATUS Status; > - UINTN Index; > - BOOLEAN AllChildrenStopped; > - > - if (NumberOfChildren =3D=3D 0) { > - gBS->CloseProtocol ( > - Controller, > - &gEfiDevicePathProtocolGuid, > - This->DriverBindingHandle, > - Controller > - ); > - gBS->CloseProtocol ( > - Controller, > - &gEfiPciIoProtocolGuid, > - This->DriverBindingHandle, > - Controller > - ); > - return EFI_SUCCESS; > - } > - > - AllChildrenStopped =3D TRUE; > - for (Index =3D 0; Index < NumberOfChildren; Index++) { > - Status =3D SioDestroyDevice (ChildHandleBuffer[Index]); > - if (EFI_ERROR (Status)) { > - AllChildrenStopped =3D FALSE; > - } > - } > - > - if (AllChildrenStopped) { > - return EFI_SUCCESS; > - } else { > - return EFI_DEVICE_ERROR; > - } > -} > diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioDriver.h > b/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioDriver.h > deleted file mode 100644 > index 2e75871f7f..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioDriver.h > +++ /dev/null > @@ -1,134 +0,0 @@ > -/** @file > - Header file for Driver Binding Protocol. > - > - Copyright (c) 2010 - 2019 Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#ifndef _SIO_DRIVER_H_ > -#define _SIO_DRIVER_H_ > - > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -// > -// Driver Consumed Protocol Prototypes > -// > -#include > -#include > -#include > - > -// > -// Driver Produced Protocol Prototypes > -// > -#include > - > - > -#include "SioChip.h" > -#include "SioService.h" > -#include "ComponentName.h" > - > -// > -// Global Variables definitions > -// > -extern EFI_DRIVER_BINDING_PROTOCOL mSioDriver; > -extern EFI_COMPONENT_NAME_PROTOCOL mSioComponentName; > -extern EFI_COMPONENT_NAME2_PROTOCOL mSioComponentName2; > - > -// > -// SIO device private data structure > -// > -#define SIO_DEV_SIGNATURE SIGNATURE_32 ('_', 'S', 'I', 'O') > - > -typedef struct _SIO_DEV { > - UINT32 Signature; > - EFI_HANDLE PciHandle; > - EFI_SIO_ACPI_DEVICE_ID Device; > - EFI_HANDLE Handle; > - EFI_SIO_PROTOCOL Sio; > - EFI_DEVICE_PATH_PROTOCOL *DevicePath; > - LIST_ENTRY Link; > -} SIO_DEV; > - > -#define SIO_DEV_FROM_THIS(a) CR (a, SIO_DEV, Sio, > SIO_DEV_SIGNATURE) > - > -// > -// Prototypes for Driver model protocol interface > -// > - > - > -/** > - Test to see if this driver supports Controller Handle. > - > - @param[in] This Protocol instance pointer. > - @param[in] Controller Handle of device to test > - @param[in] RemainingDevicePath Optional parameter use to pick a > specific child > - device to start. > - > - @retval EFI_SUCCESS This driver supports this device > - @retval EFI_ALREADY_STARTED This driver is already running on this > device > - @retval other This driver does not support this devi= ce > -**/ > -EFI_STATUS > -EFIAPI > -SioDriverSupported ( > - IN EFI_DRIVER_BINDING_PROTOCOL *This, > - IN EFI_HANDLE Controller, > - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath > - ); > - > - > -/** > - Start this driver on ControllerHandle. > - > - @param[in] This Protocol instance pointer. > - @param[in] Controller Handle of device to bind driver to > - @param[in] RemainingDevicePath Optional parameter use to pick a > specific child > - device to start. > - > - @retval EFI_SUCCESS This driver is added to ControllerHan= dle > - @retval EFI_ALREADY_STARTED This driver is already running on > ControllerHandle > - @retval other This driver does not support this dev= ice > -**/ > -EFI_STATUS > -EFIAPI > -SioDriverStart ( > - IN EFI_DRIVER_BINDING_PROTOCOL *This, > - IN EFI_HANDLE Controller, > - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath > - ); > - > - > -/** > - Stop this driver on ControllerHandle. > - > - @param[in] This Protocol instance pointer. > - @param[in] Controller Handle of device to stop driver on > - @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. > If number of > - children is zero stop the entire bus dri= ver. > - @param[in] ChildHandleBuffer List of Child Handles to Stop. > - > - @retval EFI_SUCCESS This driver is removed ControllerHandle > - @retval other This driver was not removed from this de= vice > -**/ > -EFI_STATUS > -EFIAPI > -SioDriverStop ( > - IN EFI_DRIVER_BINDING_PROTOCOL *This, > - IN EFI_HANDLE Controller, > - IN UINTN NumberOfChildren, > - IN EFI_HANDLE *ChildHandleBuffer > - ); > -#endif > diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioService.c > b/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioService.c > deleted file mode 100644 > index 379002b833..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioService.c > +++ /dev/null > @@ -1,249 +0,0 @@ > -/** @file > - Super I/O Interface implementation. > - > - Copyright (c) 2010 - 2019 Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#include "SioDriver.h" > - > - > -/** > - Provides an interface to get a list of the current resources consumed = by the > device in the ACPI > - Resource Descriptor format. > - > - GetResources() returns a list of resources currently consumed by the > device. The > - ResourceList is a pointer to the buffer containing resource descriptor= s for > the device. The > - descriptors are in the format of Small or Large ACPI resource descript= or as > defined by ACPI > - specification (2.0 & 3.0). The buffer of resource descriptors is termi= nated > with the 'End tag' > - resource descriptor. > - > - @param[in] This Indicates a pointer to the calling c= ontext. > - @param[out] ResourceList A pointer to an ACPI resource descri= ptor list > that defines the current resources > - used by the device. Type ACPI_RESOUR= CE_HEADER_PTR is > defined in the "Related > - Definitions" below. > - > - @retval EFI_SUCCESS The operation completed successfully > - @retval EFI_INVALID_PARAMETER ResourceList is NULL > -**/ > -EFI_STATUS > -EFIAPI > -SioGetResources ( > - IN CONST EFI_SIO_PROTOCOL *This, > - OUT ACPI_RESOURCE_HEADER_PTR *ResourceList > - ) > -{ > - SIO_DEV *SioDev; > - > - if (ResourceList =3D=3D NULL) { > - return EFI_INVALID_PARAMETER; > - } > - > - SioDev =3D SIO_DEV_FROM_THIS (This); > - > - return DeviceGetResources (&SioDev->Device, ResourceList); > -} > - > - > -/** > - Provides a collection of resource descriptor lists. Each resource desc= riptor > list in the collection > - defines a combination of resources that can potentially be used by the > device. > - > - @param[in] This Indicates a pointer to the calli= ng context. > - @param[out] ResourceCollection Collection of the resource descr= iptor > lists. > - > - @retval EFI_SUCCESS The operation completed successf= ully > - @retval EFI_INVALID_PARAMETER ResourceCollection is NULL > -**/ > -EFI_STATUS > -EFIAPI > -SioPossibleResources ( > - IN CONST EFI_SIO_PROTOCOL *This, > - OUT ACPI_RESOURCE_HEADER_PTR *ResourceCollection > - ) > -{ > - SIO_DEV *SioDev; > - > - if (ResourceCollection =3D=3D NULL) { > - return EFI_INVALID_PARAMETER; > - } > - > - SioDev =3D SIO_DEV_FROM_THIS (This); > - > - return DevicePossibleResources (&SioDev->Device, ResourceCollection); > -} > - > - > -/** > - Sets the resources for the device. > - > - @param[in] This Indicates a pointer to the calling c= ontext. > - @param[in] ResourceList Pointer to the ACPI resource descrip= tor list. > Type ACPI_RESOURCE_HEADER_PTR > - is defined in the "Related Definitio= ns" section of > - EFI_SIO_PROTOCOL.GetResources(). > - > - @retval EFI_SUCCESS The operation completed successfully > - @retval EFI_INVALID_PARAMETER ResourceList is invalid > - @retval EFI_ACCESS_DENIED Some of the resources in ResourceLis= t are > in use > -**/ > -EFI_STATUS > -EFIAPI > -SioSetResources ( > - IN CONST EFI_SIO_PROTOCOL *This, > - IN ACPI_RESOURCE_HEADER_PTR ResourceList > - ) > -{ > - SIO_DEV *SioDev; > - ACPI_RESOURCE_HEADER_PTR ResourcePtr; > - ACPI_RESOURCE_HEADER_PTR ResourceCollection; > - ACPI_RESOURCE_HEADER_PTR ResourcePtr2; > - BOOLEAN Found; > - > - ResourcePtr =3D ResourceList; > - SioDev =3D SIO_DEV_FROM_THIS (This); > - > - // > - // Check whether the resource is in the possible resource collection > - // > - DevicePossibleResources (&SioDev->Device, &ResourceCollection); > - > - while (ResourcePtr.SmallHeader->Byte !=3D ACPI_END_TAG_DESCRIPTOR) { > - > - Found =3D FALSE; > - ResourcePtr2 =3D ResourceCollection; > - while (ResourcePtr2.SmallHeader->Byte !=3D ACPI_END_TAG_DESCRIPTOR) > { > - if (ResourcePtr2.SmallHeader->Bits.Type =3D=3D 0) { > - // > - // Small Header > - // > - if (CompareMem ( > - ResourcePtr2.SmallHeader, > - ResourcePtr.SmallHeader, > - ResourcePtr2.SmallHeader->Bits.Length + sizeof > (*ResourcePtr2.SmallHeader) > - ) =3D=3D 0) { > - Found =3D TRUE; > - break; > - } > - > - ResourcePtr2.SmallHeader =3D (ACPI_SMALL_RESOURCE_HEADER *) > ((UINT8 *) ResourcePtr2.SmallHeader > - + ResourcePtr2.SmallHeader->Bits.Length > - + sizeof (*ResourcePtr2.SmallHeader)); > - > - } else { > - // > - // Large Header > - // > - if (CompareMem ( > - ResourcePtr2.LargeHeader, > - ResourcePtr.LargeHeader, > - ResourcePtr2.LargeHeader->Length + sizeof > (*ResourcePtr2.LargeHeader) > - ) =3D=3D 0) { > - Found =3D TRUE; > - break; > - } > - > - ResourcePtr2.LargeHeader =3D (ACPI_LARGE_RESOURCE_HEADER *) > ((UINT8 *) ResourcePtr2.LargeHeader > - + ResourcePtr2.LargeHeader->Length > - + sizeof (*ResourcePtr2.LargeHeader)); > - } > - } > - > - if (!Found) { > - return EFI_ACCESS_DENIED; > - } > - > - if (ResourcePtr.SmallHeader->Bits.Type =3D=3D 0) { > - ResourcePtr.SmallHeader =3D (ACPI_SMALL_RESOURCE_HEADER *) > ((UINT8 *) ResourcePtr.SmallHeader > - + ResourcePtr.SmallHeader->Bits.Length > - + sizeof (*ResourcePtr.SmallHeader)); > - } else { > - ResourcePtr.LargeHeader =3D (ACPI_LARGE_RESOURCE_HEADER *) > ((UINT8 *) ResourcePtr.LargeHeader > - + ResourcePtr.LargeHeader->Length > - + sizeof (*ResourcePtr.LargeHeader)); > - } > - } > - > - // > - // ResourceList can be set > - // > - return DeviceSetResources (&SioDev->Device, ResourceList); > -} > - > - > -/** > - Provides a low level access to the registers for the Super I/O. > - > - @param[in] This Indicates a pointer to the cal= ling context. > - @param[in] Write Specifies the type of the regi= ster operation. > If this parameter is TRUE, > - Value is interpreted as an inp= ut parameter and the > operation is a register write. > - If this parameter is FALSE, Va= lue is interpreted as an > output parameter and the > - operation is a register read. > - @param[in] ExitCfgMode Exit Configuration Mode Indica= tor. If this > parameter is set to TRUE, the > - Super I/O driver will turn off= configuration mode of the > Super I/O prior to returning > - from this function. If this pa= rameter is set to FALSE, the > Super I/O driver will > - leave Super I/O in the configu= ration mode. > - The Super I/O driver must trac= k the current state of the > Super I/O and enable the > - configuration mode of Super I/= O if necessary prior to > register access. > - @param[in] Register Register number. > - @param[in, out] Value If Write is TRUE, Value is a p= ointer to the > buffer containing the byte of data to be > - written to the Super I/O regis= ter. If Write is FALSE, > Value is a pointer to the > - destination buffer for the byt= e of data to be read from > the Super I/O register. > - > - @retval EFI_SUCCESS The operation completed succes= sfully > - @retval EFI_INVALID_PARAMETER The Value is NULL > - @retval EFI_INVALID_PARAMETER Invalid Register number > -**/ > -EFI_STATUS > -EFIAPI > -SioRegisterAccess ( > - IN CONST EFI_SIO_PROTOCOL *This, > - IN BOOLEAN Write, > - IN BOOLEAN ExitCfgMode, > - IN UINT8 Register, > - IN OUT UINT8 *Value > - ) > -{ > - if (Value =3D=3D NULL) { > - return EFI_INVALID_PARAMETER; > - } > - > - return EFI_SUCCESS; > -} > - > - > -/** > - Provides an interface for a table based programming of the Super I/O > registers. > - > - The Modify() function provides an interface for table based programmin= g > of the Super I/O > - registers. This function can be used to perform programming of multipl= e > Super I/O registers with a > - single function call. For each table entry, the Register is read, its = content is > bitwise ANDed with > - AndMask, and then ORed with OrMask before being written back to the > Register. The Super > - I/O driver must track the current state of the Super I/O and enable th= e > configuration mode of Super I/ > - O if necessary prior to table processing. Once the table is processed,= the > Super I/O device has to be > - returned to the original state. > - > - @param[in] This Indicates a pointer to the calling co= ntext. > - @param[in] Command A pointer to an array of > NumberOfCommands EFI_SIO_REGISTER_MODIFY > - structures. Each structure specifies = a single Super I/O > register modify operation. > - Type EFI_SIO_REGISTER_MODIFY is defin= ed in the > "Related Definitions" below. > - @param[in] NumberOfCommands Number of elements in the > Command array. > - > - @retval EFI_SUCCESS The operation completed successfully > - @retval EFI_INVALID_PARAMETER Command is NULL > -**/ > -EFI_STATUS > -EFIAPI > -SioModify ( > - IN CONST EFI_SIO_PROTOCOL *This, > - IN CONST EFI_SIO_REGISTER_MODIFY *Command, > - IN UINTN NumberOfCommands > - ) > -{ > - > - if (Command =3D=3D NULL) { > - return EFI_INVALID_PARAMETER; > - } > - > - return EFI_SUCCESS; > -} > diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioService.h > b/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioService.h > deleted file mode 100644 > index 6a8081dc6e..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioService.h > +++ /dev/null > @@ -1,143 +0,0 @@ > -/** @file > - Super I/O Interface function declarations. > - > - Copyright (c) 2010 - 2019 Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#ifndef _SIO_ACPI_H_ > -#define _SIO_ACPI_H_ > - > -// > -// Prototypes for the SIO protocol interface > -// > - > - > -/** > - Provides an interface to get a list of the current resources consumed = by the > device in the ACPI > - Resource Descriptor format. > - > - GetResources() returns a list of resources currently consumed by the > device. The > - ResourceList is a pointer to the buffer containing resource descriptor= s for > the device. The > - descriptors are in the format of Small or Large ACPI resource descript= or as > defined by ACPI > - specification (2.0 & 3.0). The buffer of resource descriptors is termi= nated > with the 'End tag' > - resource descriptor. > - > - @param[in] This Indicates a pointer to the calling= context. > - @param[out] ResourceList A pointer to an ACPI resource desc= riptor > list that defines the current resources > - used by the device. Type ACPI_RESO= URCE_HEADER_PTR > is defined in the "Related > - Definitions" below. > - > - @retval EFI_SUCCESS The operation completed successful= ly > - @retval EFI_INVALID_PARAMETER ResourceList is NULL > -**/ > -EFI_STATUS > -EFIAPI > -SioGetResources ( > - IN CONST EFI_SIO_PROTOCOL *This, > - OUT ACPI_RESOURCE_HEADER_PTR *ResourceList > - ); > - > - > -/** > - Sets the resources for the device. > - > - @param[in] This Indicates a pointer to the calling c= ontext. > - @param[in] ResourceList Pointer to the ACPI resource descrip= tor list. > Type ACPI_RESOURCE_HEADER_PTR > - is defined in the "Related Definitio= ns" section of > - EFI_SIO_PROTOCOL.GetResources(). > - > - @retval EFI_SUCCESS The operation completed successfully > - @retval EFI_INVALID_PARAMETER ResourceList is invalid > - @retval EFI_ACCESS_DENIED Some of the resources in ResourceLis= t are > in use > -**/ > -EFI_STATUS > -EFIAPI > -SioSetResources ( > - IN CONST EFI_SIO_PROTOCOL *This, > - IN ACPI_RESOURCE_HEADER_PTR ResourceList > - ); > - > - > -/** > - Provides a collection of resource descriptor lists. Each resource desc= riptor > list in the collection > - defines a combination of resources that can potentially be used by the > device. > - > - @param[in] This Indicates a pointer to the calli= ng context. > - @param[out] ResourceCollection Collection of the resource descr= iptor > lists. > - > - @retval EFI_SUCCESS The operation completed successf= ully > - @retval EFI_INVALID_PARAMETER ResourceCollection is NULL > -**/ > -EFI_STATUS > -EFIAPI > -SioPossibleResources ( > - IN CONST EFI_SIO_PROTOCOL *This, > - OUT ACPI_RESOURCE_HEADER_PTR *ResourceCollection > - ); > - > - > -/** > - Provides a low level access to the registers for the Super I/O. > - > - @param[in] This Indicates a pointer to the cal= ling context. > - @param[in] Write Specifies the type of the regi= ster operation. > If this parameter is TRUE, > - Value is interpreted as an inp= ut parameter and the > operation is a register write. > - If this parameter is FALSE, Va= lue is interpreted as an > output parameter and the > - operation is a register read. > - @param[in] ExitCfgMode Exit Configuration Mode Indica= tor. If this > parameter is set to TRUE, the > - Super I/O driver will turn off= configuration mode of the > Super I/O prior to returning > - from this function. If this pa= rameter is set to FALSE, the > Super I/O driver will > - leave Super I/O in the configu= ration mode. > - The Super I/O driver must trac= k the current state of the > Super I/O and enable the > - configuration mode of Super I/= O if necessary prior to > register access. > - @param[in] Register Register number. > - @param[in, out] Value If Write is TRUE, Value is a p= ointer to the > buffer containing the byte of data to be > - written to the Super I/O regis= ter. If Write is FALSE, > Value is a pointer to the > - destination buffer for the byt= e of data to be read from > the Super I/O register. > - > - @retval EFI_SUCCESS The operation completed succes= sfully > - @retval EFI_INVALID_PARAMETER The Value is NULL > - @retval EFI_INVALID_PARAMETER Invalid Register number > -**/ > -EFI_STATUS > -EFIAPI > -SioRegisterAccess ( > - IN CONST EFI_SIO_PROTOCOL *This, > - IN BOOLEAN Write, > - IN BOOLEAN ExitCfgMode, > - IN UINT8 Register, > - IN OUT UINT8 *Value > - ); > - > - > -/** > - Provides an interface for a table based programming of the Super I/O > registers. > - > - The Modify() function provides an interface for table based programmin= g > of the Super I/O > - registers. This function can be used to perform programming of multipl= e > Super I/O registers with a > - single function call. For each table entry, the Register is read, its = content is > bitwise ANDed with > - AndMask, and then ORed with OrMask before being written back to the > Register. The Super > - I/O driver must track the current state of the Super I/O and enable th= e > configuration mode of Super I/ > - O if necessary prior to table processing. Once the table is processed,= the > Super I/O device has to be > - returned to the original state. > - > - @param[in] This Indicates a pointer to the calling co= ntext. > - @param[in] Command A pointer to an array of > NumberOfCommands EFI_SIO_REGISTER_MODIFY > - structures. Each structure specifies = a single Super I/O > register modify operation. > - Type EFI_SIO_REGISTER_MODIFY is defin= ed in the > "Related Definitions" below. > - @param[in] NumberOfCommands Number of elements in the > Command array. > - > - @retval EFI_SUCCESS The operation completed successfully > - @retval EFI_INVALID_PARAMETER Command is NULL > -**/ > -EFI_STATUS > -EFIAPI > -SioModify ( > - IN CONST EFI_SIO_PROTOCOL *This, > - IN CONST EFI_SIO_REGISTER_MODIFY *Command, > - IN UINTN NumberOfCommands > - ); > - > -#endif > -- > 2.19.1.windows.1