Documentation: address first batch of comments (in #38)

This commit is contained in:
fincs 2018-01-28 18:34:08 +01:00 committed by plutoo
parent cbd367c8a0
commit 8496f36879
5 changed files with 10 additions and 7 deletions

View File

@ -12,6 +12,7 @@
* @param addr Address of the buffer. * @param addr Address of the buffer.
* @param size Size of the buffer, in bytes. * @param size Size of the buffer, in bytes.
* @remarks Cache flush is defined as Clean + Invalidate. * @remarks Cache flush is defined as Clean + Invalidate.
* @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register).
*/ */
void armDCacheFlush(void* addr, size_t size); void armDCacheFlush(void* addr, size_t size);
@ -19,6 +20,7 @@ void armDCacheFlush(void* addr, size_t size);
* @brief Performs a data cache clean on the specified buffer. * @brief Performs a data cache clean on the specified buffer.
* @param addr Address of the buffer. * @param addr Address of the buffer.
* @param size Size of the buffer, in bytes. * @param size Size of the buffer, in bytes.
* @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register).
*/ */
void armDCacheClean(void* addr, size_t size); void armDCacheClean(void* addr, size_t size);
@ -26,6 +28,7 @@ void armDCacheClean(void* addr, size_t size);
* @brief Performs an instruction cache invalidation clean on the specified buffer. * @brief Performs an instruction cache invalidation clean on the specified buffer.
* @param addr Address of the buffer. * @param addr Address of the buffer.
* @param size Size of the buffer, in bytes. * @param size Size of the buffer, in bytes.
* @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register).
*/ */
void armICacheInvalidate(void* addr, size_t size); void armICacheInvalidate(void* addr, size_t size);
@ -33,5 +36,6 @@ void armICacheInvalidate(void* addr, size_t size);
* @brief Performs a data cache zeroing operation on the specified buffer. * @brief Performs a data cache zeroing operation on the specified buffer.
* @param addr Address of the buffer. * @param addr Address of the buffer.
* @param size Size of the buffer, in bytes. * @param size Size of the buffer, in bytes.
* @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register).
*/ */
void armDCacheZero(void* addr, size_t size); void armDCacheZero(void* addr, size_t size);

View File

@ -57,10 +57,7 @@ static inline void ipcInitialize(IpcCommand* cmd) {
cmd->NumHandlesMove = 0; cmd->NumHandlesMove = 0;
} }
/** /// IPC buffer descriptor.
* @brief IPC buffer descriptor.
* @todo Make sure sizeof isn't 16 bytes!
*/
typedef struct { typedef struct {
u32 Size; ///< Size of the buffer. u32 Size; ///< Size of the buffer.
u32 Addr; ///< Lower 32-bits of the address of the buffer u32 Addr; ///< Lower 32-bits of the address of the buffer

View File

@ -11,7 +11,7 @@
bool kernelAbove200(void); bool kernelAbove200(void);
/// Returns true if the kernel version is equal to or above 3.0.0. /// Returns true if the kernel version is equal to or above 3.0.0.
bool kernelAbove300(void); bool kernelAbove300(void);
/// Returns true if the kernel version is equal to or above 2.0.0. /// Returns true if the kernel version is equal to or above 4.0.0.
bool kernelAbove400(void); bool kernelAbove400(void);
/// Returns true if code is running under a debugger. /// Returns true if the process has a debugger attached.
bool detectDebugger(void); bool detectDebugger(void);

View File

@ -16,6 +16,7 @@ typedef _LOCK_RECURSIVE_T RMutex;
/** /**
* @brief Initializes a mutex. * @brief Initializes a mutex.
* @param m Mutex object. * @param m Mutex object.
* @note A mutex can also be statically initialized by assigning 0 to it.
*/ */
static inline void mutexInit(Mutex* m) static inline void mutexInit(Mutex* m)
{ {
@ -37,6 +38,7 @@ void mutexUnlock(Mutex* m);
/** /**
* @brief Initializes a recursive mutex. * @brief Initializes a recursive mutex.
* @param m Recursive mutex object. * @param m Recursive mutex object.
* @note A recursive mutex can also be statically initialized by assigning {0,0,0} to it.
*/ */
static inline void rmutexInit(RMutex* m) static inline void rmutexInit(RMutex* m)
{ {

View File

@ -39,7 +39,7 @@ enum {
typedef void NORETURN (*LoaderReturnFn)(int result_code); typedef void NORETURN (*LoaderReturnFn)(int result_code);
/** /**
* @brief Sets up the homebrew environment (internally called). * @brief Parses the homebrew loader environment block (internally called).
* @param ctx Reserved. * @param ctx Reserved.
* @param main_thread Reserved. * @param main_thread Reserved.
* @param saved_lr Reserved. * @param saved_lr Reserved.