summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-01-30 09:47:18 +0000
committerStefan Reinauer <stepan@openbios.org>2010-01-30 09:47:18 +0000
commite37785791ae2be959cfe07962944745c81ca88f5 (patch)
tree19371da337314f63e561feeac4cb923c49c64b72 /src/arch
parent89e45773a977da2c996221b74aef06596d345211 (diff)
downloadcoreboot-e37785791ae2be959cfe07962944745c81ca88f5.tar.xz
* fix crt0s/ldscripts paths to fix out of tree build.
* fix iasl output directory for i945 boards (patch for moving it to the mainboard directory will follow) * coreboot_table.c: lb_mainboard can be static * coreboot_table.c: dump memory table in debug and spew mode * fix a warning in bootblock.c * don't include arch/i386/init in arch/i386/Makefile.inc * announce generation of crt0_includes.h * allow overriding $(obj) * drop unused src_types from Makefile * correctly use hostname -s instead of hostname for COMPILE_HOST Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5065 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/Makefile.bigbootblock.inc1
-rw-r--r--src/arch/i386/Makefile.inc2
-rw-r--r--src/arch/i386/Makefile.tinybootblock.inc1
-rw-r--r--src/arch/i386/boot/coreboot_table.c34
-rw-r--r--src/arch/i386/boot/coreboot_table.h1
-rw-r--r--src/arch/i386/init/Makefile.inc2
-rw-r--r--src/arch/i386/init/bootblock.c2
7 files changed, 38 insertions, 5 deletions
diff --git a/src/arch/i386/Makefile.bigbootblock.inc b/src/arch/i386/Makefile.bigbootblock.inc
index 06af5d2b64..a8882316b7 100644
--- a/src/arch/i386/Makefile.bigbootblock.inc
+++ b/src/arch/i386/Makefile.bigbootblock.inc
@@ -19,6 +19,7 @@ $(obj)/ldscript.ld: $(ldscripts) $(obj)/ldoptions
printf '$(foreach ldscript,$(ldscripts),INCLUDE "$(ldscript:$(obj)/%=%)"\n)' >> $@
$(obj)/crt0_includes.h: $(crt0s)
+ @printf " GEN $(subst $(obj)/,,$(@))\n"
printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
diff --git a/src/arch/i386/Makefile.inc b/src/arch/i386/Makefile.inc
index ef4b90af0c..05f7894cc6 100644
--- a/src/arch/i386/Makefile.inc
+++ b/src/arch/i386/Makefile.inc
@@ -1,7 +1,7 @@
#######################################################################
# Take care of subdirectories
subdirs-y += boot
-subdirs-y += init
+# subdirs-y += init
subdirs-y += lib
subdirs-y += smp
diff --git a/src/arch/i386/Makefile.tinybootblock.inc b/src/arch/i386/Makefile.tinybootblock.inc
index 003bac9688..e30e89d3c6 100644
--- a/src/arch/i386/Makefile.tinybootblock.inc
+++ b/src/arch/i386/Makefile.tinybootblock.inc
@@ -86,6 +86,7 @@ $(obj)/romstage/ldscript.ld: $(ldscripts) $(obj)/ldoptions
printf '$(foreach ldscript,ldoptions location.ld $(ldscripts),INCLUDE "$(ldscript:$(obj)/%=%)"\n)' > $@
$(obj)/romstage/crt0_includes.h: $(crt0s)
+ @printf " GEN $(subst $(obj)/,,$(@))\n"
mkdir -p $(obj)/romstage
printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
diff --git a/src/arch/i386/boot/coreboot_table.c b/src/arch/i386/boot/coreboot_table.c
index 00c34b2ee8..e766463255 100644
--- a/src/arch/i386/boot/coreboot_table.c
+++ b/src/arch/i386/boot/coreboot_table.c
@@ -148,7 +148,7 @@ static void lb_console(struct lb_header *header)
#endif
}
-struct lb_mainboard *lb_mainboard(struct lb_header *header)
+static struct lb_mainboard *lb_mainboard(struct lb_header *header)
{
struct lb_record *rec;
struct lb_mainboard *mainboard;
@@ -407,6 +407,36 @@ void lb_add_memory_range(struct lb_memory *mem,
lb_cleanup_memory_ranges(mem);
}
+static void lb_dump_memory_ranges(struct lb_memory *mem)
+{
+ int entries;
+ int i;
+ entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]);
+
+ printk_debug("coreboot memory table:\n");
+ for(i = 0; i < entries; i++) {
+ uint64_t entry_start = unpack_lb64(mem->map[i].start);
+ uint64_t entry_size = unpack_lb64(mem->map[i].size);
+ const char *entry_type;
+
+ switch (mem->map[i].type) {
+ case LB_MEM_RAM: entry_type="RAM"; break;
+ case LB_MEM_RESERVED: entry_type="RESERVED"; break;
+ case LB_MEM_ACPI: entry_type="ACPI"; break;
+ case LB_MEM_NVS: entry_type="NVS"; break;
+ case LB_MEM_UNUSABLE: entry_type="UNUSABLE"; break;
+ case LB_MEM_VENDOR_RSVD: entry_type="VENDOR RESERVED"; break;
+ case LB_MEM_TABLE: entry_type="CONFIGURATION TABLES"; break;
+ default: entry_type="UNKNOWN!"; break;
+ }
+
+ printk_debug("%2d. %016llx-%016llx: %s\n",
+ i, entry_start, entry_start+entry_size-1, entry_type);
+
+ }
+}
+
+
/* Routines to extract part so the coreboot table or
* information from the coreboot table after we have written it.
* Currently get_lb_mem relies on a global we can change the
@@ -518,6 +548,8 @@ unsigned long write_coreboot_table(
add_mainboard_resources(mem);
#endif
+ lb_dump_memory_ranges(mem);
+
/* Note:
* I assume that there is always memory at immediately after
* the low_table_end. This means that after I setup the coreboot table.
diff --git a/src/arch/i386/boot/coreboot_table.h b/src/arch/i386/boot/coreboot_table.h
index 98836c41b5..13ae9a29cb 100644
--- a/src/arch/i386/boot/coreboot_table.h
+++ b/src/arch/i386/boot/coreboot_table.h
@@ -10,7 +10,6 @@ unsigned long write_coreboot_table(
void lb_memory_range(struct lb_memory *mem,
uint32_t type, uint64_t start, uint64_t size);
-struct lb_mainboard *lb_mainboard(struct lb_header *header);
/* Routines to extract part so the coreboot table or information
* from the coreboot table.
diff --git a/src/arch/i386/init/Makefile.inc b/src/arch/i386/init/Makefile.inc
index 792d600548..98077e88f1 100644
--- a/src/arch/i386/init/Makefile.inc
+++ b/src/arch/i386/init/Makefile.inc
@@ -1 +1 @@
-#
+# If you add something to this file, enable it in src/arch/i386/Makefile.inc first.
diff --git a/src/arch/i386/init/bootblock.c b/src/arch/i386/init/bootblock.c
index 112a1953e3..86a5c5b136 100644
--- a/src/arch/i386/init/bootblock.c
+++ b/src/arch/i386/init/bootblock.c
@@ -29,7 +29,7 @@ static unsigned long findstage(char* target)
static void call(unsigned long addr, unsigned long bist)
{
- asm volatile ("jmp %0\n\t" : : "r" (addr), "a" (bist));
+ asm volatile ("jmp *%0\n\t" : : "r" (addr), "a" (bist));
}
static void main(unsigned long bist)