[LinuxBIOS] r512 - in LinuxBIOSv3: device lib
svn at openbios.org
svn at openbios.org
Tue Nov 20 19:20:53 CET 2007
Author: hailfinger
Date: 2007-11-20 19:20:53 +0100 (Tue, 20 Nov 2007)
New Revision: 512
Modified:
LinuxBIOSv3/device/device.c
LinuxBIOSv3/lib/stage2.c
Log:
Cleanup printk usage and documentation. Drop the second banner as it was
an artifact from the time when we needed stage2 phase 1 code to make
printk work.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Acked-by: Uwe Hermann <uwe at hermann-uwe.de>
Modified: LinuxBIOSv3/device/device.c
===================================================================
--- LinuxBIOSv3/device/device.c 2007-11-17 15:28:02 UTC (rev 511)
+++ LinuxBIOSv3/device/device.c 2007-11-20 18:20:53 UTC (rev 512)
@@ -692,14 +692,14 @@
*
* Starting at the first device on the global device link list,
* walk the list and call the device's phase1() method to do very
- * early setup. phase1 should only be used for devices that CAN NOT use
- * printk(), or that are part of making printk() work.
+ * early setup.
*/
void dev_phase1(void)
{
struct device *dev;
post_code(0x31);
+ printk(BIOS_DEBUG, "Phase 1: Very early setup...\n");
for (dev = all_devices; dev; dev = dev->next) {
if (dev->ops && dev->ops->phase1_set_device_operations) {
dev->ops->phase1_set_device_operations(dev);
@@ -715,7 +715,7 @@
*
* Starting at the first device on the global device link list,
* walk the list and call the device's phase2() method to do
- * early setup. You can use printk() in phase 2 methods.
+ * early setup.
*/
void dev_phase2(void)
{
@@ -729,7 +729,7 @@
printk(BIOS_SPEW,
"Calling phase2 phase2_setup_scan_bus...");
dev->ops->phase2_setup_scan_bus(dev);
- printk(BIOS_SPEW, " DONE");
+ printk(BIOS_SPEW, " done");
}
printk(BIOS_SPEW, "\n");
}
Modified: LinuxBIOSv3/lib/stage2.c
===================================================================
--- LinuxBIOSv3/lib/stage2.c 2007-11-17 15:28:02 UTC (rev 511)
+++ LinuxBIOSv3/lib/stage2.c 2007-11-20 18:20:53 UTC (rev 512)
@@ -34,6 +34,7 @@
* LinuxBIOS is divided into pre-DRAM part and DRAM part. The stages before
* this part are stage 0 and stage 1. This part contains stage 2, which
* consists of phases 1 through 6.
+ * printk has been set up in stage 1 and is working.
*
* Device Enumeration: in the dev_enumerate() phase.
*
@@ -45,29 +46,11 @@
/* 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);
-
- /* TODO: Explain why we use printk here although it is claimed to be
- * impossible according to the documentation. The "has to be done
- * before printk can be used" comment below seems to suggest the same.
- * However, we already enable serial in arch/x86/stage1.c:stage1_main()
- * when we call hardware_stage1(); uart_init(); console_init();
- * Why test the console again if it already is tested in stage 1?
- */
- printk(BIOS_NOTICE, console_test);
-
dev_init();
- /* Console init, also ANYTHING that has to be done
- * before printk can be used.
+ /* Phase 1 was console init and making printk work. Both functions are
+ * now performed by stage 1 code. Phase 1 is now without purpose.
*/
post_code(0x30);
dev_phase1();
More information about the coreboot
mailing list