summaryrefslogtreecommitdiffstats
path: root/src/build
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-07-16 15:29:15 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-09-17 16:45:31 -0500
commit5652d7c0c6a8db05699f2b4334e4615e1ba22127 (patch)
treea04321010213943bc44a908a0de0e88149a7e7de /src/build
parent7c3226b7ef2b3e09bd40823732f05fbf0fe6778f (diff)
downloadtalos-hostboot-5652d7c0c6a8db05699f2b4334e4615e1ba22127.tar.gz
talos-hostboot-5652d7c0c6a8db05699f2b4334e4615e1ba22127.zip
Initial Hostboot Runtime image support.
RTC: 76675 Change-Id: Ibd21cf5b555e6dcee182a2f1a292b47d4f384ba0 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6127 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build')
-rw-r--r--src/build/buildpnor/defaultPnorLayout.xml7
-rw-r--r--src/build/linker/linker.C11
-rw-r--r--src/build/mkrules/cflags.env.mk5
-rw-r--r--src/build/mkrules/dist.targets.mk1
-rwxr-xr-xsrc/build/mkrules/hbfw/img/makefile5
-rw-r--r--src/build/mkrules/images.rules.mk10
6 files changed, 31 insertions, 8 deletions
diff --git a/src/build/buildpnor/defaultPnorLayout.xml b/src/build/buildpnor/defaultPnorLayout.xml
index 57623706a..102b0fad3 100644
--- a/src/build/buildpnor/defaultPnorLayout.xml
+++ b/src/build/buildpnor/defaultPnorLayout.xml
@@ -95,6 +95,13 @@ Layout Description
<side>A</side> <!-- Choices: A, B -->
</section>
<section>
+ <description>Hostboot Runtime Services for Sapphire (2MB)</description>
+ <eyeCatch>HBRT</eyeCatch>
+ <physicalOffset>0x2190000</physicalOffset>
+ <physicalRegionSize>0x200000</physicalRegionSize>
+ <side>A</side>
+ </section>
+ <section>
<description>Special PNOR Test Space (32K)</description>
<eyeCatch>TEST</eyeCatch>
<physicalOffset>0x3590000</physicalOffset>
diff --git a/src/build/linker/linker.C b/src/build/linker/linker.C
index cebfb31d5..e0ca2adc2 100644
--- a/src/build/linker/linker.C
+++ b/src/build/linker/linker.C
@@ -271,6 +271,7 @@ vector<ModuleTable> module_tables;
map<string,size_t> weak_symbols;
set<string> all_symbols;
set<string> weak_symbols_to_check;
+bool includes_extended_image = false;
//-----------------------------------------------------------------------------
// MAIN
@@ -330,6 +331,7 @@ int main(int argc, char** argv)
{
base_addr = strtoul(fname.c_str()+11,NULL,16) * 0x1000;
isOutput = true;
+ includes_extended_image = true;
}
else
{
@@ -423,9 +425,11 @@ int main(int argc, char** argv)
//
cout << "Updating last address..." << std::hex;
+ const Symbol& last_address_symbol =
+ objects[0].symbols[VFS_TOSTRING(VFS_LAST_ADDRESS)];
uint64_t last_address_entry_address =
- objects[0].symbols[VFS_TOSTRING(VFS_LAST_ADDRESS)].address +
- objects[0].offset + objects[0].data.vma_offset;
+ last_address_symbol.address + last_address_symbol.base +
+ objects[0].offset;
fseek(objects[0].iv_output, last_address_entry_address, SEEK_SET);
@@ -435,7 +439,8 @@ int main(int argc, char** argv)
cout << last_address << " to " << last_address_entry_address << endl;
- // Output relocation data.
+ // Output relocation data for single file images. (non-extended)
+ if (!includes_extended_image)
{
fseek(objects[0].iv_output, 0, SEEK_END);
char temp64[sizeof(uint64_t)];
diff --git a/src/build/mkrules/cflags.env.mk b/src/build/mkrules/cflags.env.mk
index 1ab9b9a30..106dc408b 100644
--- a/src/build/mkrules/cflags.env.mk
+++ b/src/build/mkrules/cflags.env.mk
@@ -44,3 +44,8 @@ INCFLAGS = $(addprefix -I, $(INCDIR) )
ASMINCFLAGS = $(addprefix $(lastword -Wa,-I), $(INCDIR))
FLAGS_FILTER ?= $(1)
+
+ifdef HOSTBOOT_RUNTIME
+CFLAGS += -D__HOSTBOOT_RUNTIME=1
+TRACE_FLAGS += --full-strings
+endif
diff --git a/src/build/mkrules/dist.targets.mk b/src/build/mkrules/dist.targets.mk
index c7afac9ee..b36c92a34 100644
--- a/src/build/mkrules/dist.targets.mk
+++ b/src/build/mkrules/dist.targets.mk
@@ -79,6 +79,7 @@ COPY_RENAME_FILES = \
hbicore.bin:img/hbicore$(UNDERSCORE_TEST).bin:vpo \
img/hostboot.bin:img/hbicore$(UNDERSCORE_TEST).bin:fsp \
img/hostboot_extended.bin:img/hbicore$(UNDERSCORE_TEST)_extended.bin:fsp \
+ img/hostboot_runtime.bin:img/hbirt$(UNDERSCORE_TEST).bin:fsp \
vbu_MURANO.pnor:img/vbu$(UNDERSCORE_TEST)_MURANO.pnor:vpo \
vbu_VENICE.pnor:img/vbu$(UNDERSCORE_TEST)_VENICE.pnor:vpo \
hbicore.syms:img/hbicore$(UNDERSCORE_TEST).syms:tools,vpo \
diff --git a/src/build/mkrules/hbfw/img/makefile b/src/build/mkrules/hbfw/img/makefile
index f56194cab..54d1baa39 100755
--- a/src/build/mkrules/hbfw/img/makefile
+++ b/src/build/mkrules/hbfw/img/makefile
@@ -47,7 +47,8 @@ install_all: build_pnor_images
#################################################
BASE_IMAGE = hostboot.bin
EXT_IMAGE = hostboot_extended.bin
-BASE_IMAGES = ${BASE_IMAGE} ${EXT_IMAGE}
+HBRT_IMAGE = hostboot_runtime.bin
+BASE_IMAGES = ${BASE_IMAGE} ${EXT_IMAGE} ${HBRT_IMAGE}
BASE_W_HEADER_IMAGE = hostboot.header.bin
BASE_W_HEADER_ECC_IMAGE = hostboot.header.bin.ecc
BASE_ECC_IMAGE = hostboot.bin.ecc
@@ -88,7 +89,7 @@ PNOR_BUILD_SCRIPT = ${buildpnor.pl:P}
#so need to use tryinclude for now.
.tryinclude <${.PATH:Ffips_pnor.mk}>
-HOSTBOOT_DEFAULT_SECTIONS = HBB=${BASE_W_HEADER_ECC_IMAGE},HBI=${EXT_IMAGE}
+HOSTBOOT_DEFAULT_SECTIONS = HBB=${BASE_W_HEADER_ECC_IMAGE},HBI=${EXT_IMAGE},HBRT=${HBRT_IMAGE}
HBFW_OBJPATH = ${.PATH:M*obj*}
ENGD_OBJPATH = ${HBFW_OBJPATH:S/hbfw\/img/engd\/href/g}
diff --git a/src/build/mkrules/images.rules.mk b/src/build/mkrules/images.rules.mk
index 190f29be5..3b660925c 100644
--- a/src/build/mkrules/images.rules.mk
+++ b/src/build/mkrules/images.rules.mk
@@ -37,7 +37,7 @@ define ELF_template
$$(IMGDIR)/$(1).elf: $$(addprefix $$(OBJDIR)/, $$($(1)_OBJECTS)) \
$$(ROOTPATH)/src/kernel.ld
$$(C2) " LD $$(notdir $$@)"
- $$(C1)$$(LD) -static $$(LDFLAGS) \
+ $$(C1)$$(LD) -static $$(LDFLAGS) $$($$*_LDFLAGS) \
$$(addprefix $$(OBJDIR)/, $$($(1)_OBJECTS)) \
$$($(1)_LDFLAGS) -T $$(ROOTPATH)/src/kernel.ld -o $$@
endef
@@ -49,8 +49,11 @@ $(IMGDIR)/%.bin: $(IMGDIR)/%.elf \
$(C2) " LINKER $(notdir $@)"
$(C1)set -o pipefail && $(CUSTOM_LINKER) $@ $< \
$(addprefix $(IMGDIR)/lib, $(addsuffix .so, $($*_MODULES))) \
+ $(if $($*_EXTENDED_MODULES), \
--extended=0x40000 $(IMGDIR)/$*_extended.bin \
- $(addprefix $(IMGDIR)/lib, $(addsuffix .so, $($*_EXTENDED_MODULES))) \
+ $(addprefix $(IMGDIR)/lib, \
+ $(addsuffix .so, $($*_EXTENDED_MODULES))) \
+ ) \
$(addprefix $(IMGDIR)/, $($*_DATA_MODULES)) \
| bzip2 -zc > $(IMGDIR)/.$*.lnkout.bz2
$(C1)$(ROOTPATH)/src/build/tools/addimgid $@ $<
@@ -58,7 +61,8 @@ $(IMGDIR)/%.bin: $(IMGDIR)/%.elf \
$(IMGDIR)/%.list.bz2 $(IMGDIR)/%.syms: $(IMGDIR)/%.bin
$(C2) " GENLIST $(notdir $*)"
$(C1)(cd $(ROOTPATH)&& \
- src/build/linker/gensyms $*.bin $*_extended.bin 0x40000000 \
+ src/build/linker/gensyms $*.bin \
+ $(if $($*_EXTENDED_MODULES), $*_extended.bin 0x40000000) \
> ./img/$*.syms && \
src/build/linker/genlist $*.bin | bzip2 -zc > ./img/$*.list.bz2)
OpenPOWER on IntegriCloud