From 8f6cf7d7310dd8980dd1abca6692ed1c59111f62 Mon Sep 17 00:00:00 2001 From: Mike Baiocchi Date: Fri, 10 Nov 2017 09:57:21 -0600 Subject: Add TCE Support to utillidmgr This commit looks to see if the system is using TCEs and then uses them in the utillidmgr. There were also some updates to the TCE interfaces to allow for this support. Change-Id: Iccaf0137c2924d3f3806fee1a8068ba2e23cb7d2 RTC:68295 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49530 Tested-by: Jenkins Server Reviewed-by: Marshall J. Wilks Reviewed-by: Nicholas E. Bofferding Reviewed-by: Stephen M. Cprek Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/include/usr/util/utiltce.H | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src/include') diff --git a/src/include/usr/util/utiltce.H b/src/include/usr/util/utiltce.H index f71946fee..0aaffacf1 100644 --- a/src/include/usr/util/utiltce.H +++ b/src/include/usr/util/utiltce.H @@ -45,34 +45,40 @@ namespace TCE * @param[in] i_startingAddress - Starting physical address that the allocated * TCEs will map to. * Needs to be Page-Aligned or will fail. + * * @param[in] i_size - Size of the address space that TCEs map to. * Size must be less than (512K * PAGESIZE) or will fail. * Assert if not greater than zero. * + * @param[out] o_startingToken - Starting Entry into the table. + * (This is an offset into the array based on the + * TCE index * PAGESIZE. Each TCE entry maps to + * a pagesize of memory) + * * Note: First time this is called will cause TCE Table to be created and * the Processors to be setup to point at the TCE Table * * @return errlHndl_t - Return Error Handle if failed * */ -errlHndl_t utilAllocateTces(uint64_t i_startingAddress, - size_t i_size); +errlHndl_t utilAllocateTces(uint64_t i_startingAddress, + size_t i_size, + uint32_t& o_startingToken); /** * @brief Responsible for deallocating TCEs * - * @param[in] i_startingAddress Starting physical address of the TCEs that - * are to be deallocated from the TCE Table. - * Needs to be page-aligned or will fail. - * @param[in] i_size - Size of address space that the TCEs that are to - * be deallocated map to. + * @param[in] i_startingToken Token indicating the starting entry of the + * TCE Table to remove + * + * @param[in] i_size - Size of memory space to remove associated TCE entries * Size must be less than (512K * PAGESIZE) or will fail. * Assert if not greater than zero. * * @return errlHndl_t - Return Error Handle if failed * */ -errlHndl_t utilDeallocateTces(uint64_t i_startingAddress, +errlHndl_t utilDeallocateTces(uint32_t i_startingToken, size_t i_size); -- cgit v1.2.1