From 8ad97ccb3e986b673f040af80bc269b57a6f9341 Mon Sep 17 00:00:00 2001 From: Doug Gilbert Date: Mon, 11 Nov 2013 13:46:06 -0600 Subject: hbirt increase number of modules allowed Change-Id: I64a05ac460d75a8328a326d808e906dc0751a8d8 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7166 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell Reviewed-by: A. Patrick Williams III --- src/build/linker/linker.C | 5 ++++- src/include/sys/vfs.h | 7 ++++++- src/runtime/rt_vfs.C | 3 ++- src/sys/vfs/vfs_init.C | 48 ++++++++++++++++++++++++----------------------- 4 files changed, 37 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/build/linker/linker.C b/src/build/linker/linker.C index 2a4c3ad16..71b79c220 100644 --- a/src/build/linker/linker.C +++ b/src/build/linker/linker.C @@ -981,7 +981,10 @@ void ModuleTable::write_table(vector & i_objects) i->offset + i->data.vma_offset; cout << "Updating base module table..." << endl; - max_modules = VFS_MODULE_MAX; + fseek(iv_output, module_table_offset, SEEK_SET); + char mx_mod_ch = 0; + fread(&mx_mod_ch,sizeof(char),1,iv_output); + max_modules = (uint64_t)mx_mod_ch; // VFS_MODULE_MAX; ++i; } else diff --git a/src/include/sys/vfs.h b/src/include/sys/vfs.h index 566f331a8..05c8ecaf1 100644 --- a/src/include/sys/vfs.h +++ b/src/include/sys/vfs.h @@ -30,8 +30,13 @@ #include #endif -// make TODO VFS_MODULE_MAX equal to the actual number of modules in the base image (+ 2?) +#ifndef __HOSTBOOT_RUNTIME +// make VFS_MODULE_MAX equal to the actual number of modules in the base image (+ 2?) #define VFS_MODULE_MAX 16 +#else +#define VFS_MODULE_MAX 32 +#endif + // Extended use 4 4k pages // Extended Module Virtual address at 1GB #define VFS_EXTENDED_MODULE_VADDR (1 * 1024 * 1024 * 1024) diff --git a/src/runtime/rt_vfs.C b/src/runtime/rt_vfs.C index 894cd47cb..73f381313 100644 --- a/src/runtime/rt_vfs.C +++ b/src/runtime/rt_vfs.C @@ -27,7 +27,8 @@ #include #include -VfsSystemModule VFS_MODULES[VFS_MODULE_MAX]; +VfsSystemModule VFS_MODULES[VFS_MODULE_MAX] = +{{{VFS_MODULE_MAX,0},NULL,NULL,NULL,NULL,NULL,0}}; void vfs_module_init() { diff --git a/src/sys/vfs/vfs_init.C b/src/sys/vfs/vfs_init.C index e0cf844fa..c570e100f 100644 --- a/src/sys/vfs/vfs_init.C +++ b/src/sys/vfs/vfs_init.C @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/sys/vfs/vfs_init.C $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/sys/vfs/vfs_init.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ /** * @file vfs_init.C * @brief function definitions for funtions used to initialize modules @@ -30,7 +30,9 @@ #include #include -VfsSystemModule VFS_MODULES[VFS_MODULE_MAX]; +VfsSystemModule VFS_MODULES[VFS_MODULE_MAX] = +{{{VFS_MODULE_MAX,0},NULL,NULL,NULL,NULL,NULL,0}}; + uint64_t VFS_LAST_ADDRESS; -- cgit v1.2.1