forked from Imagelibrary/rtems
2011-07-15 Till Straumann <strauman@slac.stanford.edu>
* shared/bootloader/misc.c: Copy residual data _before_ decompressing the kernel since the firmware may have stored it in an area that is overwritten by decompress_kernel().
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2011-07-15 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
|
* shared/bootloader/misc.c: Copy residual data
|
||||||
|
_before_ decompressing the kernel since the firmware
|
||||||
|
may have stored it in an area that is overwritten
|
||||||
|
by decompress_kernel().
|
||||||
|
|
||||||
2011-07-15 Till Straumann <strauman@slac.stanford.edu>
|
2011-07-15 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
* shared/startup/ppc_idle.c: added an 'idle task' body
|
* shared/startup/ppc_idle.c: added an 'idle task' body
|
||||||
|
|||||||
@@ -176,15 +176,17 @@ void decompress_kernel(int kernel_size, void * zimage_start, int len,
|
|||||||
printk("Not enough memory to uncompress the kernel.");
|
printk("Not enough memory to uncompress the kernel.");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rescopy=salloc(sizeof(RESIDUAL));
|
||||||
|
/* Let us hope that residual data is aligned on word boundary */
|
||||||
|
*rescopy = *bd->residual;
|
||||||
|
bd->residual = (void *)PAGE_ALIGN(kernel_size);
|
||||||
|
|
||||||
/* Note that this clears the bss as a side effect, so some code
|
/* Note that this clears the bss as a side effect, so some code
|
||||||
* with ugly special case for SMP could be removed from the kernel!
|
* with ugly special case for SMP could be removed from the kernel!
|
||||||
*/
|
*/
|
||||||
memset(parea, 0, kernel_size);
|
memset(parea, 0, kernel_size);
|
||||||
printk("\nUncompressing the kernel...\n");
|
printk("\nUncompressing the kernel...\n");
|
||||||
rescopy=salloc(sizeof(RESIDUAL));
|
|
||||||
/* Let us hope that residual data is aligned on word boundary */
|
|
||||||
*rescopy = *bd->residual;
|
|
||||||
bd->residual = (void *)PAGE_ALIGN(kernel_size);
|
|
||||||
|
|
||||||
gunzip(parea, kernel_size, zimage_start, &zimage_size);
|
gunzip(parea, kernel_size, zimage_start, &zimage_size);
|
||||||
|
|
||||||
@@ -287,13 +289,15 @@ setup_hw(void)
|
|||||||
printk("\nModel: %s\nSerial: %s\n"
|
printk("\nModel: %s\nSerial: %s\n"
|
||||||
"Processor/Bus frequencies (Hz): %ld/%ld\n"
|
"Processor/Bus frequencies (Hz): %ld/%ld\n"
|
||||||
"Time Base Divisor: %ld\n"
|
"Time Base Divisor: %ld\n"
|
||||||
"Memory Size: %lx\n",
|
"Memory Size: %lx\n"
|
||||||
|
"Residual: %lx (length %u)\n",
|
||||||
vpd.PrintableModel,
|
vpd.PrintableModel,
|
||||||
vpd.Serial,
|
vpd.Serial,
|
||||||
vpd.ProcessorHz,
|
vpd.ProcessorHz,
|
||||||
vpd.ProcessorBusHz,
|
vpd.ProcessorBusHz,
|
||||||
(vpd.TimeBaseDivisor ? vpd.TimeBaseDivisor : 4000),
|
(vpd.TimeBaseDivisor ? vpd.TimeBaseDivisor : 4000),
|
||||||
res->TotalMemory);
|
res->TotalMemory,
|
||||||
|
(unsigned long)res, res->ResidualLength);
|
||||||
|
|
||||||
/* This reconfigures all the PCI subsystem */
|
/* This reconfigures all the PCI subsystem */
|
||||||
pci_init();
|
pci_init();
|
||||||
|
|||||||
Reference in New Issue
Block a user