From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web11.14560.1610479186766203379 for ; Tue, 12 Jan 2021 11:19:46 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=antDYixz; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610479185; 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=TjLnEX56g0PiI40WNl+1viwu313/HRYsLPIoeEqPwsc=; b=antDYixz7UKg/6wepkxoa67thETrpAGl3IQbuhvbEgajJW+4ZrWQ6hxxnYn639lUIO2H0F 8yVRi86jQ0OwEJ9PfvQVkGo0/zqiPR81A4bdmFL7vF3ZlIgieUjkR2DYnuxyfgOPLxLmT2 4cAAYHj9VNjV1XisB/4s96SyDyk7WjM= 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-526-DspxDoMPPWG79-YJM03tWQ-1; Tue, 12 Jan 2021 14:19:44 -0500 X-MC-Unique: DspxDoMPPWG79-YJM03tWQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 086971015947; Tue, 12 Jan 2021 19:19:43 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-67.ams2.redhat.com [10.36.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8345C6E522; Tue, 12 Jan 2021 19:19:41 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io Cc: Eric Dong , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Rahul Kumar , Ray Ni , Star Zeng Subject: [PATCH 2/3] UefiCpuPkg/CpuS3DataDxe: do not allocate useless register tables Date: Tue, 12 Jan 2021 20:19:33 +0100 Message-Id: <20210112191934.12459-3-lersek@redhat.com> In-Reply-To: <20210112191934.12459-1-lersek@redhat.com> References: <20210112191934.12459-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 Q3B1UzNEYXRhRHhlIGFsbG9jYXRlcyB0aGUgIlJlZ2lzdGVyVGFibGUiIGFuZCAiUHJlU21tSW5p dFJlZ2lzdGVyVGFibGUiCmFycmF5cyBpbiBBQ1BJX0NQVV9EQVRBIGp1c3Qgc28gZXZlcnkgcHJv Y2Vzc29yIGluIHRoZSBzeXN0ZW0gY2FuIGhhdmUgaXRzCm93biBlbXB0eSByZWdpc3RlciB0YWJs ZSwgbWF0Y2hlZCBieSBBUElDIElELiBUaGlzIGhhcyBuZXZlciBiZWVuIHVzZWZ1bAppbiBwcmFj dGljZS4KCkdpdmVuIGNvbW1pdCBlOTkyY2MzZjQ4NTkgKCJVZWZpQ3B1UGtnIFBpU21tQ3B1RHhl U21tOiBSZWR1Y2UgU01SQU0KY29uc3VtcHRpb24gaW4gQ3B1UzMuYyIsIDIwMjEtMDEtMTEpLCBz aW1wbHkgbGVhdmUgYm90aAoiQWNwaUNwdURhdGEtPlJlZ2lzdGVyVGFibGUiIGFuZCAiQWNwaUNw dURhdGEtPlByZVNtbUluaXRSZWdpc3RlclRhYmxlIgppbml0aWFsaXplZCB0byB0aGUgemVybyBh ZGRyZXNzLiBUaGl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