WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 08 of 19] tools: hvmloader: remove rombios_sz, just u

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 08 of 19] tools: hvmloader: remove rombios_sz, just use sizeof(rombios)
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 12 Apr 2011 12:29:07 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 12 Apr 2011 04:43:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1302607739@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1302607739@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1302601381 -3600
# Node ID bb3e40b2c856db6b0f3500625ff45a9d07377d1f
# Parent  70bf20a0b5462f3a1fa4213592bae076ec1a81ba
tools: hvmloader: remove rombios_sz, just use sizeof(rombios)

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 70bf20a0b546 -r bb3e40b2c856 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Tue Apr 12 10:33:58 2011 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c      Tue Apr 12 10:43:01 2011 +0100
@@ -585,7 +585,7 @@ static void init_vm86_tss(void)
 int main(void)
 {
     int option_rom_sz = 0, vgabios_sz = 0, etherboot_sz = 0;
-    int rombios_sz, smbios_sz;
+    int smbios_sz;
     uint32_t etherboot_phys_addr, option_rom_phys_addr, bios32_addr;
     struct bios_info *bios_info;
 
@@ -609,10 +609,7 @@ int main(void)
                                         SMBIOS_PHYSICAL_END);
 
     printf("Loading ROMBIOS ...\n");
-    rombios_sz = sizeof(rombios);
-    if ( rombios_sz > 0x10000 )
-        rombios_sz = 0x10000;
-    memcpy((void *)ROMBIOS_PHYSICAL_ADDRESS, rombios, rombios_sz);
+    memcpy((void *)ROMBIOS_PHYSICAL_ADDRESS, rombios, sizeof(rombios));
     bios32_addr = highbios_setup();
 
     if ( (hvm_info->nr_vcpus > 1) || hvm_info->apic_mode )
@@ -686,10 +683,9 @@ int main(void)
         printf(" %05x-%05x: SMBIOS tables\n",
                SMBIOS_PHYSICAL_ADDRESS,
                SMBIOS_PHYSICAL_ADDRESS + smbios_sz - 1);
-    if ( rombios_sz )
-        printf(" %05x-%05x: Main BIOS\n",
-               ROMBIOS_PHYSICAL_ADDRESS,
-               ROMBIOS_PHYSICAL_ADDRESS + rombios_sz - 1);
+    printf(" %05x-%05x: Main BIOS\n",
+           ROMBIOS_PHYSICAL_ADDRESS,
+           ROMBIOS_PHYSICAL_ADDRESS + sizeof(rombios) - 1);
 
     *E820_NR = build_e820_table(E820);
     dump_e820_table(E820, *E820_NR);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>