Received: from eggs.gnu.org ([2001:4830:134:3::10]:60364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7zsm-0006Uq-8w for qemu-devel@nongnu.org; Fri, 09 Aug 2013 23:30:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7zse-0005Vg-UO for qemu-devel@nongnu.org; Fri, 09 Aug 2013 23:30:24 -0400 Received: from mail-ve0-f169.google.com ([209.85.128.169]:37292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7zse-0005Un-Qv for qemu-devel@nongnu.org; Fri, 09 Aug 2013 23:30:16 -0400 Received: by mail-ve0-f169.google.com with SMTP id db10so4470891veb.28 for ; Fri, 09 Aug 2013 20:30:16 -0700 (PDT) Date: Fri, 9 Aug 2013 23:30:14 -0400 From: Kevin O'Connor Message-ID: <20130810033014.GB8766@morn.localdomain> References: <20130807145312.GA14308@redhat.com> <52034F73.4040904@redhat.com> <20130808083732.GB26837@redhat.com> <52035D88.6040002@redhat.com> <20130808095226.GB27298@redhat.com> <5203712C.8090202@redhat.com> <20130808141347.GA30200@redhat.com> <5203B1B7.5000102@redhat.com> <20130809041306.GB6869@morn.localdomain> <5204BA57.4010007@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5204BA57.4010007@redhat.com> Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH] acpi: hide 64-bit PCI hole for Windows XP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Paolo Bonzini , seabios@seabios.org, qemu-devel@nongnu.org, "Michael S. Tsirkin" On Fri, Aug 09, 2013 at 11:45:59AM +0200, Gerd Hoffmann wrote: > Hi, > > > Converting src/smm.c to use a runtime value isn't hard - just change > > the assembler from: "mov $" __stringify(PORT_ACPI_PM_BASE) " + 0x04, > > %dx\n" to: "mov 4(my_acpi_base), %dx\n" and make sure to define the > > global variable my_acpi_base as VARFSEG. > > The apm fix brought a ctl register variable we can use directly, so I > tried the attached patch, then got this: > > Linking out/rom.o > out/code32flat.o: In function `smm_relocation_end': > (.text.asm./home/kraxel/projects/seabios/src/smm.c.72+0x37): relocation > truncated to fit: R_386_16 against symbol `acpi_pm1a_cnt' defined in > .data.varfseg./home/kraxel/projects/seabios/src/acpi.c.21 section in > out/code32flat.o > out/code32flat.o: In function `smm_relocation_end': > (.text.asm./home/kraxel/projects/seabios/src/smm.c.72+0x46): relocation > truncated to fit: R_386_16 against symbol `acpi_pm1a_cnt' defined in > .data.varfseg./home/kraxel/projects/seabios/src/acpi.c.21 section in > out/code32flat.o > make: *** [out/rom.o] Error 1 Use "addr32 movw (acpi_pm1a_cnt), %dx" instead of "mov (acpi_pm1a_cnt), %dx". That said, having the smi handler read from the f-segment probably isn't the best thing to do (though it should work). Better would be to make a variable between smm_code_start/end and copy the value in as part of the smm init, though admittedly that is a bit more complicated. -Kevin