Add paging initialization point
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2911 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
f30c5d1ad0
commit
a4b42e8a72
@ -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 */
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user