From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web12.604.1580334271962940484 for ; Wed, 29 Jan 2020 13:44:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=htkoZMZD; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580334271; 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=mnb1toRKBoMIfO6jTTldb4v45eImMXNJx/9zs3BZeo8=; b=htkoZMZDEtdZ9/0L8/XOYoFwf+wgcGpR620pul3wrn8da/gbHISN6bvoIWEbK0mXqqPynw mXFjHc8km5iWefrP4SJfhigukPnSEgi04XeBREGXVh/oB4PSk6ixss/ixP/ZgsQ1z4ynvo s3BxsrRoUVOlJOGd8z27tClrkwkYLkI= 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-59-LYxUjlu_PB6yWebQak3rlA-1; Wed, 29 Jan 2020 16:44:27 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4AAFE107ACC5; Wed, 29 Jan 2020 21:44:26 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-32.ams2.redhat.com [10.36.116.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5997B5DA75; Wed, 29 Jan 2020 21:44:25 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Ard Biesheuvel , Jordan Justen Subject: [PATCH v2 07/11] OvmfPkg/PlatformPei: reserve the SMRAM at the default SMBASE, if it exists Date: Wed, 29 Jan 2020 22:44:08 +0100 Message-Id: <20200129214412.2361-8-lersek@redhat.com> In-Reply-To: <20200129214412.2361-1-lersek@redhat.com> References: <20200129214412.2361-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: LYxUjlu_PB6yWebQak3rlA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: base64 VGhlIDEyOEtCIFNNUkFNIGF0IHRoZSBkZWZhdWx0IFNNQkFTRSB3aWxsIGJlIHVzZWQgZm9yIHBy b3RlY3RpbmcgdGhlCmluaXRpYWwgU01JIGhhbmRsZXIgZm9yIGhvdC1wbHVnZ2VkIFZDUFVzLiBB ZnRlciBwbGF0Zm9ybSByZXNldCwgdGhlIFNNUkFNCmluIHF1ZXN0aW9uIGlzIG9wZW4gKGFuZCBs b29rcyBqdXN0IGxpa2UgUkFNKS4gV2hlbiBCRFMgc2lnbmFscwpFRklfRFhFX01NX1JFQURZX1RP X0xPQ0tfUFJPVE9DT0wgKGFuZCBzbyBUU0VHIGlzIGxvY2tlZCBkb3duKSwgd2UncmUKZ29pbmcg dG8gbG9jayB0aGUgU01SQU0gYXQgdGhlIGRlZmF1bHQgU01CQVNFIHRvby4KCkZvciB0aGlzLCB3 ZSBoYXZlIHRvIHJlc2VydmUgc2FpZCBTTVJBTSBhcmVhIGFzIGVhcmx5IGFzIHBvc3NpYmxlLCBm cm9tCmNvbXBvbmVudHMgaW4gUEVJLCBEWEUsIGFuZCBPUyBydW50aW1lLgoKKiBRZW11SW5pdGlh bGl6ZVJhbSgpIGN1cnJlbnRseSBwcm9kdWNlcyBhIHNpbmdsZSByZXNvdXJjZSBkZXNjcmlwdG9y IEhPQiwKICBmb3IgZXhwb3NpbmcgdGhlIHN5c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