From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web12.68.1587139359463606710 for ; Fri, 17 Apr 2020 09:02:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KW6y3ARH; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587139358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rD3iFXJ0lF6AapMDbwS33tEoGxRt5tFPA2NB0ubgA4U=; b=KW6y3ARHI2ipZWw6+vtVlg4I6c2Rtgwhs6nc3IkKsKRfZ44lCugaUSgjAisOsSreoMVspL 3AfQ7Frua/3mOL1uAuj6z3D4Lvrb4gQFBt4rQBhyscYfhOv1MVyasDXnAE416UFJ1PRISg 9SbBlPJ0bQ/Zz9lUu2sReAtX4/34drM= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-239--Urbr0uoNh6SkXH1udGBgg-1; Fri, 17 Apr 2020 12:02:36 -0400 X-MC-Unique: -Urbr0uoNh6SkXH1udGBgg-1 Received: by mail-ed1-f72.google.com with SMTP id v18so921639edr.15 for ; Fri, 17 Apr 2020 09:02:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1WdWfJS8sV5OyLfH8v3MHYOWIMIWRxBLUvPTg4r56KE=; b=BxYwSNyKSjIjye0y2st/Bv1SIHHh7ghvE14dHq18lR0XvovAB7J636WPcuNuxhMi4w RPjz9lDfAT1GwWE8UtPfoznFop009aoV5xtnbyWFogUZKZBTO4Kl09CxX7NFgqvfNlwD IxB74m3UkjLG8rXOk2ZULD+yERXJT6qYnHgX1mF0VHkrikjfG9LqXvgN0MZSNrJPJOlK 7Ki9Ch/lExxl40Bc+qpCbCo9qJkPxr/B3EMyqd2T/ulW0xtcjmYoBfUzvSdlh33KRMLr wTj70Wf+4LmWY+NNUrcxzUyXvZ5zw6bBgMp3YkA2TrHhAV5iOCe7KmUjGOpxcFQHvXLv 40kg== X-Gm-Message-State: AGi0PuYZlLTGu4C9nNNzcXBPF/+an5DBLtbNDy+Yy/eERLj4Muhh2arf s/75zYVb1Bkt6Fd/XReuEDRhoRQd2dINMctQF5LTZe9a4yQoDR1RPizqMWvZqT+y27ZAaUC8lB0 IjFh6MnqsbWc6eg== X-Received: by 2002:a17:906:7486:: with SMTP id e6mr3809470ejl.181.1587139355614; Fri, 17 Apr 2020 09:02:35 -0700 (PDT) X-Google-Smtp-Source: APiQypLhbQC3BimyrAQACZSA3LqbZcDKQkAvV1NHMfFg/qbWxBSRnsMLn5jEsdPJgkch/XvkVGodjw== X-Received: by 2002:a17:906:7486:: with SMTP id e6mr3809445ejl.181.1587139355381; Fri, 17 Apr 2020 09:02:35 -0700 (PDT) Return-Path: Received: from [192.168.1.39] (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id z17sm447699ejw.52.2020.04.17.09.02.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Apr 2020 09:02:34 -0700 (PDT) Subject: Re: [PATCH 2/6] OvmfPkg/ResetSystemLib: clean up library dependencies To: Laszlo Ersek , edk2-devel-groups-io Cc: Ard Biesheuvel , Jordan Justen , Rebecca Cran References: <20200417153751.7110-1-lersek@redhat.com> <20200417153751.7110-3-lersek@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <828d4d80-f36b-4957-a53c-ea7569b40ee5@redhat.com> Date: Fri, 17 Apr 2020 18:02:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200417153751.7110-3-lersek@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 4/17/20 5:37 PM, Laszlo Ersek wrote: > Annotate the #include directives with the interfaces that this lib > instance needs from the included lib class headers. This will help us kee= p > the #include set minimal, when we move code around later. >=20 > While at it, synchronize the [LibraryClasses] section with the #include > directives -- list BaseLib. >=20 > Also #include the ResetSystemLib class header, which declares the > interfaces that this lib instance implements. >=20 > This forces us to spell out the "MdeModulePkg.dec" dependency too, under > [Packages]. >=20 > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Philippe Mathieu-Daud=C3=A9 > Cc: Rebecca Cran > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2675 > Signed-off-by: Laszlo Ersek > --- > OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf | 2 ++ > OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c | 15 ++++++++------- > 2 files changed, 10 insertions(+), 7 deletions(-) >=20 > diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf b/OvmfPkg/= Library/ResetSystemLib/ResetSystemLib.inf > index 063dc49f2453..af20f516c035 100644 > --- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf > +++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf > @@ -25,10 +25,12 @@ [Sources] > ResetSystemLib.c > =20 > [Packages] > + MdeModulePkg/MdeModulePkg.dec > MdePkg/MdePkg.dec > OvmfPkg/OvmfPkg.dec > =20 > [LibraryClasses] > + BaseLib > DebugLib > IoLib > PciLib > diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c b/OvmfPkg/Li= brary/ResetSystemLib/ResetSystemLib.c > index b3abda80e75a..23816183a953 100644 > --- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c > +++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c > @@ -6,14 +6,15 @@ > =20 > **/ > =20 > -#include > +#include // BIT1 > =20 > -#include > -#include > -#include > -#include > -#include > -#include > +#include // CpuDeadLoop() > +#include // ASSERT() > +#include // IoWrite8() > +#include // PciRead16() > +#include // ResetCold() > +#include // MicroSecondDelay() > +#include // OVMF_HOSTBRIDGE_DID > =20 > VOID > AcpiPmControl ( >=20 Reviewed-by: Philippe Mathieu-Daude