diff options
author | Nick Bofferding <bofferdn@us.ibm.com> | 2012-08-03 00:06:06 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-08-08 15:01:31 -0500 |
commit | 11257ecc65544f5a19fece9050db7bcf1431240c (patch) | |
tree | 8070187eb5aa727225ca15a387735a60658ee0f8 /src/usr/targeting/attrrp.C | |
parent | d1a017d3dc236be6787eb0831f278be91b3fc5f9 (diff) | |
download | talos-hostboot-11257ecc65544f5a19fece9050db7bcf1431240c.tar.gz talos-hostboot-11257ecc65544f5a19fece9050db7bcf1431240c.zip |
Support tactical FSP specific section
- Support single FSP attribute section (final support in story 35451)
- Add new targeting service code
- Added unsupported section check to attribute resource provider
- Updated targeting image compiler to create FSP specific section
Change-Id: I11bed7638a6f4743c3199c36cb12a24f09d0bd66
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1472
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/attrrp.C')
-rw-r--r-- | src/usr/targeting/attrrp.C | 81 |
1 files changed, 54 insertions, 27 deletions
diff --git a/src/usr/targeting/attrrp.C b/src/usr/targeting/attrrp.C index aae2f3915..4e54d4f8a 100644 --- a/src/usr/targeting/attrrp.C +++ b/src/usr/targeting/attrrp.C @@ -378,9 +378,48 @@ namespace TARGETING // Create VMM block for each section, assign permissions. for (size_t i = 0; i < iv_sectionCount; i++) { - int rc = 0; + uint64_t l_perm = 0; + switch(iv_sections[i].type) + { + case SECTION_TYPE_PNOR_RO: + l_perm = READ_ONLY; + break; + + case SECTION_TYPE_PNOR_RW: + l_perm = WRITABLE | WRITE_TRACKED; + break; + + case SECTION_TYPE_HEAP_PNOR_INIT: + l_perm = WRITABLE; + break; + + case SECTION_TYPE_HEAP_ZERO_INIT: + l_perm = WRITABLE | ALLOCATE_FROM_ZERO; + break; + + default: + + /*@ + * @errortype + * @moduleid TARG_MOD_ATTRRP + * @reasoncode TARG_RC_UNHANDLED_ATTR_SEC_TYPE + * @userdata1 Section type + * + * @devdesc Found unhandled attribute section type + */ + l_errl = new ErrlEntry(ERRL_SEV_UNRECOVERABLE, + TARG_MOD_ATTRRP, + TARG_RC_UNHANDLED_ATTR_SEC_TYPE, + iv_sections[i].type); + break; + } - rc = mm_alloc_block((iv_sections[i].type == + if(l_errl) + { + break; + } + + int rc = mm_alloc_block((iv_sections[i].type == SECTION_TYPE_HEAP_ZERO_INIT ? NULL : iv_msgQ), reinterpret_cast<void*>( @@ -407,31 +446,15 @@ namespace TARGETING break; } - uint64_t l_perm = 0; - switch(iv_sections[i].type) + if(iv_sections[i].type == SECTION_TYPE_PNOR_RW) { - case SECTION_TYPE_PNOR_RO: - l_perm = READ_ONLY; - break; - - case SECTION_TYPE_PNOR_RW: - l_perm = WRITABLE | WRITE_TRACKED; - /* - * Register this memory range to be FLUSHed during - * a shutdown. - */ - INITSERVICE::registerBlock( - reinterpret_cast<void*>(iv_sections[i].vmmAddress), - iv_sections[i].size,ATTR_PRIORITY); - break; - - case SECTION_TYPE_HEAP_PNOR_INIT: - l_perm = WRITABLE; - break; - - case SECTION_TYPE_HEAP_ZERO_INIT: - l_perm = WRITABLE | ALLOCATE_FROM_ZERO; - break; + /* + * Register this memory range to be FLUSHed during + * a shutdown. + */ + INITSERVICE::registerBlock( + reinterpret_cast<void*>(iv_sections[i].vmmAddress), + iv_sections[i].size,ATTR_PRIORITY); } rc = mm_set_permission(reinterpret_cast<void*>( @@ -460,8 +483,12 @@ namespace TARGETING break; } + } // End iteration through each section + + if(l_errl) + { + break; } - if (l_errl) break; // Catch errorlog fall-outs from inside for-loop. } while (false); |