From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykpip-0006DH-72 for qemu-devel@nongnu.org; Wed, 22 Apr 2015 04:09:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ykpil-0000Z2-7c for qemu-devel@nongnu.org; Wed, 22 Apr 2015 04:09:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykpil-0000Yu-06 for qemu-devel@nongnu.org; Wed, 22 Apr 2015 04:09:23 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3M89Lqu011522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 22 Apr 2015 04:09:21 -0400 Message-ID: <1429690157.14806.43.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Wed, 22 Apr 2015 10:09:17 +0200 In-Reply-To: <1429628650.21164.24.camel@nilsson.home.kraxel.org> References: <1429521560-2743-1-git-send-email-kraxel@redhat.com> <1429521560-2743-5-git-send-email-kraxel@redhat.com> <55365C33.2090101@redhat.com> <1429628650.21164.24.camel@nilsson.home.kraxel.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/6] [wip] tseg, part1, not (yet) tested List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, mst@redhat.com Hi, > tseg is just normal ram (yes, located at the end of memory), but (once > tseg is enabled) only cpus in smm mode are allowed to access it. > Likewise busmaster dma access is rejected, so non-smm code can't use the > sata controller to access this indirectly. Update: Seems tseg can be anywhere, there is a "tseg memory base" register @ 0xac in pci config space. Placing it at the end of memory is just what the bios is supposed to do by default. And it makes sense to place it there. This register contains the base address of TSEG DRAM memory. BIOS determines the base of TSEG memory by subtracting the TSEG size (PCI Device 0, offset 9Eh, bits 2:1) from graphics GTT stolen base (PCI Device 0, offset A8h, bits 31:20). Once D_LCK has been set, these bits becomes read only. "GTT stolen base" equals "top of below-4g memory" for us because we emulate the chipset variant without graphics in qemu. cheers, Gerd