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-changelog

[Xen-changelog] [xen-unstable] tools: hvmloader: remove rombios_sz, just

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools: hvmloader: remove rombios_sz, just use sizeof(rombios)
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Wed, 13 Apr 2011 01:05:15 +0100
Delivery-date: Tue, 12 Apr 2011 17:07:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1302612049 -3600
# Node ID 95746ab3b1e4a989c98817bbf3206393f852b681
# Parent  739f7f80273e41b439aa68be69da813f6de8a6cc
tools: hvmloader: remove rombios_sz, just use sizeof(rombios)

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 739f7f80273e -r 95746ab3b1e4 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Tue Apr 12 13:39:56 2011 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c      Tue Apr 12 13:40:49 2011 +0100
@@ -585,7 +585,7 @@
 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 @@
                                         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 @@
         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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools: hvmloader: remove rombios_sz, just use sizeof(rombios), Xen patchbot-unstable <=