diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-08-31 02:21:12 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-08-31 02:21:12 +0000 |
commit | a66cf9d6e86bc95a25e21e746000e602e6f1ecbc (patch) | |
tree | 21c35973ac5cd59ec676a68423140c3a42ce4231 /nuttx/arch/arm/src | |
parent | e3dbd274922d727842086ad42df644308dfc668d (diff) | |
download | px4-nuttx-a66cf9d6e86bc95a25e21e746000e602e6f1ecbc.tar.gz px4-nuttx-a66cf9d6e86bc95a25e21e746000e602e6f1ecbc.tar.bz2 px4-nuttx-a66cf9d6e86bc95a25e21e746000e602e6f1ecbc.zip |
Add paging debug instrumentation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2899 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src')
-rw-r--r-- | nuttx/arch/arm/src/arm/up_dataabort.c | 6 | ||||
-rw-r--r-- | nuttx/arch/arm/src/arm/up_prefetchabort.c | 5 | ||||
-rw-r--r-- | nuttx/arch/arm/src/lpc313x/lpc313x_spi.c | 5 |
3 files changed, 10 insertions, 6 deletions
diff --git a/nuttx/arch/arm/src/arm/up_dataabort.c b/nuttx/arch/arm/src/arm/up_dataabort.c index 5ad67a9c6..49eb5b6a6 100644 --- a/nuttx/arch/arm/src/arm/up_dataabort.c +++ b/nuttx/arch/arm/src/arm/up_dataabort.c @@ -123,6 +123,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr) * fatal error. */ + pglldbg("FSR: %08x FAR: %08x\n", fsr, far); if ((fsr & FSR_MASK) != FSR_PAGE) { goto segfault; @@ -133,6 +134,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr) * (It has not yet been saved in the register context save area). */ + pgllvdbg("VBASE: %08x VEND: %08x\n", PG_PAGED_VBASE, PG_PAGED_VEND); if (far < PG_PAGED_VBASE || far >= PG_PAGED_VEND) { goto segfault; @@ -162,7 +164,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr) return; segfault: - lldbg("Data abort at PC: %x FAR: %08x FSR: %08x\n", regs[REG_PC], far, fsr); + lldbg("Data abort. PC: %08x FAR: %08x FSR: %08x\n", regs[REG_PC], far, fsr); PANIC(OSERR_ERREXCEPTION); } @@ -178,7 +180,7 @@ void up_dataabort(uint32_t *regs) /* Crash -- possibly showing diagnost debug information. */ - lldbg("Data abort at %08x\n", regs[REG_PC]); + lldbg("Data abort. PC: %08x\n", regs[REG_PC]); PANIC(OSERR_ERREXCEPTION); } diff --git a/nuttx/arch/arm/src/arm/up_prefetchabort.c b/nuttx/arch/arm/src/arm/up_prefetchabort.c index 14451fbab..ea70a2ff5 100644 --- a/nuttx/arch/arm/src/arm/up_prefetchabort.c +++ b/nuttx/arch/arm/src/arm/up_prefetchabort.c @@ -105,6 +105,9 @@ void up_prefetchabort(uint32_t *regs) * virtual addresses. */ + pglldbg("VADDR: %08x VBASE: %08x VEND: %08x\n", + regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND); + if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND) { /* Save the offending PC as the fault address in the TCB of the currently @@ -133,7 +136,7 @@ void up_prefetchabort(uint32_t *regs) else #endif { - lldbg("Prefetch abort at %08x\n", regs[REG_PC]); + lldbg("Prefetch abort. PC: %08x\n", regs[REG_PC]); PANIC(OSERR_ERREXCEPTION); } } diff --git a/nuttx/arch/arm/src/lpc313x/lpc313x_spi.c b/nuttx/arch/arm/src/lpc313x/lpc313x_spi.c index 780969576..98c3dc64d 100644 --- a/nuttx/arch/arm/src/lpc313x/lpc313x_spi.c +++ b/nuttx/arch/arm/src/lpc313x/lpc313x_spi.c @@ -1,7 +1,7 @@ /************************************************************************************ * arm/arm/src/lpc313x/lpc313x_spi.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -568,8 +568,7 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) { FAR struct lpc313x_spidev_s *priv = (FAR struct lpc313x_spidev_s *)dev; - - DEBUGASSERT(priv && priv->spibase); + DEBUGASSERT(priv); spi_writeword(priv, wd); return spi_readword(priv); |