Edward O'Callaghan has uploaded this change for review.
internal.c: Have preinit hook do cpu and bus init
This is to work towards a internal programmers phased construction
and initalisation. Unlike other programmers the internal one is a
special case that needs to initalise other parts of the system to
make internal programming possible as well as detection of parts
and finally special case handling of failure modes.
Change-Id: Ia1cfd89a4fccfa07ba3c9ee1f6df1422ab95fc76
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M internal.c
1 file changed, 31 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/21/71621/1
diff --git a/internal.c b/internal.c
index 07b63b4..bf41508 100644
--- a/internal.c
+++ b/internal.c
@@ -174,6 +174,21 @@
*/
internal_buses_supported = BUS_NONSPI;
+ /* Initialize PCI access for flash enables */
+ if (pci_init_common()) {
+ return 1;
+ }
+
+ if (processor_flash_enable()) {
+ msg_perr("Processor detection/init failed.\nAborting.\n");
+ return 1;
+ }
+
+#if defined(__i386__) || defined(__x86_64__)
+ is_laptop = 2; /* Assume that we don't know by default. */
+ dmi_init();
+#endif
+
return 0;
}
@@ -232,19 +247,6 @@
goto internal_init_exit;
}
- /* Initialize PCI access for flash enables */
- if (pci_init_common() != 0) {
- ret = 1;
- goto internal_init_exit;
- }
-
- if (processor_flash_enable()) {
- msg_perr("Processor detection/init failed.\n"
- "Aborting.\n");
- ret = 1;
- goto internal_init_exit;
- }
-
#if defined(__i386__) || defined(__x86_64__)
if (rget_io_perms()) {
ret = 1;
@@ -264,10 +266,6 @@
}
}
- is_laptop = 2; /* Assume that we don't know by default. */
-
- dmi_init();
-
/* In case Super I/O probing would cause pretty explosions. */
board_handle_before_superio();
To view, visit change 71621. To unsubscribe, or for help writing mail filters, visit settings.