fuloong2e.c (3ca7639ff0077ef1869c88523360c017defecaad) | fuloong2e.c (acab36ca25101930b263dd9e8afd9b244354d338) |
---|---|
1/* 2 * QEMU fuloong 2e mini pc support 3 * 4 * Copyright (c) 2008 yajin (yajin@vm-kernel.org) 5 * Copyright (c) 2009 chenming (chenming@rdc.faw.com.cn) 6 * Copyright (c) 2010 Huacai Chen (zltjiangshi@gmail.com) 7 * This code is licensed under the GNU GPL v2. 8 * --- 119 unchanged lines hidden (view full) --- 128 } 129 130 /* load initrd */ 131 initrd_size = 0; 132 initrd_offset = 0; 133 if (loaderparams.initrd_filename) { 134 initrd_size = get_image_size(loaderparams.initrd_filename); 135 if (initrd_size > 0) { | 1/* 2 * QEMU fuloong 2e mini pc support 3 * 4 * Copyright (c) 2008 yajin (yajin@vm-kernel.org) 5 * Copyright (c) 2009 chenming (chenming@rdc.faw.com.cn) 6 * Copyright (c) 2010 Huacai Chen (zltjiangshi@gmail.com) 7 * This code is licensed under the GNU GPL v2. 8 * --- 119 unchanged lines hidden (view full) --- 128 } 129 130 /* load initrd */ 131 initrd_size = 0; 132 initrd_offset = 0; 133 if (loaderparams.initrd_filename) { 134 initrd_size = get_image_size(loaderparams.initrd_filename); 135 if (initrd_size > 0) { |
136 initrd_offset = (kernel_high + ~INITRD_PAGE_MASK) & 137 INITRD_PAGE_MASK; | 136 initrd_offset = ROUND_UP(kernel_high, INITRD_PAGE_SIZE); |
138 if (initrd_offset + initrd_size > ram_size) { 139 error_report("memory too small for initial ram disk '%s'", 140 loaderparams.initrd_filename); 141 exit(1); 142 } 143 initrd_size = load_image_targphys(loaderparams.initrd_filename, 144 initrd_offset, 145 ram_size - initrd_offset); --- 257 unchanged lines hidden --- | 137 if (initrd_offset + initrd_size > ram_size) { 138 error_report("memory too small for initial ram disk '%s'", 139 loaderparams.initrd_filename); 140 exit(1); 141 } 142 initrd_size = load_image_targphys(loaderparams.initrd_filename, 143 initrd_offset, 144 ram_size - initrd_offset); --- 257 unchanged lines hidden --- |