Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH] fix x86_64 initrd support

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


chrisw at osdl

Jun 13, 2005, 2:49 PM

Post #1 of 3 (14 views)
Permalink
[PATCH] fix x86_64 initrd support

Looks like x86_64 never quite handled initrd's. This brings x86_64
in line with i386 in that it doesn't check LOADER_TYPE (which will be
zero anyway). Now initrd is working fine for me on x86_64.

Signed-off-by: Chris Wright <chrisw [at] osdl>

===== linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c 1.6 vs edited =====
--- 1.6/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c 2005-06-08 01:34:42 -07:00
+++ edited/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c 2005-06-13 14:39:19 -07:00
@@ -727,23 +727,20 @@ void __init setup_arch(char **cmdline_p)
acpi_reserve_bootmem();
#endif
#ifdef CONFIG_BLK_DEV_INITRD
- if (xen_start_info.mod_start) {
- if (LOADER_TYPE && INITRD_START) {
- if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) {
- /* reserve_bootmem_generic(INITRD_START, INITRD_SIZE); */
- initrd_start = INITRD_START + PAGE_OFFSET;
- initrd_end = initrd_start+INITRD_SIZE;
- initrd_below_start_ok = 1;
- }
- else {
- printk(KERN_ERR "initrd extends beyond end of memory "
- "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
- (unsigned long)(INITRD_START + INITRD_SIZE),
- (unsigned long)(end_pfn << PAGE_SHIFT));
- initrd_start = 0;
- }
- }
- }
+ if (xen_start_info.mod_start) {
+ if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) {
+ /*reserve_bootmem_generic(INITRD_START, INITRD_SIZE);*/
+ initrd_start = INITRD_START + PAGE_OFFSET;
+ initrd_end = initrd_start+INITRD_SIZE;
+ initrd_below_start_ok = 1;
+ } else {
+ printk(KERN_ERR "initrd extends beyond end of memory "
+ "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
+ (unsigned long)(INITRD_START + INITRD_SIZE),
+ (unsigned long)(end_pfn << PAGE_SHIFT));
+ initrd_start = 0;
+ }
+ }
#endif
paging_init();
#ifdef CONFIG_X86_LOCAL_APIC

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xensource.com/xen-devel


chrisw at osdl

Jun 13, 2005, 2:54 PM

Post #2 of 3 (14 views)
Permalink
Re: [PATCH] fix x86_64 initrd support [In reply to]

* Chris Wright (chrisw [at] osdl) wrote:

Ugh, that one had some tab damage, here's the proper patch.
-chris
---


Looks like x86_64 never quite handled initrd's. This brings x86_64
in line with i386 in that it doesn't check LOADER_TYPE (which will be
zero anyway). Now initrd is working fine for me on x86_64.

Signed-off-by: Chris Wright <chrisw [at] osdl>

===== linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c 1.6 vs edited =====
--- 1.6/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c 2005-06-08 01:34:42 -07:00
+++ edited/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c 2005-06-13 07:52:20 -07:00
@@ -727,23 +727,20 @@ void __init setup_arch(char **cmdline_p)
acpi_reserve_bootmem();
#endif
#ifdef CONFIG_BLK_DEV_INITRD
- if (xen_start_info.mod_start) {
- if (LOADER_TYPE && INITRD_START) {
- if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) {
- /* reserve_bootmem_generic(INITRD_START, INITRD_SIZE); */
- initrd_start = INITRD_START + PAGE_OFFSET;
- initrd_end = initrd_start+INITRD_SIZE;
- initrd_below_start_ok = 1;
- }
- else {
- printk(KERN_ERR "initrd extends beyond end of memory "
- "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
- (unsigned long)(INITRD_START + INITRD_SIZE),
- (unsigned long)(end_pfn << PAGE_SHIFT));
- initrd_start = 0;
- }
- }
- }
+ if (xen_start_info.mod_start) {
+ if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) {
+ /*reserve_bootmem_generic(INITRD_START, INITRD_SIZE);*/
+ initrd_start = INITRD_START + PAGE_OFFSET;
+ initrd_end = initrd_start+INITRD_SIZE;
+ initrd_below_start_ok = 1;
+ } else {
+ printk(KERN_ERR "initrd extends beyond end of memory "
+ "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
+ (unsigned long)(INITRD_START + INITRD_SIZE),
+ (unsigned long)(end_pfn << PAGE_SHIFT));
+ initrd_start = 0;
+ }
+ }
#endif
paging_init();
#ifdef CONFIG_X86_LOCAL_APIC

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xensource.com/xen-devel


jun.nakajima at intel

Jun 13, 2005, 3:23 PM

Post #3 of 3 (14 views)
Permalink
RE: [PATCH] fix x86_64 initrd support [In reply to]

Chris Wright wrote:
>
> Looks like x86_64 never quite handled initrd's. This brings x86_64
> in line with i386 in that it doesn't check LOADER_TYPE (which will be
> zero anyway). Now initrd is working fine for me on x86_64.

Great to see more participation in x86-64 xenlinux. Good work!

Jun

>
> Signed-off-by: Chris Wright <chrisw [at] osdl>
>
> ===== linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c 1.6 vs
> edited ===== ---
> 1.6/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c
2005-06-08
> 01:34:42 -07:00 +++
>
> edited/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c
2005-06-13
> 07:52:20 -07:00 @@ -727,23 +727,20 @@ void __init setup_arch(char
> **cmdline_p) acpi_reserve_bootmem(); #endif #ifdef
> CONFIG_BLK_DEV_INITRD
> - if (xen_start_info.mod_start) {
> - if (LOADER_TYPE && INITRD_START) {
> - if (INITRD_START + INITRD_SIZE <= (end_pfn
> << PAGE_SHIFT)) {
> - /*
> reserve_bootmem_generic(INITRD_START, INITRD_SIZE); */
> - initrd_start = INITRD_START +
> PAGE_OFFSET;
> - initrd_end =
> initrd_start+INITRD_SIZE;
> - initrd_below_start_ok = 1;
> - }
> - else {
> - printk(KERN_ERR "initrd extends
> beyond end of memory "
> - "(0x%08lx >
> 0x%08lx)\ndisabling initrd\n",
> - (unsigned long)(INITRD_START
> + INITRD_SIZE),
> - (unsigned long)(end_pfn <<
> PAGE_SHIFT));
> - initrd_start = 0;
> - }
> - }
> - }
> + if (xen_start_info.mod_start) {
> + if (INITRD_START + INITRD_SIZE <= (end_pfn <<
PAGE_SHIFT)) {
> + /*reserve_bootmem_generic(INITRD_START,
INITRD_SIZE);*/
> + initrd_start = INITRD_START + PAGE_OFFSET;
> + initrd_end = initrd_start+INITRD_SIZE;
> + initrd_below_start_ok = 1;
> + } else {
> + printk(KERN_ERR "initrd extends beyond end of
memory "
> + "(0x%08lx > 0x%08lx)\ndisabling
initrd\n",
> + (unsigned long)(INITRD_START +
INITRD_SIZE),
> + (unsigned long)(end_pfn << PAGE_SHIFT));
> + initrd_start = 0;
> + }
> + }
> #endif
> paging_init();
> #ifdef CONFIG_X86_LOCAL_APIC
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel [at] lists
> http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xensource.com/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.