From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com []) by mx.groups.io with SMTP id smtpd.web11.32337.1618234230537835132 for ; Mon, 12 Apr 2021 06:30:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@citrix.com header.s=securemail header.b=DL1dxKkN; spf=softfail (domain: citrix.com, ip: , mailfrom: anthony.perard@citrix.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1618234230; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YMwvpxjol+5XMA2+kpnSOFwEAYxNgKgPugLl5J8fKTA=; b=DL1dxKkND6JlV5jxCcpiqG+1YNk7UMwtenpAhNreBJUx4IIfCqsjQdhG mm6LLXbftMebJdMgId3VrGJNL0LcvA7OPWbpERw69wk0QlwBxdGYdLDkf OppfUPHW15OeFJsSfwBC6YDRfiAdp4G53rkUcnt1z36wY/UhsJGPi8PvF o=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: cBmtvDv21tXItbUsYqKtim7utUFFFwb5H9VT4Z5BcR2sMNrSA16OQ/BWAWCqrDN+fDjGNqkknV O77ifgn/z5AwO8Si0Q6gAspg2Oyy5oIWXaeO3R8uprQkghj4DY7/crFNhPWqIOFPMIUMlYAx1S uIVNruyt7xmQa4QNeZOMgnQo0MoMmP41qxjN9McKkENtRYN4P7PXZsrxVcwqarBzNkEQFAVBr2 SiVYCKkg2vIYKfoJ/wPAxEUO9nxaGxL7GZcXXF9YKxXKp8leFauLqndfOG42IFJEX5mH/0CKSK YSw= X-SBRS: 4.0 X-MesageID: 41388431 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:YviZnKyL9o/2HgrWLQfPKrPwr71zdoIgy1knxilNYDZ+G/b2q+ mFmvMH2RjozAsLUHY7ltyafIWGS3XQ9Zl6iLNhW4uKdg/gpWeuMcVe/ZLvqgeQfBHW2+ZB2c 5bEpRWJ8b3CTFB4PrSwA79KNo4xcnCzabAv5a9815IbSVHL55t9B14DAHzKDwTeCBjCYAiHJ SRouprzgDBRV0tYs62BmYIUoH4zrWh/q7OWhIICwUq7wODl1qTmdvHOiOVwwsEVHd3yaoimF K16jDR3LmpsP2w13bnuVP70pI+orfc4+oGIMSNj8QPQw+c6TqVWA== X-IronPort-AV: E=Sophos;i="5.82,216,1613451600"; d="scan'208";a="41388431" From: "Anthony PERARD" To: CC: Laszlo Ersek , Jordan Justen , Ard Biesheuvel , , Anthony PERARD , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v3 6/7] OvmfPkg/XenPlatformPei: Calibrate APIC timer frequency Date: Mon, 12 Apr 2021 14:30:02 +0100 Message-ID: <20210412133003.146438-7-anthony.perard@citrix.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412133003.146438-1-anthony.perard@citrix.com> References: <20210412133003.146438-1-anthony.perard@citrix.com> MIME-Version: 1.0 Return-Path: anthony.perard@citrix.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 Q2FsY3VsYXRlIHRoZSBmcmVxdWVuY3kgb2YgdGhlIEFQSUMgdGltZXIgdGhhdCBYZW4gcHJvdmlk ZXMuCgpFdmVuIHRob3VnaCB0aGUgZnJlcXVlbmN5IGlzIGN1cnJlbnRseSBoYXJkLWNvZGVkLCBp dCBpc24ndCBwYXJ0IG9mCnRoZSBwdWJsaWMgQUJJIHRoYXQgWGVuIHByb3ZpZGVzIGFuZCB0aHVz IG1heSBjaGFuZ2UgYXQgYW55IHRpbWUuIE9WTUYKbmVlZHMgdG8gZGV0ZXJtaW5lIHRoZSBmcmVx dWVuY3kgYnkgYW4gb3RoZXIgbWVhbi4KCkZvcnR1bmF0ZWx5LCBYZW4gcHJvdmlkZXMgYSB3YXkg dG8gZGV0ZXJtaW5lc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