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] [1/2] replace e820 from 0xe0000 to oxeb000

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [Patch] [1/2] replace e820 from 0xe0000 to oxeb000
From: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Date: Mon, 05 Jan 2009 23:29:03 +0900
Delivery-date: Mon, 05 Jan 2009 06:30:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4962180C.8050606@xxxxxxxxxxxxxx>
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: <4962180C.8050606@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.18 (X11/20081119)
Hi,

This patch replaces e820 from 0xe0000 to oxeb000.

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>

Best Regards,

Akio Takebe

diff -r e2f36d066b7b tools/firmware/hvmloader/config.h
--- a/tools/firmware/hvmloader/config.h Mon Dec 22 13:48:40 2008 +0000
+++ b/tools/firmware/hvmloader/config.h Mon Jan 05 22:55:35 2009 +0900
@@ -26,6 +26,7 @@
 #define SMBIOS_PHYSICAL_ADDRESS       0x000E9000
 #define SMBIOS_MAXIMUM_SIZE           0x00001000
 #define ACPI_PHYSICAL_ADDRESS         0x000EA000
+#define E820_PHYSICAL_ADDRESS         0x000EB000
 #define ROMBIOS_PHYSICAL_ADDRESS      0x000F0000
 #define SCRATCH_PHYSICAL_ADDRESS      0x00010000
 
diff -r e2f36d066b7b tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Mon Dec 22 13:48:40 2008 +0000
+++ b/tools/firmware/rombios/rombios.c  Mon Jan 05 22:55:35 2009 +0900
@@ -1409,10 +1409,11 @@
 {
   Bit8u nr_entries = read_byte(0x9000, 0x1e8);
   Bit32u base_mem;
+  Bit16u e820_seg=E820_PHYSICAL_ADDRESS>>4;
   if (nr_entries > 32)
        nr_entries = 32;
-  write_word(0xe000, 0x8, nr_entries);
-  memcpyb(0xe000, 0x10, 0x9000, 0x2d0, nr_entries * 0x14);
+  write_word(e820_seg, 0x8, nr_entries);
+  memcpyb(e820_seg, 0x10, 0x9000, 0x2d0, nr_entries * 0x14);
   /* Report the proper base memory size at address 0x0413: otherwise
    * non-e820 code will clobber things if BASE_MEM_IN_K is bigger than
    * the first e820 entry.  Get the size by reading the second 64bit 
@@ -4669,7 +4670,8 @@
         {
 #ifdef HVMASSIST
        case 0x20: {
-            Bit16u e820_table_size = read_word(0xe000, 0x8) * 0x14;
+            Bit16u e820_seg=E820_PHYSICAL_ADDRESS>>4;
+            Bit16u e820_table_size = read_word(e820_seg, 0x8) * 0x14;
 
             if (regs.u.r32.edx != 0x534D4150) /* SMAP */
                 goto int15_unimplemented;
@@ -4677,7 +4679,7 @@
             if ((regs.u.r16.bx / 0x14) * 0x14 == regs.u.r16.bx) {
                 if (regs.u.r16.bx + 0x14 <= e820_table_size)
                     memcpyb(ES, regs.u.r16.di,
-                            0xe000, 0x10 + regs.u.r16.bx, 0x14);
+                            e820_seg, 0x10 + regs.u.r16.bx, 0x14);
                 regs.u.r32.ebx += 0x14;
                 if ((regs.u.r32.ebx + 0x14 - 1) > e820_table_size)
                     regs.u.r32.ebx = 0;
@@ -4685,8 +4687,8 @@
                 Bit32u base, type;
                 Bit16u off;
                 for (off = 0; off < e820_table_size; off += 0x14) {
-                    base = read_dword(0xe000, 0x10 + off);
-                    type = read_dword(0xe000, 0x20 + off);
+                    base = read_dword(e820_seg, 0x10 + off);
+                    type = read_dword(e820_seg, 0x20 + off);
                     if ((base >= 0x100000) && (type == 1))
                         break;
                 }
@@ -4694,7 +4696,7 @@
                     SET_CF();
                     break;
                 }
-                memcpyb(ES, regs.u.r16.di, 0xe000, 0x10 + off, 0x14);
+                memcpyb(ES, regs.u.r16.di, e820_seg, 0x10 + off, 0x14);
                 regs.u.r32.ebx = 0;
             } else { /* AX=E820, DX=534D4150, BX unrecognized */
                 goto int15_unimplemented;
@@ -4707,7 +4709,8 @@
         }
 
         case 0x01: {
-            Bit16u off, e820_table_size = read_word(0xe000, 0x8) * 0x14;
+            Bit16u e820_seg=E820_PHYSICAL_ADDRESS>>4;
+            Bit16u off, e820_table_size = read_word(e820_seg, 0x8) * 0x14;
             Bit32u base, type, size;
 
             // do we have any reason to fail here ?
@@ -4723,8 +4726,8 @@
 
             // Find first RAM E820 entry >= 1MB.
             for (off = 0; off < e820_table_size; off += 0x14) {
-                base = read_dword(0xe000, 0x10 + off);
-                type = read_dword(0xe000, 0x20 + off);
+                base = read_dword(e820_seg, 0x10 + off);
+                type = read_dword(e820_seg, 0x20 + off);
                 if ((base >= 0x100000) && (type == 1))
                     break;
             }
@@ -4732,7 +4735,7 @@
             // If there is RAM above 16MB, return amount in 64kB chunks.
             regs.u.r16.dx = 0;
             if (off != e820_table_size) {
-                size = base + read_dword(0xe000, 0x18 + off);
+                size = base + read_dword(e820_seg, 0x18 + off);
                 if (size > 0x1000000) {
                     size -= 0x1000000;
                     regs.u.r16.dx = (Bit16u)(size >> 16);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>