|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] [HVMLOADER] built-in memcmp function uses not-ye
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx wrote on 11/29/2006
02:51:50 AM:
> On 29/11/06 4:15 am, "Stefan Berger" <stefanb@xxxxxxxxxx>
wrote:
>
> > it seems like the acpi/build.c function now uses the gcc
built-in
> > memcmp function. Unfortunately that one seems to generate some
code that
> > hits a not-yet implemented/emulated opcode. Instead of implementing
> > emultaion for that opcode I just copied the previously used memcmp
> > function from util.c into the build.c and renamed it to _memcmp
to avoid
> > linking problems.
>
> There's an easier fix. hvmloader/acpi/Makefile is missing -fno-builtin.
I'll
> apply a patch.
I had tried that, but it didn't help, either, and
memcmp got linked in. Maybe this fix here is ok?
--- build.c
2006-11-29 07:12:51.000000000 -0500
+++ build.c.new
2006-11-29 00:21:38.000000000 -0500
@@ -116,6 +116,7 @@ int construct_secondary_tables(uint8_t *
struct acpi_20_madt *madt;
struct acpi_20_tcpa *tcpa;
static const uint16_t tis_did_vid_rid[] = {0x0001, 0x0001,
0x0001};
+ uint16_t *mem16;
/* MADT. */
if ( (get_vcpu_nr() > 1) || get_apic_mode() )
@@ -126,8 +127,10 @@ int construct_secondary_tables(uint8_t *
}
/* TPM TCPA and SSDT. */
- if ( memcmp((char *)0xFED40F00, tis_did_vid_rid,
- sizeof(tis_did_vid_rid))
== 0 ) /* Probe for TIS interface. */
+ mem16 = (uint16_t *)0xFED40F00;
+ if (mem16[0] == tis_did_vid_rid[0] &&
+ mem16[1] == tis_did_vid_rid[1] &&
+ mem16[2] == tis_did_vid_rid[2])
{
memcpy(&buf[offset], AmlCode_TPM, sizeof(AmlCode_TPM));
table_ptrs[nr_tables++] = (unsigned long)&buf[offset];
Stefan
>
> Thanks,
> Keir
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|