ia64/xen-unstable

changeset 13759:6d8a099a152d

ia64: Use memcpy() to fill ACPI identifier fields.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author Keir Fraser <keir@xensource.com>
date Tue Jan 30 17:39:54 2007 +0000 (2007-01-30)
parents 749c7d8e4514
children fa8843d22450
files xen/arch/ia64/xen/dom_fw.c
line diff
     1.1 --- a/xen/arch/ia64/xen/dom_fw.c	Tue Jan 30 16:55:51 2007 +0000
     1.2 +++ b/xen/arch/ia64/xen/dom_fw.c	Tue Jan 30 17:39:54 2007 +0000
     1.3 @@ -337,9 +337,9 @@ dom_fw_fake_acpi(struct domain *d, struc
     1.4  	/* XSDT points to both the FADT and the MADT, so add one entry */
     1.5  	xsdt->length = sizeof(struct xsdt_descriptor_rev2) + sizeof(u64);
     1.6  	xsdt->revision = 1;
     1.7 -	safe_strcpy(xsdt->oem_id, "XEN");
     1.8 -	safe_strcpy(xsdt->oem_table_id, "Xen/ia64");
     1.9 -	safe_strcpy(xsdt->asl_compiler_id, "XEN");
    1.10 +	memcpy(xsdt->oem_id, "XEN", 3);
    1.11 +	memcpy(xsdt->oem_table_id, "Xen/ia64", 8);
    1.12 +	memcpy(xsdt->asl_compiler_id, "XEN", 3);
    1.13  	xsdt->asl_compiler_revision = (xen_major_version() << 16) |
    1.14  		xen_minor_version();
    1.15  
    1.16 @@ -352,9 +352,9 @@ dom_fw_fake_acpi(struct domain *d, struc
    1.17  	memcpy(fadt->signature, FADT_SIG, sizeof(fadt->signature));
    1.18  	fadt->length = sizeof(struct fadt_descriptor_rev2);
    1.19  	fadt->revision = FADT2_REVISION_ID;
    1.20 -	safe_strcpy(fadt->oem_id, "XEN");
    1.21 -	safe_strcpy(fadt->oem_table_id, "Xen/ia64");
    1.22 -	safe_strcpy(fadt->asl_compiler_id, "XEN");
    1.23 +	memcpy(fadt->oem_id, "XEN", 3);
    1.24 +	memcpy(fadt->oem_table_id, "Xen/ia64", 8);
    1.25 +	memcpy(fadt->asl_compiler_id, "XEN", 3);
    1.26  	fadt->asl_compiler_revision = (xen_major_version() << 16) |
    1.27  		xen_minor_version();
    1.28  
    1.29 @@ -386,8 +386,8 @@ dom_fw_fake_acpi(struct domain *d, struc
    1.30  	fadt->checksum = generate_acpi_checksum(fadt, fadt->length);
    1.31  
    1.32  	/* setup RSDP */
    1.33 -	safe_strcpy(rsdp->signature, RSDP_SIG);
    1.34 -	safe_strcpy(rsdp->oem_id, "XEN");
    1.35 +	memcpy(rsdp->signature, RSDP_SIG, strlen(RSDP_SIG));
    1.36 +	memcpy(rsdp->oem_id, "XEN", 3);
    1.37  	rsdp->revision = 2; /* ACPI 2.0 includes XSDT */
    1.38  	rsdp->length = sizeof(struct acpi20_table_rsdp);
    1.39  	rsdp->xsdt_address = ACPI_TABLE_MPA(xsdt);
    1.40 @@ -397,11 +397,11 @@ dom_fw_fake_acpi(struct domain *d, struc
    1.41  	rsdp->ext_checksum = generate_acpi_checksum(rsdp, rsdp->length);
    1.42  
    1.43  	/* setup DSDT with trivial namespace. */ 
    1.44 -	safe_strcpy(dsdt->signature, DSDT_SIG);
    1.45 +	memcpy(dsdt->signature, DSDT_SIG, strlen(DSDT_SIG));
    1.46  	dsdt->revision = 1;
    1.47 -	safe_strcpy(dsdt->oem_id, "XEN");
    1.48 -	safe_strcpy(dsdt->oem_table_id, "Xen/ia64");
    1.49 -	safe_strcpy(dsdt->asl_compiler_id, "XEN");
    1.50 +	memcpy(dsdt->oem_id, "XEN", 3);
    1.51 +	memcpy(dsdt->oem_table_id, "Xen/ia64", 8);
    1.52 +	memcpy(dsdt->asl_compiler_id, "XEN", 3);
    1.53  	dsdt->asl_compiler_revision = (xen_major_version() << 16) |
    1.54  		xen_minor_version();
    1.55  
    1.56 @@ -439,9 +439,9 @@ dom_fw_fake_acpi(struct domain *d, struc
    1.57  	/* setup MADT */
    1.58  	memcpy(madt->header.signature, APIC_SIG, sizeof(madt->header.signature));
    1.59  	madt->header.revision = 2;
    1.60 -	safe_strcpy(madt->header.oem_id, "XEN");
    1.61 -	safe_strcpy(madt->header.oem_table_id, "Xen/ia64");
    1.62 -	safe_strcpy(madt->header.asl_compiler_id, "XEN");
    1.63 +	memcpy(madt->header.oem_id, "XEN", 3);
    1.64 +	memcpy(madt->header.oem_table_id, "Xen/ia64", 8);
    1.65 +	memcpy(madt->header.asl_compiler_id, "XEN", 3);
    1.66  	madt->header.asl_compiler_revision = (xen_major_version() << 16) |
    1.67  		xen_minor_version();
    1.68  
    1.69 @@ -760,8 +760,8 @@ dom_fw_init(struct domain *d,
    1.70  	tables->sal_systab.sal_rev_major = 0;
    1.71  	tables->sal_systab.entry_count = 2;
    1.72  
    1.73 -	safe_strcpy((char *)tables->sal_systab.oem_id, "Xen/ia64");
    1.74 -	safe_strcpy((char *)tables->sal_systab.product_id, "Xen/ia64");
    1.75 +	memcpy((char *)tables->sal_systab.oem_id, "Xen/ia64", 8);
    1.76 +	memcpy((char *)tables->sal_systab.product_id, "Xen/ia64", 8);
    1.77  
    1.78  	/* PAL entry point: */
    1.79  	tables->sal_ed.type = SAL_DESC_ENTRY_POINT;