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.web09.12945.1611071695379241745 for ; Tue, 19 Jan 2021 07:54:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DDYvwZi9; 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=1611071694; 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=WBWFX2moqI3ei1AXp6eY3gJ356kLDRB5aMAtrhOjvbs=; b=DDYvwZi9p+aotYlw69O1vpWD8u2Ym1ZhFCZdFt21wFu6BgZVSVr1PlPILT/7Ah6LWXmrLa k7uf4vUSA+IS9wvibBSnslFgYHy27gayetiW0zESek6MgUbGOch/EfCmLqE1MWY9F018Nc l+lD31yxHcSMvo5GYm/NYq4L43N2FWk= 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-578-av2DEKd7MTGl9n1fjwSm3w-1; Tue, 19 Jan 2021 10:54:52 -0500 X-MC-Unique: av2DEKd7MTGl9n1fjwSm3w-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 75B80800D62; Tue, 19 Jan 2021 15:54:51 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-176.ams2.redhat.com [10.36.114.176]) by smtp.corp.redhat.com (Postfix) with ESMTP id 02DBF614ED; Tue, 19 Jan 2021 15:54:49 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Eric Dong , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Rahul Kumar , Ray Ni , Star Zeng Subject: [PATCH v2 3/4] UefiCpuPkg/CpuS3DataDxe: do not allocate useless register tables Date: Tue, 19 Jan 2021 16:54:39 +0100 Message-Id: <20210119155440.2262-4-lersek@redhat.com> In-Reply-To: <20210119155440.2262-1-lersek@redhat.com> References: <20210119155440.2262-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 ZGRyZX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A9IE9sZEFjcGlDcHVEYXRhLT5QcmVTbW1Jbml0UmVn aXN0ZXJUYWJsZTsNCiAgICAgQWNwaUNwdURhdGEtPkFwTG9jYXRpb24gICAgICAgICAgICAgID0g T2xkQWNwaUNwdURhdGEtPkFwTG9jYXRpb247DQogICAgIENvcHlNZW0gKCZBY3BpQ3B1RGF0YS0+ Q3B1U3RhdHVzLCAmT2xkQWNwaUNwdURhdGEtPkNwdVN0YXR1cywgc2l6ZW9mIChDUFVfU1RBVFVT X0lORk9STUFUSU9OKSk7DQotICB9IGVsc2Ugew0KLSAgICAvLw0KLSAgICAvLyBBbGxvY2F0ZSBi dWZmZXIgZm9yIGVtcHR5IFJlZ2lzdGVyVGFibGUgYW5kIFByZVNtbUluaXRSZWdpc3RlclRhYmxl IGZvciBhbGwgQ1BVcw0KLSAgICAvLw0KLSAgICBUYWJsZVNpemUgPSAyICogTnVtYmVyT2ZDcHVz ICogc2l6ZW9mIChDUFVfUkVHSVNURVJfVEFCTEUpOw0KLSAgICBSZWdpc3RlclRhYmxlID0gKENQ VV9SRUdJU1RFUl9UQUJMRSAqKUFsbG9jYXRlWmVyb1BhZ2VzIChUYWJsZVNpemUpOw0KLSAgICBB U1NFUlQgKFJlZ2lzdGVyVGFibGUgIT0gTlVMTCk7DQotDQotICAgIGZvciAoSW5kZXggPSAwOyBJ bmRleCA8IE51bWJlck9mQ3B1czsgSW5kZXgrKykgew0KLSAgICAgIFN0YXR1cyA9IE1wU2Vydmlj ZXMtPkdldFByb2Nlc3NvckluZm8gKA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgIE1wU2Vy dmljZXMsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5kZXgsDQotICAgICAgICAgICAg ICAgICAgICAgICAgICAgJlByb2Nlc3NvckluZm9CdWZmZXINCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICApOw0KLSAgICAgIEFTU0VSVF9FRklfRVJST1IgKFN0YXR1cyk7DQotDQotICAgICAg UmVnaXN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