device code cleanup. this is the uncritical part of my device cleanup
patch. Most of it are printk_ cleanup fixes required for the v2->v3 transition, thus trivial. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@327 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
bd53a46fbd
commit
6c4d4e2c95
11 changed files with 47 additions and 52 deletions
|
|
@ -23,17 +23,17 @@ static unsigned long ulzma(unsigned char * src, unsigned char * dst)
|
|||
memcpy(properties, src, LZMA_PROPERTIES_SIZE);
|
||||
outSize = *(UInt32 *)(src + LZMA_PROPERTIES_SIZE);
|
||||
if (LzmaDecodeProperties(&state.Properties, properties, LZMA_PROPERTIES_SIZE) != LZMA_RESULT_OK) {
|
||||
printk_warning("Incorrect stream properties\n");
|
||||
printk(BIOS_WARNING, "Incorrect stream properties\n");
|
||||
}
|
||||
mallocneeds = (LzmaGetNumProbs(&state.Properties) * sizeof(CProb));
|
||||
if (mallocneeds > 15980) {
|
||||
printk_warning("Decoder scratchpad too small!\n");
|
||||
printk(BIOS_WARNING, "Decoder scratchpad too small!\n");
|
||||
}
|
||||
state.Probs = (CProb *)scratchpad;
|
||||
res = LzmaDecode(&state, src + LZMA_PROPERTIES_SIZE + 8, (SizeT)0xffffffff, &inProcessed,
|
||||
dst, outSize, &outProcessed);
|
||||
if (res != 0) {
|
||||
printk_warning("Decoding error = %d\n", res);
|
||||
printk(BIOS_WARNING, "Decoding error = %d\n", res);
|
||||
}
|
||||
return outSize;
|
||||
}
|
||||
|
|
|
|||
18
lib/stage2.c
18
lib/stage2.c
|
|
@ -43,7 +43,19 @@ int stage2(void)
|
|||
{
|
||||
/* TODO: Add comment. */
|
||||
void show_all_devs(void);
|
||||
|
||||
static const char console_test[] =
|
||||
"\n\nLinuxBIOS-"
|
||||
LINUXBIOS_VERSION
|
||||
LINUXBIOS_EXTRA_VERSION
|
||||
" "
|
||||
LINUXBIOS_BUILD
|
||||
" booting...\n";
|
||||
|
||||
post_code(0x20);
|
||||
|
||||
printk(BIOS_NOTICE, console_test);
|
||||
|
||||
dev_init();
|
||||
|
||||
/* Console init, also ANYTHING that has to be done
|
||||
|
|
@ -53,12 +65,6 @@ int stage2(void)
|
|||
dev_phase1();
|
||||
show_all_devs();
|
||||
|
||||
// printk_notice("LinuxBIOS-%s%s %s booting...\n",
|
||||
// linuxbios_version, linuxbios_extra_version, linuxbios_build);
|
||||
|
||||
// printk_notice("LinuxBIOS-%s%s %s booting...\n",
|
||||
// linuxbios_version, linuxbios_extra_version, linuxbios_build);
|
||||
|
||||
/* Here is where weird stuff like init_timer handling should be
|
||||
* done. This is for ANYTHING that might have to happen before
|
||||
* device enumeration but that needs a printk.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue