From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web12.3732.1587137887076471862 for ; Fri, 17 Apr 2020 08:38:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z63WtNSK; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587137886; 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=L1NvgZnGIZwm2yPj93F1hxIKsCXs1zwGJoDgJhAvK/M=; b=Z63WtNSK0euN/yPBCbwo80CrqmpXZa0EiAZUQ9iPtcSZznFDWCUrQSSAfJS6oVpQ7iqn1X +SU08ZLVnRVBUG4OmNBvaVGRhtFSpSrjrFPVVkFQTYSybar/pQQ+MeQoMNzPmBmpZKo7Ip KOImGXkhbM/tAxkGel85L5W1/wYWKx8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-386-V3y_wOxkOAatl98xbx8GNA-1; Fri, 17 Apr 2020 11:38:04 -0400 X-MC-Unique: V3y_wOxkOAatl98xbx8GNA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6A6E0801E57; Fri, 17 Apr 2020 15:38:03 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-253.ams2.redhat.com [10.36.113.253]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1CCB26EF91; Fri, 17 Apr 2020 15:38:01 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Ard Biesheuvel , Jordan Justen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Rebecca Cran Subject: [PATCH 4/6] OvmfPkg/ResetSystemLib: factor out ResetShutdown() Date: Fri, 17 Apr 2020 17:37:49 +0200 Message-Id: <20200417153751.7110-5-lersek@redhat.com> In-Reply-To: <20200417153751.7110-1-lersek@redhat.com> References: <20200417153751.7110-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 TW92ZSB0aGUgUmVzZXRTaHV0ZG93bigpIGRlZmluaXRpb24gdG8gaXRzIG93biBmaWxlLiBUaGlz IHdpbGwgaGVscCB1cwppbnRyb2R1Y2U6CgotIGEgbmV3IGxpYnJhcnkgaW5zdGFuY2UgdGhhdCBp cyBub3QgYnJva2VuIGluIHJ1bnRpbWUgbW9kdWxlcyAodGhlCiAgY3VycmVudCBsaWJyYXJ5IGlu c3RhbmNlIGlzIGJyb2tlbiBpbiBydW50aW1lIG1vZHVsZXMpLAoKLSBhbm90aGVyIG5ldyBsaWJy YXJ5IGluc3RhbmNlIGZvciBiaHl2ZSBzdXBwb3J0LgoKV2hpbGUgYXQgaXQsIHNxdWFzaCBBY3Bp UG1Db250cm9sKCkgaW50byBSZXNldFNodXRkb3duKCksIG9wZW4tY29kaW5nClN1c3BlbmRUeXBl PTAuIFRoaXMgaXMganVzdGlmaWVkIGJlY2F1c2Ugd2UndmUgaGFkIG5vIG90aGVyIGNhbGxlcnMg Zm9yCkFjcGlQbUNvbnRyb2woKSBzaW5jZSBjb21taXQgMmQ5OTUwYTJiZmY4ICgiT3ZtZlBrZzog cmVtb3ZlCkVudGVyUzNXaXRoSW1tZWRpYXRlV2FrZSAoKSBmcm9tIFJlc2V0U3lzdGVtT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