Changeset 4cf93658 in rtems for bsps/i386/shared/cache/cache.c
- Timestamp:
- 01/27/18 13:37:51 (5 years ago)
- Branches:
- 5, master
- Children:
- 05015dc1
- Parents:
- d8d6a08
- git-author:
- Sebastian Huber <sebastian.huber@…> (01/27/18 13:37:51)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (01/31/18 11:49:09)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
bsps/i386/shared/cache/cache.c
rd8d6a08 r4cf93658 4 4 5 5 #include <rtems.h> 6 #include "cache_.h"7 6 #include <rtems/score/cpu.h> 8 7 #include <libcpu/page.h> 8 9 #define I386_CACHE_ALIGNMENT 16 10 #define CPU_DATA_CACHE_ALIGNMENT I386_CACHE_ALIGNMENT 11 #define CPU_INSTRUCTION_CACHE_ALIGNEMNT I386_CACHE_ALIGNMENT 9 12 10 13 void _CPU_disable_cache(void) … … 45 48 46 49 #if defined(I386_CACHE_ALIGNMENT) 47 void _CPU_cache_flush_1_data_line(const void *d_addr) {}48 void _CPU_cache_invalidate_1_data_line(const void *d_addr) {}49 void _CPU_cache_freeze_data(void) {}50 void _CPU_cache_unfreeze_data(void) {}51 void _CPU_cache_invalidate_1_instruction_line ( const void *d_addr ) {}52 void _CPU_cache_freeze_instruction(void) {}53 void _CPU_cache_unfreeze_instruction(void) {}50 static void _CPU_cache_flush_1_data_line(const void *d_addr) {} 51 static void _CPU_cache_invalidate_1_data_line(const void *d_addr) {} 52 static void _CPU_cache_freeze_data(void) {} 53 static void _CPU_cache_unfreeze_data(void) {} 54 static void _CPU_cache_invalidate_1_instruction_line ( const void *d_addr ) {} 55 static void _CPU_cache_freeze_instruction(void) {} 56 static void _CPU_cache_unfreeze_instruction(void) {} 54 57 55 void _CPU_cache_flush_entire_data(void)58 static void _CPU_cache_flush_entire_data(void) 56 59 { 57 60 __asm__ volatile ("wbinvd"); 58 61 } 59 void _CPU_cache_invalidate_entire_data(void)62 static void _CPU_cache_invalidate_entire_data(void) 60 63 { 61 64 __asm__ volatile ("invd"); 62 65 } 63 66 64 void _CPU_cache_enable_data(void)67 static void _CPU_cache_enable_data(void) 65 68 { 66 69 _CPU_enable_cache(); 67 70 } 68 71 69 void _CPU_cache_disable_data(void)72 static void _CPU_cache_disable_data(void) 70 73 { 71 74 _CPU_disable_cache(); 72 75 } 73 76 74 void _CPU_cache_invalidate_entire_instruction(void)77 static void _CPU_cache_invalidate_entire_instruction(void) 75 78 { 76 79 __asm__ volatile ("invd"); 77 80 } 78 81 79 void _CPU_cache_enable_instruction(void)82 static void _CPU_cache_enable_instruction(void) 80 83 { 81 84 _CPU_enable_cache(); 82 85 } 83 86 84 void _CPU_cache_disable_instruction( void )87 static void _CPU_cache_disable_instruction( void ) 85 88 { 86 89 _CPU_disable_cache(); 87 90 } 88 91 #endif 92 93 #include "../../../shared/cache/cacheimpl.h"
Note: See TracChangeset
for help on using the changeset viewer.