/* SPDX-License-Identifier: GPL-2.0 */ /* We need to carefully read the error status, ACK the errors, *preventrecursivetraps,andpasstheinformationontoC *codeforlogging. * *WepasstheAFARinas-is,andweencodethestatus *informationasdescribedinasm-sparc64/sfafsr.h
*/
.type __spitfire_access_error,#function
__spitfire_access_error: /* Disable ESTATE error reporting so that we do not take *recursivetrapsandREDstatetheprocessor.
*/ stxa %g0, [%g0] ASI_ESTATE_ERROR_EN
membar #Sync
mov UDBE_UE, %g1
ldxa [%g0] ASI_AFSR, %g4 ! Get AFSR
/* __spitfire_cee_trap branches here with AFSR in %g4 and *UDBE_CEin%g1.ItonlyclearsESTATE_ERR_CEintheESTATE *ErrorEnableregister.
*/
__spitfire_cee_trap_continue:
ldxa [%g0] ASI_AFAR, %g5 ! Get AFAR
/* This is the trap handler entry point for ECC correctable *errors.Theyarecorrected,butwelistenforthetrapso *thattheeventcanbelogged. * *Disruptingerrorsareeither: *1)single-bitECCerrorsduringUDBreadstosystem *memory *2)dataparityerrorsduringwrite-backevents * *AsfarasIcanmakeoutfromthemanual,theCEEtrapis *onlyforcorrectableerrorsduringmemoryreadaccessesby *thefront-endoftheprocessor. * *Thecodebelowisonlyfortraplevel1CEEevents,asit *istheonlysituationwherewecansafelyrecordandlog. *Fortraplevel>1wejustcleartheCEbitintheAFSRand *return. * *Thisisjustlike__spiftire_access_errorabove,butit *specificallyhandlescorrectableerrors.Ifan *uncorrectableerrorisindicatedintheAFSRwewillbranch *directlyaboveto__spitfire_access_errortohandleit *instead.Uncorrectablethereforetakespriorityover *correctable,andtheerrorloggingCcodewillnoticethis *casebyinspectingthetraptype.
*/
.type __spitfire_cee_trap,#function
__spitfire_cee_trap:
ldxa [%g0] ASI_AFSR, %g4 ! Get AFSR
mov 1, %g3 sllx %g3, SFAFSR_UE_SHIFT, %g3
andcc %g4, %g3, %g0 ! Check for UE
bne,pn %xcc, __spitfire_access_error
nop
/* Ok, in this case we only have a correctable error. *Indicateweonlywishtocapturethatstateinregister *%g1,andweonlydisableCEerrorreportingunlikeUE *handlingwhichdisablesallerrors.
*/
ldxa [%g0] ASI_ESTATE_ERROR_EN, %g3
andn %g3, ESTATE_ERR_CE, %g3 stxa %g3, [%g0] ASI_ESTATE_ERROR_EN
membar #Sync
/* Preserve AFSR in %g4, indicate UDB state to capture in %g1 */
ba,pt %xcc, __spitfire_cee_trap_continue
mov UDBE_CE, %g1
.size __spitfire_cee_trap,.-__spitfire_cee_trap
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.