summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2004-10-16 06:20:29 +0000
committerEric Biederman <ebiederm@xmission.com>2004-10-16 06:20:29 +0000
commit7003ba4a88a847707c55d593e517eaa70fc8c63d (patch)
treead29fcd2fde474cb9bdd32835a76101edabe1ef9 /src/arch
parent216525d1fd86c13e0f1ebe85ba518cdc1da06fcb (diff)
downloadcoreboot-7003ba4a88a847707c55d593e517eaa70fc8c63d.tar.xz
- First stab at running linuxbios without the old static device tree.
Things are close but not quite there yet. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1681 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/init/crt0.S.lb22
-rw-r--r--src/arch/i386/smp/mpspec.c9
2 files changed, 20 insertions, 11 deletions
diff --git a/src/arch/i386/init/crt0.S.lb b/src/arch/i386/init/crt0.S.lb
index 4d9face092..29e3e28277 100644
--- a/src/arch/i386/init/crt0.S.lb
+++ b/src/arch/i386/init/crt0.S.lb
@@ -37,12 +37,21 @@
#include "crt0_includes.h"
+ /* uses: esp, ebx, ax, dx */
+#define __CONSOLE_TX_STRING(string) \
+ mov string, %ebx ; \
+ CALLSP(console_tx_string)
+
+#if ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG
+#define CONSOLE_DEBUG_TX_STRING(string) __CONSOLE_TX_STRING(string)
+#else
+#define CONSOLE_DEBUG_TX_STRING(string)
+#endif
/* clear boot_complete flag */
xorl %ebp, %ebp
__main:
- mov $str_copying_to_ram, %ebx
- CALLSP(console_tx_string)
+ CONSOLE_DEBUG_TX_STRING($str_copying_to_ram)
/*
* Copy data into RAM and clear the BSS. Since these segments
@@ -149,8 +158,7 @@ decompr_end_n2b:
movl %esp, %ebp
#endif
- mov $str_pre_main, %ebx
- CALLSP(console_tx_string)
+ CONSOLE_DEBUG_TX_STRING($str_pre_main)
leal _iseg, %edi
jmp %edi
@@ -159,12 +167,9 @@ decompr_end_n2b:
hlt
jmp .Lhlt
-
+#if ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG
/* Uses esp, ebx, ax, dx */
console_tx_string:
-#if ASM_CONSOLE_LOGLEVEL <= BIOS_DEBUG
- RETSP
-#else
mov (%ebx), %al
inc %ebx
cmp $0, %al
@@ -210,4 +215,3 @@ str_pre_main: .string "Jumping to LinuxBIOS.\r\n"
.previous
#endif /* ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG */
- \ No newline at end of file
diff --git a/src/arch/i386/smp/mpspec.c b/src/arch/i386/smp/mpspec.c
index babfcbdca2..c674cf58f5 100644
--- a/src/arch/i386/smp/mpspec.c
+++ b/src/arch/i386/smp/mpspec.c
@@ -1,4 +1,6 @@
#include <console/console.h>
+#include <device/device.h>
+#include <device/path.h>
#include <cpu/cpu.h>
#include <arch/smp/mpspec.h>
#include <string.h>
@@ -101,14 +103,17 @@ void smp_write_processors(struct mp_config_table *mc)
unsigned cpu_feature_flags;
struct cpuid_result result;
device_t cpu;
+
boot_apic_id = lapicid();
apic_version = lapic_read(LAPIC_LVR) & 0xff;
result = cpuid(1);
cpu_features = result.eax;
cpu_feature_flags = result.edx;
- for(cpu = dev_root.link[1].children; cpu; cpu = cpu->sibling) {
+ for(cpu = all_devices; cpu; cpu = cpu->next) {
unsigned long cpu_flag;
- if (cpu->path.type != DEVICE_PATH_APIC) {
+ if ((cpu->path.type != DEVICE_PATH_APIC) ||
+ (cpu->bus->dev->path.type != DEVICE_PATH_APIC_CLUSTER))
+ {
continue;
}
if (!cpu->enabled) {