From a1d478230e86a315a30c89834dc851c63c173cfc Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 6 May 2009 16:36:52 +0000 Subject: 2009-05-06 Joel Sherrill * page.c: Fixed warnings. --- c/src/lib/libcpu/i386/ChangeLog | 4 ++++ c/src/lib/libcpu/i386/page.c | 51 ++++++++++++++++++++++++++++------------- 2 files changed, 39 insertions(+), 16 deletions(-) (limited to 'c/src/lib/libcpu/i386') diff --git a/c/src/lib/libcpu/i386/ChangeLog b/c/src/lib/libcpu/i386/ChangeLog index 9c11972f70..803eb83ae5 100644 --- a/c/src/lib/libcpu/i386/ChangeLog +++ b/c/src/lib/libcpu/i386/ChangeLog @@ -1,3 +1,7 @@ +2009-05-06 Joel Sherrill + + * page.c: Fixed warnings. + 2008-12-03 Joel Sherrill Michael South diff --git a/c/src/lib/libcpu/i386/page.c b/c/src/lib/libcpu/i386/page.c index 93d40e7b97..b27dc2b920 100644 --- a/c/src/lib/libcpu/i386/page.c +++ b/c/src/lib/libcpu/i386/page.c @@ -42,7 +42,8 @@ extern uint32_t rtemsFreeMemStart; /* * Disable the paging */ -void _CPU_disable_paging(void) { +void _CPU_disable_paging(void) +{ cr0 regCr0; rtems_cache_flush_entire_data(); @@ -54,7 +55,8 @@ void _CPU_disable_paging(void) { /* * Enable the paging */ -void _CPU_enable_paging(void) { +void _CPU_enable_paging(void) +{ cr0 regCr0; regCr0.i = i386_get_cr0(); @@ -68,8 +70,8 @@ void _CPU_enable_paging(void) { * Initialize the paging with 1-to-1 mapping */ -int init_paging(void) { - +int init_paging(void) +{ int memorySize; int nbPages; int nbInitPages; @@ -156,7 +158,8 @@ int init_paging(void) { /* * Is cache enable */ -int _CPU_is_cache_enabled() { +int _CPU_is_cache_enabled(void) +{ cr0 regCr0; regCr0.i = i386_get_cr0(); @@ -166,7 +169,8 @@ int _CPU_is_cache_enabled() { /* * Is paging enable */ -int _CPU_is_paging_enabled() { +int _CPU_is_paging_enabled(void) +{ cr0 regCr0; regCr0.i = i386_get_cr0(); @@ -179,9 +183,13 @@ int _CPU_is_paging_enabled() { * the translated address in mappedAddress */ -int _CPU_map_phys_address - (void **mappedAddress, void *physAddress, int size, int flag){ - +int _CPU_map_phys_address( + void **mappedAddress, + void *physAddress, + int size, + int flag +) +{ page_table *localPageTable; unsigned int lastAddress, countAddress; char *Tables; @@ -199,7 +207,7 @@ int _CPU_map_phys_address lastAddress = (unsigned int)physAddress + (size - 1); virtualAddress.address = 0; - while (1){ + while (1) { if ((countAddress & ~MASK_OFFSET) > (lastAddress & ~MASK_OFFSET)) break; @@ -273,7 +281,8 @@ int _CPU_map_phys_address * "Compress" the Directory and Page tables to avoid * important loss of address range */ -static void Paging_Table_Compress() { +static void Paging_Table_Compress(void) +{ unsigned int dirCount, pageCount; page_table *localPageTable; @@ -325,7 +334,11 @@ static void Paging_Table_Compress() { * (we do not deallocate the table already allocated) */ -int _CPU_unmap_virt_address(void *mappedAddress, int size){ +int _CPU_unmap_virt_address( + void *mappedAddress, + int size +) +{ linear_address linearAddr; page_table *localPageTable; @@ -381,8 +394,13 @@ int _CPU_unmap_virt_address(void *mappedAddress, int size){ * of the page's descriptor. */ -int _CPU_change_memory_mapping_attribute - (void **newAddress, void *mappedAddress, unsigned int size, unsigned int flag){ +int _CPU_change_memory_mapping_attribute( + void **newAddress, + void *mappedAddress, + unsigned int size, + unsigned int flag +) +{ linear_address linearAddr; page_table *localPageTable; @@ -441,7 +459,8 @@ int _CPU_change_memory_mapping_attribute #include -int _CPU_display_memory_attribute(){ +int _CPU_display_memory_attribute(void) +{ unsigned int dirCount, pageCount; cr0 regCr0; page_table *localPageTable; @@ -505,6 +524,6 @@ int _CPU_display_memory_attribute(){ } if (pagingWasEnabled) _CPU_enable_paging(); - return 0; + return 0; } -- cgit v1.2.3