diff options
-rw-r--r-- | src/include/kernel/kernel_reasoncodes.H | 12 | ||||
-rw-r--r-- | src/kernel/cpumgr.C | 15 | ||||
-rw-r--r-- | src/kernel/exception.C | 14 | ||||
-rw-r--r-- | src/lib/assert.C | 16 | ||||
-rwxr-xr-x | src/usr/errl/parser/genErrlParsers.pl | 8 |
5 files changed, 53 insertions, 12 deletions
diff --git a/src/include/kernel/kernel_reasoncodes.H b/src/include/kernel/kernel_reasoncodes.H index 45aa510b3..72366b24e 100644 --- a/src/include/kernel/kernel_reasoncodes.H +++ b/src/include/kernel/kernel_reasoncodes.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* [+] 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. */ @@ -26,22 +28,24 @@ #include <usr/hbotcompid.H> - +namespace KERNEL +{ enum KernelModuleId { MOD_KERNEL_INVALID = 0x00, /**< Zero is an invalid module id */ MOD_KERNEL_TERMINATE = 0x01, /**< terminate.C : save SRC */ - + }; enum KernelReasonCode { //NOTE: RC_ASSERT and RC_SHUTDOWN must be used in one unique - // locationto maintain uniqueness as they will be used + // location to maintain uniqueness as they will be used // without a MODULE ID. RC_ASSERT = KERNEL_COMP_ID | 0x01, /**< Assert */ RC_SHUTDOWN = KERNEL_COMP_ID | 0x02, /**< Shutdown */ RC_UNHANDLED_EX = KERNEL_COMP_ID | 0x03, /**< Unhandled Except. */ }; +} #endif diff --git a/src/kernel/cpumgr.C b/src/kernel/cpumgr.C index 93248ea98..e6bf08dd9 100644 --- a/src/kernel/cpumgr.C +++ b/src/kernel/cpumgr.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2010,2016 */ +/* Contributors Listed Below - COPYRIGHT 2010,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -487,9 +487,18 @@ void CpuManager::forceMemoryPeriodic() void CpuManager::critAssert(uint64_t i_failAddr) { + /*@ + * @errortype + * @moduleid KERNEL::MOD_KERNEL_INVALID + * @reasoncode KERNEL::RC_SHUTDOWN + * @userdata1 Failing address + * @userdata2 <unused> + * @devdesc Kernel encountered an unhandled exception. + * @custdesc Boot firmware has crashed with an internal + * error. + */ /* create SRC amd call terminate immediate*/ - - termWriteSRC(TI_CRIT_ASSERT,RC_SHUTDOWN, i_failAddr); + termWriteSRC(TI_CRIT_ASSERT,KERNEL::RC_SHUTDOWN, i_failAddr); class ExecuteCritAssert : public DeferredWork { diff --git a/src/kernel/exception.C b/src/kernel/exception.C index 2dd17e574..781e7941d 100644 --- a/src/kernel/exception.C +++ b/src/kernel/exception.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2010,2016 */ +/* Contributors Listed Below - COPYRIGHT 2010,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -406,6 +406,16 @@ void kernel_execute_unhandled_exception() exception, t->tid, t->context.nip); MAGIC_INSTRUCTION(MAGIC_BREAK_ON_ERROR); - termWriteSRC(TI_UNHANDLED_EX, RC_UNHANDLED_EX, exception); + /*@ + * @errortype + * @moduleid KERNEL::MOD_KERNEL_INVALID + * @reasoncode KERNEL::RC_UNHANDLED_EX + * @userdata1 Exception type + * @userdata2 <unused> + * @devdesc Kernel encountered an unhandled exception. + * @custdesc Boot firmware has crashed with an internal + * error. + */ + termWriteSRC(TI_UNHANDLED_EX, KERNEL::RC_UNHANDLED_EX, exception); terminateExecuteTI(); } diff --git a/src/lib/assert.C b/src/lib/assert.C index e9ad3bf4e..953393c31 100644 --- a/src/lib/assert.C +++ b/src/lib/assert.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2017 */ +/* [+] 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. */ @@ -77,8 +79,18 @@ extern "C" void __assert(AssertBehavior i_assertb, int i_line) printk("Assertion failed @%p on line %d. (kassert)\n", linkRegister(), i_line); + /*@ + * @errortype + * @moduleid KERNEL::MOD_KERNEL_INVALID + * @reasoncode KERNEL::RC_ASSERT + * @userdata1 Failing address + * @userdata2 <unused> + * @devdesc Kernel has asserted + * @custdesc Boot firmware has crashed with an internal + * error. + */ // Call function to create SRC and update TI Data area - termWriteSRC(TI_KERNEL_ASSERT, RC_ASSERT, + termWriteSRC(TI_KERNEL_ASSERT, KERNEL::RC_ASSERT, reinterpret_cast<uint64_t>(linkRegister())); // Call to force TI diff --git a/src/usr/errl/parser/genErrlParsers.pl b/src/usr/errl/parser/genErrlParsers.pl index 6ddcdb113..c24df2f34 100755 --- a/src/usr/errl/parser/genErrlParsers.pl +++ b/src/usr/errl/parser/genErrlParsers.pl @@ -6,7 +6,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2013,2016 +# Contributors Listed Below - COPYRIGHT 2013,2017 # [+] Google Inc. # [+] International Business Machines Corp. # @@ -96,6 +96,12 @@ getFilesToParse($compIncPath); getFilesToParse($genFilesPath); getPluginDirsToParse($compPath); +#Add kernel/lib files for TI SRC descriptions +getReasonCodeFiles($base."/src/include/kernel"); +getFilesToParse($base."/src/kernel"); +getFilesToParse($base."/src/lib"); + + if ($DEBUG) { print("---> ReasonCode files to process\n"); |