summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorElizabeth Liner <eliner@us.ibm.com>2016-07-27 15:13:03 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-09-26 14:41:38 -0400
commit9b2a0194995ebfdd070cf5facb0743fb08fdc38e (patch)
treebc08dd6d1a00b5350325a531b7e96bbac2d644d6 /src/lib
parent1f8764f7c1673eb85a40ab36be14888f84e57545 (diff)
downloadtalos-hostboot-9b2a0194995ebfdd070cf5facb0743fb08fdc38e.tar.gz
talos-hostboot-9b2a0194995ebfdd070cf5facb0743fb08fdc38e.zip
Porting non-hdat from powervm-p8 into master-p8
Change-Id: I49d20a8c64bd5702aeceeff77bc5119f52996d21 RTC:156618 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29810 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/math.C17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/math.C b/src/lib/math.C
index c6319aad4..e590745db 100644
--- a/src/lib/math.C
+++ b/src/lib/math.C
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,2016 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -29,3 +31,16 @@ double sqrt(double x)
return _x;
}
+/*****************************************************************************
+ * pow
+ *****************************************************************************/
+uint64_t pow(const uint32_t base, const uint32_t exp)
+{
+ uint64_t result = 1;
+ for (uint32_t i=1; i <= exp; i++)
+ {
+ result = result * base;
+ }
+ return result;
+}
+
OpenPOWER on IntegriCloud