diff --git a/Kernel/arch/x86/include/vm8086.h b/Kernel/arch/x86/include/vm8086.h index 353ad7a310dbd3bac98f81d16b1713462d04003e..7c8dd47dd842c782ac462b7d9ccf6a81eae29b6f 100644 --- a/Kernel/arch/x86/include/vm8086.h +++ b/Kernel/arch/x86/include/vm8086.h @@ -56,7 +56,7 @@ extern void *VM8086_Allocate(tVM8086 *State, int Size, Uint16 *Segment, Uint16 * * \param Offset Source Offset * \return Host pointer to the emulated memory */ -extern void *VM8086_GetPointer(tVM8086 *State, Uint16 Segment, Uint16 Ofs); +extern void *VM8086_GetPointer(tVM8086 *State, Uint16 Segment, Uint16 Offset); /** * \brief Calls a real-mode interrupt described by the current state of the IVT. * \param State Emulator State diff --git a/Kernel/arch/x86/time.c b/Kernel/arch/x86/time.c index c38a9cd43c2f17b8cd75c53468f28da40f468247..6a2d0399218713d28e7830a84230cb0e11b3586d 100644 --- a/Kernel/arch/x86/time.c +++ b/Kernel/arch/x86/time.c @@ -67,8 +67,8 @@ int Time_Setup(void) } /** - * \fn void Time_Interrupt(void) * \brief Called on the timekeeping IRQ + * \param irq IRQ number (unused) */ void Time_Interrupt(int irq) { diff --git a/Kernel/arch/x86_64/include/vm8086.h b/Kernel/arch/x86_64/include/vm8086.h index 353ad7a310dbd3bac98f81d16b1713462d04003e..7c8dd47dd842c782ac462b7d9ccf6a81eae29b6f 100644 --- a/Kernel/arch/x86_64/include/vm8086.h +++ b/Kernel/arch/x86_64/include/vm8086.h @@ -56,7 +56,7 @@ extern void *VM8086_Allocate(tVM8086 *State, int Size, Uint16 *Segment, Uint16 * * \param Offset Source Offset * \return Host pointer to the emulated memory */ -extern void *VM8086_GetPointer(tVM8086 *State, Uint16 Segment, Uint16 Ofs); +extern void *VM8086_GetPointer(tVM8086 *State, Uint16 Segment, Uint16 Offset); /** * \brief Calls a real-mode interrupt described by the current state of the IVT. * \param State Emulator State diff --git a/Kernel/arch/x86_64/mm_phys.c b/Kernel/arch/x86_64/mm_phys.c index c67b905290564cf7b29712a32ec8090eb2b9ca0c..0130773f122516fc56beccc20bb20e7777a03194 100644 --- a/Kernel/arch/x86_64/mm_phys.c +++ b/Kernel/arch/x86_64/mm_phys.c @@ -307,24 +307,24 @@ void MM_InitPhys_Multiboot(tMBoot_Info *MBoot) /** * \brief Allocate a contiguous range of physical pages with a maximum - * bit size of \a Bits - * \param Num Number of pages to allocate - * \param Bits Maximum size of the physical address - * \note If \a Bits is <= 0, any sized address is used (with preference + * bit size of \a MaxBits + * \param Pages Number of pages to allocate + * \param MaxBits Maximum size of the physical address + * \note If \a MaxBits is <= 0, any sized address is used (with preference * to higher addresses) */ -tPAddr MM_AllocPhysRange(int Num, int Bits) +tPAddr MM_AllocPhysRange(int Pages, int MaxBits) { tPAddr addr, ret; int rangeID; int nFree = 0, i; - ENTER("iNum iBits", Num, Bits); + ENTER("iPages iBits", Pages, MaxBits); - if( Bits <= 0 || Bits >= 64 ) // Speedup for the common case + if( MaxBits <= 0 || MaxBits >= 64 ) // Speedup for the common case rangeID = MM_PHYS_MAX; else - rangeID = MM_int_GetRangeID( (1LL << Bits) - 1 ); + rangeID = MM_int_GetRangeID( (1LL << MaxBits) - 1 ); LOG("rangeID = %i", rangeID); @@ -344,14 +344,14 @@ tPAddr MM_AllocPhysRange(int Num, int Bits) Warning(" MM_AllocPhysRange: Out of free pages"); Log_Warning("Arch", "Out of memory (unable to fulfil request for %i pages), zero remaining", - Num + Pages ); LEAVE('i', 0); return 0; } // Check if there is enough in the range - if(giPhysRangeFree[rangeID] >= Num) + if(giPhysRangeFree[rangeID] >= Pages) { LOG("{%i,0x%x -> 0x%x}", giPhysRangeFree[rangeID], @@ -389,14 +389,14 @@ tPAddr MM_AllocPhysRange(int Num, int Bits) } nFree ++; addr ++; - LOG("nFree(%i) == %i (0x%x)", nFree, Num, addr); + LOG("nFree(%i) == %i (0x%x)", nFree, Pages, addr); if(nFree == Num) break; } LOG("nFree = %i", nFree); // If we don't find a contiguous block, nFree will not be equal // to Num, so we set it to zero and do the expensive lookup. - if(nFree != Num) nFree = 0; + if(nFree != Pages) nFree = 0; } if( !nFree ) @@ -420,8 +420,8 @@ tPAddr MM_AllocPhysRange(int Num, int Bits) LOG("nFree = %i, addr = 0x%08x", nFree, addr); // Mark pages as allocated - addr -= Num; - for( i = 0; i < Num; i++, addr++ ) + addr -= Pages; + for( i = 0; i < Pages; i++, addr++ ) { gaMainBitmap[addr >> 6] |= 1LL << (addr & 63); rangeID = MM_int_GetRangeID(addr << 12); @@ -433,10 +433,10 @@ tPAddr MM_AllocPhysRange(int Num, int Bits) ret = addr; // Save the return address // Update super bitmap - Num += addr & (64-1); + Pages += addr & (64-1); addr &= ~(64-1); - Num = (Num + (64-1)) & ~(64-1); - for( i = 0; i < Num/64; i++ ) + Pages = (Pages + (64-1)) & ~(64-1); + for( i = 0; i < Pages/64; i++ ) { if( gaMainBitmap[ addr >> 6 ] + 1 == 0 ) gaSuperBitmap[addr>>12] |= 1LL << ((addr >> 6) & 63); diff --git a/Kernel/drv/dma.c b/Kernel/drv/dma.c index 56ab7e54db2f583b0ce2f8f9aafd3f0715ec7b22..798a3e40bb167df8a54eb536122fca649ac9925a 100644 --- a/Kernel/drv/dma.c +++ b/Kernel/drv/dma.c @@ -39,8 +39,8 @@ t_dmaChannel dma_channels[8]; // === CODE === /** - * \fn int DMA_Install(void) * \brief Initialise DMA channels + * \param Arguments Arguments passed at boot time */ int DMA_Install(char **Arguments) { diff --git a/Kernel/drv/kb.c b/Kernel/drv/kb.c index 28feb05b50f870c39c38e16a3763d9b20aaff5e9..923a58fc9a3e9d88151ac1e7d5a0aa4f15ecd71d 100644 --- a/Kernel/drv/kb.c +++ b/Kernel/drv/kb.c @@ -54,7 +54,7 @@ Uint8 gbaKB_States[3][256]; // === CODE === /** - * \fn int KB_Install(char **Arguments) + * \brief Install the keyboard driver */ int KB_Install(char **Arguments) { @@ -74,8 +74,8 @@ int KB_Install(char **Arguments) } /** - * \fn void KB_IRQHandler() * \brief Called on a keyboard IRQ + * \param IRQNum IRQ number (unused) */ void KB_IRQHandler(int IRQNum) { diff --git a/Kernel/drv/pci.c b/Kernel/drv/pci.c index ec96d8661d6b59d501ae1a8c38927202adadc460..1f9e7285607bdc0029e349a924401b4a7d5f7a6b 100644 --- a/Kernel/drv/pci.c +++ b/Kernel/drv/pci.c @@ -79,8 +79,8 @@ Uint32 gaPCI_BusBitmap[256/32]; // === CODE === /** - * \fn int PCI_Install() * \brief Scan the PCI Bus for devices + * \param Arguments Boot-time parameters */ int PCI_Install(char **Arguments) { diff --git a/Kernel/heap.c b/Kernel/heap.c index b55687b8eabf253c44a5d98c8e2ce58e88daf430..4c0232e0eaaabbdc0fb8e3240e33b5338c879968 100644 --- a/Kernel/heap.c +++ b/Kernel/heap.c @@ -441,18 +441,18 @@ void *Heap_Reallocate(const char *File, int Line, void *__ptr, size_t __size) } /** - * \fn void *Heap_AllocateZero(const char *File, int Line, size_t size) + * \fn void *Heap_AllocateZero(const char *File, int Line, size_t Bytes) * \brief Allocate and Zero a buffer in memory * \param File Allocating file * \param Line Line of allocation - * \param size Size of the allocation + * \param Bytes Size of the allocation */ -void *Heap_AllocateZero(const char *File, int Line, size_t size) +void *Heap_AllocateZero(const char *File, int Line, size_t Bytes) { - void *ret = Heap_Allocate(File, Line, size); + void *ret = Heap_Allocate(File, Line, Bytes); if(ret == NULL) return NULL; - memset( ret, 0, size ); + memset( ret, 0, Bytes ); return ret; } diff --git a/Kernel/include/acess.h b/Kernel/include/acess.h index 9549ede39a12a8dfb9d630f0d034d35c05625593..e6afcf5e1f15441f9c796fe967aba3a676b5144e 100644 --- a/Kernel/include/acess.h +++ b/Kernel/include/acess.h @@ -262,6 +262,7 @@ extern tPAddr MM_AllocPhys(void); /** * \brief Allocate a contiguous range of physical pages * \param Pages Number of pages to allocate + * \param MaxBits Maximum number of address bits allowed * \return First physical address allocated */ extern tPAddr MM_AllocPhysRange(int Pages, int MaxBits); diff --git a/Kernel/include/vfs_ext.h b/Kernel/include/vfs_ext.h index cfd6949769c0b46d298023bd3a789768853870e6..1a5fab6863316813c28ba4d5a6838661f088e76e 100644 --- a/Kernel/include/vfs_ext.h +++ b/Kernel/include/vfs_ext.h @@ -165,10 +165,10 @@ extern int VFS_ChRoot(char *New); * \brief Change the location of the current file pointer * \param FD File handle returned by ::VFS_Open * \param Offset Offset within the file to go to - * \param Direction A direction from ::eVFS_SeekDirs + * \param Whence A direction from ::eVFS_SeekDirs * \return Boolean success */ -extern int VFS_Seek(int FD, Sint64 Offset, int Direction); +extern int VFS_Seek(int FD, Sint64 Offset, int Whence); /** * \brief Returns the current file pointer * \param FD File handle returned by ::VFS_Open diff --git a/Kernel/lib.c b/Kernel/lib.c index b512022d938935bca8743212d233726e0c2ae1fc..cab15b3c758b363fec6af1dc2750e6c50007c112 100644 --- a/Kernel/lib.c +++ b/Kernel/lib.c @@ -687,8 +687,10 @@ Uint rand(void) return giRandomState; } -/// \name Memory Validation -/// \{ +/* * + * \name Memory Validation + * \{ + */ /** * \brief Checks if a string resides fully in valid memory */ @@ -754,7 +756,9 @@ int CheckMem(void *Mem, int NumBytes) } return 0; } -/// \} +/* * + * \} + */ /** * \brief Search a string array for \a Needle diff --git a/Kernel/modules.c b/Kernel/modules.c index 87511aa656c4dfa91c4e2d6654476b9d3e47151a..58521baacafa28ae1791badb4012b5ac9de8ce3b 100644 --- a/Kernel/modules.c +++ b/Kernel/modules.c @@ -254,7 +254,8 @@ void Modules_LoadBuiltins() /** * \brief Initialise a builtin module given it's name - * \example Used by VTerm to load an alternate video driver at runtime + * + * E.g. Used by VTerm to load an alternate video driver at runtime */ int Modules_InitialiseBuiltin(const char *Name) { diff --git a/Kernel/system.c b/Kernel/system.c index df9ac414fb4bc866782d619e2c5f2ad523d405b3..da1dc92f07c063a6b9d48debe87090c0e2121736 100644 --- a/Kernel/system.c +++ b/Kernel/system.c @@ -221,7 +221,8 @@ void System_ParseVFS(char *Arg) } /** - * \biref Parse a module argument string + * \brief Parse a module argument string + * \param Arg Argument string */ void System_ParseModuleArgs(char *Arg) { diff --git a/Kernel/vfs/fs/devfs.c b/Kernel/vfs/fs/devfs.c index 098ac4f6a15f1ed5851f3ff59689173eeebab84d..3974573354777159bdd0170cf993779ef8570d3e 100644 --- a/Kernel/vfs/fs/devfs.c +++ b/Kernel/vfs/fs/devfs.c @@ -128,7 +128,7 @@ char *DevFS_ReadDir(tVFS_Node *Node, int Pos) } /** - * \fn tVFS_Node *DevFS_FindDir(tVFS_Node *Node, char *Name) + * \fn tVFS_Node *DevFS_FindDir(tVFS_Node *Node, const char *Name) * \brief Get an entry from the devices directory */ tVFS_Node *DevFS_FindDir(tVFS_Node *Node, const char *Name) diff --git a/Kernel/vfs/open.c b/Kernel/vfs/open.c index 118380fd340e4160babee9a2aaaf229e5db8d262..3a2622f55772e208712c66e0682a909a69c9951e 100644 --- a/Kernel/vfs/open.c +++ b/Kernel/vfs/open.c @@ -167,7 +167,7 @@ char *VFS_GetAbsPath(const char *Path) } /** - * \fn char *VFS_ParsePath(char *Path, char **TruePath) + * \fn char *VFS_ParsePath(const char *Path, char **TruePath) * \brief Parses a path, resolving sysmlinks and applying permissions */ tVFS_Node *VFS_ParsePath(const char *Path, char **TruePath)