diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2011-12-01 11:47:33 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-12-08 13:03:52 -0600 |
commit | fdcb470b27bba6782bf6b6a9a60be3e54446f506 (patch) | |
tree | 7a8f5e7325107aec861fb4ae05444caebc6f9c39 /src/usr/initservice/baseinitsvc/initservice.H | |
parent | 47facf10fc682816fd7683b389451b7be9a6dadb (diff) | |
download | talos-hostboot-fdcb470b27bba6782bf6b6a9a60be3e54446f506.tar.gz talos-hostboot-fdcb470b27bba6782bf6b6a9a60be3e54446f506.zip |
Complete virtual memory write path during shutdown sequence
Change-Id: I93a6305b88539d8cf1b41cfc4cde713fd7c19494
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/522
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/initservice/baseinitsvc/initservice.H')
-rw-r--r-- | src/usr/initservice/baseinitsvc/initservice.H | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/src/usr/initservice/baseinitsvc/initservice.H b/src/usr/initservice/baseinitsvc/initservice.H index a31d108c8..4d15ffeec 100644 --- a/src/usr/initservice/baseinitsvc/initservice.H +++ b/src/usr/initservice/baseinitsvc/initservice.H @@ -45,8 +45,8 @@ #include <errl/errlentry.H> #include <initservice/initsvcreasoncodes.H> #include <initservice/taskargs.H> - #include <initservice/initsvcstructs.H> +#include <vmmconst.h> namespace INITSERVICE { @@ -181,6 +181,27 @@ public: errlHndl_t dispatchTask( const TaskInfo *i_ptask, TaskArgs *io_pargs ) const; + /** + * @brief Registry a block/range of vitual memory to be handled during a + * shutdown. + * + * @param[in] i_vaddr - Base virtual address + * @param[in] i_size - Size of virtual memory from base address + * @param[in] i_priority - Order to handle given block(0-Lowest Priority) + * + * @return Nothing + */ + void registerBlock(void* i_vaddr, uint64_t i_size, BlockPriority i_priority); + + /** + * @brief Perform necessary steps, such as FLUSHing, to registered blocks. + * + * @param[in] i_status - Shutdown status to be passed along on shutdown + * + * @return Nothing + */ + void doShutdown(uint64_t i_status); + protected: @@ -202,6 +223,30 @@ private: InitService(const InitService& i_right); InitService& operator=(const InitService& i_right); + /** + * @struct regBlock_t + * @brief Attributes stored for virtual memory ranges that must be handled + * during a shutdown. + */ + struct regBlock_t + { + //Base virtual address + void* vaddr; + //Size of virtual memory from base address + uint64_t size; + //Priority order in which to handle the given block + uint64_t priority; + + /** + * @brief Constructor to initialize a registered block object + */ + regBlock_t(void* i_vaddr, uint64_t i_size, uint64_t i_priority) : + vaddr(i_vaddr), size(i_size), priority(i_priority) {} + }; + + //Store a list of registered blocks + std::vector<regBlock_t*> iv_regBlock; + }; // class InitService } // namespace INITSERVICE |