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:
Till Straumann
2011-07-16 01:21:36 +00:00
parent d2e68e07b5
commit 9c39236d0d
2 changed files with 17 additions and 6 deletions

View File

@@ -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>
* shared/startup/ppc_idle.c: added an 'idle task' body

View File

@@ -176,15 +176,17 @@ void decompress_kernel(int kernel_size, void * zimage_start, int len,
printk("Not enough memory to uncompress the kernel.");
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
* with ugly special case for SMP could be removed from the kernel!
*/
memset(parea, 0, kernel_size);
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);
@@ -287,13 +289,15 @@ setup_hw(void)
printk("\nModel: %s\nSerial: %s\n"
"Processor/Bus frequencies (Hz): %ld/%ld\n"
"Time Base Divisor: %ld\n"
"Memory Size: %lx\n",
"Memory Size: %lx\n"
"Residual: %lx (length %u)\n",
vpd.PrintableModel,
vpd.Serial,
vpd.ProcessorHz,
vpd.ProcessorBusHz,
(vpd.TimeBaseDivisor ? vpd.TimeBaseDivisor : 4000),
res->TotalMemory);
res->TotalMemory,
(unsigned long)res, res->ResidualLength);
/* This reconfigures all the PCI subsystem */
pci_init();