From 10085bf3f511a7b76e51814c1850d4b138a5b9d1 Mon Sep 17 00:00:00 2001 From: CamVan Nguyen Date: Tue, 27 Nov 2012 16:06:08 -0600 Subject: Create new PNOR heap zero initialized section for Hostboot only attributes. New section is needed for Hostboot specific attributes that we don't want to sync to/from FSP. This is needed for MPIPL. Change-Id: Ic40bec73c9b1331906a81b5804999865c0ec1616 RTC: 51687 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2445 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III --- src/usr/targeting/attrrp.C | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/usr/targeting/attrrp.C') diff --git a/src/usr/targeting/attrrp.C b/src/usr/targeting/attrrp.C index db6535106..7c7b6ecf0 100644 --- a/src/usr/targeting/attrrp.C +++ b/src/usr/targeting/attrrp.C @@ -196,8 +196,10 @@ namespace TARGETING case MSG_MM_RP_READ: // HEAP_ZERO_INIT should never be requested for read // because kernel should automatically get a zero page. - if (iv_sections[section].type == - SECTION_TYPE_HEAP_ZERO_INIT) + if ( (iv_sections[section].type == + SECTION_TYPE_HEAP_ZERO_INIT) || + (iv_sections[section].type == + SECTION_TYPE_HB_HEAP_ZERO_INIT) ) { TRACFCOMP(g_trac_targeting, ERR_MRK "AttrRP: Read request on " @@ -395,6 +397,7 @@ namespace TARGETING break; case SECTION_TYPE_HEAP_ZERO_INIT: + case SECTION_TYPE_HB_HEAP_ZERO_INIT: l_perm = WRITABLE | ALLOCATE_FROM_ZERO; break; @@ -420,12 +423,19 @@ namespace TARGETING break; } - int rc = mm_alloc_block((iv_sections[i].type == - SECTION_TYPE_HEAP_ZERO_INIT ? - NULL : iv_msgQ), - reinterpret_cast( - iv_sections[i].vmmAddress), + int rc = 0; + msg_q_t l_msgQ = iv_msgQ; + + if ( (iv_sections[i].type == SECTION_TYPE_HEAP_ZERO_INIT) || + (iv_sections[i].type == SECTION_TYPE_HB_HEAP_ZERO_INIT) ) + { + l_msgQ = NULL; + } + + rc = mm_alloc_block(l_msgQ, + reinterpret_cast(iv_sections[i].vmmAddress), iv_sections[i].size); + if (rc) { /*@ -- cgit v1.2.1