diff options
-rwxr-xr-x | nuttx/configs/ea3131/src/ea3131_internal.h | 14 | ||||
-rwxr-xr-x | nuttx/configs/ea3131/src/up_boot.c | 9 | ||||
-rwxr-xr-x | nuttx/configs/ea3131/src/up_fillpage.c | 24 |
3 files changed, 46 insertions, 1 deletions
diff --git a/nuttx/configs/ea3131/src/ea3131_internal.h b/nuttx/configs/ea3131/src/ea3131_internal.h index 504212c26..58368e80e 100755 --- a/nuttx/configs/ea3131/src/ea3131_internal.h +++ b/nuttx/configs/ea3131/src/ea3131_internal.h @@ -2,7 +2,7 @@ * configs/ea3131/src/ea3131_internal.h
* arch/arm/src/board/ea3131_internal.n
*
- * 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
@@ -106,6 +106,18 @@ extern void weak_function lpc313x_spiinitialize(void); extern void weak_function lpc313x_usbinitialize(void);
+/************************************************************************************
+ * Name: lpc313x_pginitialize
+ *
+ * Description:
+ * Set up mass storage device to support on demand paging.
+ *
+ ************************************************************************************/
+
+#ifdef CONFIG_PAGING
+extern void weak_function lpc313x_pginitialize(void);
+#endif
+
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_EA3131_SRC_EA3131_INTERNAL_H */
diff --git a/nuttx/configs/ea3131/src/up_boot.c b/nuttx/configs/ea3131/src/up_boot.c index fc37a7ea9..59ed9e778 100755 --- a/nuttx/configs/ea3131/src/up_boot.c +++ b/nuttx/configs/ea3131/src/up_boot.c @@ -107,4 +107,13 @@ void lpc313x_boardinitialize(void) #ifdef CONFIG_ARCH_LEDS
up_ledinit();
#endif
+
+ /* Set up mass storage device to support on demand paging */
+
+#if defined(CONFIG_PAGING)
+ if (lpc313x_pginitialize)
+ {
+ lpc313x_pginitialize();
+ }
+#endif
}
diff --git a/nuttx/configs/ea3131/src/up_fillpage.c b/nuttx/configs/ea3131/src/up_fillpage.c index 2c238c9a1..04f2e8157 100755 --- a/nuttx/configs/ea3131/src/up_fillpage.c +++ b/nuttx/configs/ea3131/src/up_fillpage.c @@ -132,4 +132,28 @@ int up_fillpage(FAR _TCB *tcb, FAR void *vpage, up_pgcallback_t pg_callback) } #endif +/************************************************************************************ + * Name: lpc313x_pginitialize + * + * Description: + * Set up mass storage device to support on demand paging. + * + ************************************************************************************/ + +void weak_function lpc313x_pginitialize(void) +{ + /* This initialization does nothing in this example setup. But this function is + * where you might, for example: + * + * - Initialize and configure a mass storage device to support on-demand paging. + * This might be, perhaps an SD card or NAND memory. An SPI FLASH would probably + * already have been configured by lpc313x_spiinitialize(void); + * - Set up resources to support up_fillpage() operation. For example, perhaps the + * the text image is stored in a named binary file. In this case, the virtual + * text addresses might map to offsets into that file. + * - Do whatever else is necessary to make up_fillpage() ready for the first time + * that it is called. + */ +} + #endif /* CONFIG_PAGING */ |