Ian Pratt wrote:> This breaks x86_64 boot! It crashes in the Xen ACPI code.
>
> Ian
I don''t see the problem on machine that I typically use, but I found
and
fixed the problem on a big machine. It was causing a stack overflow. If
you look at the current code, it''s a bit dangerous, see => part.
This
patch fixes it.
+static struct e820entry e820_raw[E820MAX];
+
void __init __start_xen(multiboot_info_t *mbi)
{
char *cmdline;
@@ -253,7 +255,6 @@
unsigned long _initrd_start = 0, _initrd_len = 0;
unsigned int initrdidx = 1;
physaddr_t s, e;
- struct e820entry e820_raw[E820MAX];
int i, e820_raw_nr = 0, bytes = 0;
struct ns16550_defaults ns16550 = {
.data_bits = 8,
----
if ( mbi->flags & MBI_MEMMAP )
{
while ( bytes < mbi->mmap_length )
{
memory_map_t *map = __va(mbi->mmap_addr + bytes);
=> e820_raw[e820_raw_nr].addr =
((u64)map->base_addr_high << 32) |
(u64)map->base_addr_low;
=> e820_raw[e820_raw_nr].size =
((u64)map->length_high << 32) |
(u64)map->length_low;
=> e820_raw[e820_raw_nr].type =
(map->type > E820_SHARED_PAGE) ? E820_RESERVED :
map->type;
=> e820_raw_nr++;
bytes += map->size + 4;
}
}
>
>> We found machines with >32 E820 memory map entries, where Xen
>> fails to boot (but Linux does boot fine). The native Linux
>> (both x86 and x86_86) already has:
>>
>> #define E820MAX 128 /* number of entries in
>> E820MAP */
>>
>> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
>>
>> Jun
>> ---
>> Intel Open Source Technology Center
>>
>> --
>> diff -r 3bb1857981e6 -r 51e9c0c806b2 xen/include/asm-x86/e820.h
>> --- a/xen/include/asm-x86/e820.h Tue Aug 16 19:38:22 2005
>> +++ b/xen/include/asm-x86/e820.h Wed Aug 17 17:00:29 2005 @@ -3,7
>> +3,7 @@
>>
>> #include <asm/page.h>
>>
>> -#define E820MAX 32
>> +#define E820MAX 128
>>
>> #define E820_RAM 1
>> #define E820_RESERVED 2
Jun
---
Intel Open Source Technology Center
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel