diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-05-21 19:02:05 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-05-21 19:02:05 +0000 |
commit | 4a76be7ef5f3636c85a5ca1beb7f5d03ee84112f (patch) | |
tree | e1fb7c4d9dc26581cde254cc1bc399a8e2e6b7d1 | |
parent | 2010-05-21 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-4a76be7ef5f3636c85a5ca1beb7f5d03ee84112f.tar.bz2 |
2010-05-21 Vinu Rajashekhar <vinutheraj@gmail.com>
* rtems/score/registers.h: Remove structs with bit-fields. Add a mask
for cr3 page directory.
-rw-r--r-- | cpukit/score/cpu/i386/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/score/cpu/i386/rtems/score/registers.h | 116 |
2 files changed, 6 insertions, 115 deletions
diff --git a/cpukit/score/cpu/i386/ChangeLog b/cpukit/score/cpu/i386/ChangeLog index 276a9a428c..3c39377fee 100644 --- a/cpukit/score/cpu/i386/ChangeLog +++ b/cpukit/score/cpu/i386/ChangeLog @@ -1,3 +1,8 @@ +2010-05-21 Vinu Rajashekhar <vinutheraj@gmail.com> + + * rtems/score/registers.h: Remove structs with bit-fields. Add a mask + for cr3 page directory. + 2010-03-27 Joel Sherrill <joel.sherrill@oarcorp.com> * cpu.c, cpu_asm.S, sse_test.c: Add include of config.h diff --git a/cpukit/score/cpu/i386/rtems/score/registers.h b/cpukit/score/cpu/i386/rtems/score/registers.h index 6a39b53baf..81c2a65e15 100644 --- a/cpukit/score/cpu/i386/rtems/score/registers.h +++ b/cpukit/score/cpu/i386/rtems/score/registers.h @@ -67,120 +67,6 @@ #define CR3_PAGE_CACHE_DISABLE 0x10 #define CR3_PAGE_WRITE_THROUGH 0x8 - - -#ifndef ASM - -/* - * definition of eflags registers has a bit field structure - */ -typedef struct { - /* - * fist byte : bits 0->7 - */ - unsigned int carry : 1; - unsigned int : 1; - unsigned int parity : 1; - unsigned int : 1; - - unsigned int auxiliary_carry : 1; - unsigned int : 1; - unsigned int zero : 1; /* result is zero */ - unsigned int sign : 1; /* result is less than zero */ - /* - * Second byte : bits 7->15 - */ - unsigned int trap : 1; - unsigned int intr_enable : 1; /* set => intr on */ - unsigned int direction : 1; /* set => autodecrement */ - unsigned int overflow : 1; - - unsigned int IO_privilege : 2; - unsigned int nested_task : 1; - unsigned int : 1; - /* - * Third byte : bits 15->23 - */ - unsigned int resume : 1; - unsigned int virtual_mode : 1; - unsigned int aligment_check : 1; - unsigned int virtual_intr : 1; - - unsigned int virtual_intr_pending : 1; - unsigned int id : 1; - unsigned int : 2; - - /* - * fourth byte : bits 24->31 : UNUSED - */ - unsigned int : 8; -}eflags_bits; - -typedef union { - eflags_bits eflags; - unsigned int i; -}eflags; -/* - * definition of eflags registers has a bit field structure - */ -typedef struct { - /* - * fist byte : bits 0->7 - */ - unsigned int protection_enable : 1; - unsigned int monitor_coproc : 1; - unsigned int coproc_soft_emul : 1; - unsigned int floating_instr_except : 1; - - unsigned int extension_type : 1; - unsigned int numeric_error : 1; - unsigned int : 2; - /* - * second byte 8->15 : UNUSED - */ - unsigned int : 8; - /* - * third byte 16->23 - */ - unsigned int write_protect : 1; - unsigned int : 1; - unsigned int aligment_mask : 1; - unsigned int : 1; - - unsigned int : 4; - /* - * fourth byte 24->31 - */ - unsigned int : 4; - - unsigned int : 1; - unsigned int no_write_through : 1; - unsigned int page_level_cache_disable : 1; - unsigned int paging : 1; -}cr0_bits; - -typedef union { - cr0_bits cr0; - unsigned int i; -}cr0; - -/* - * definition of cr3 registers has a bit field structure - */ -typedef struct { - - unsigned int : 3; - unsigned int page_write_transparent : 1; - unsigned int page_cache_disable : 1; - unsigned int : 7; - unsigned int page_directory_base :20; -}cr3_bits; - -typedef union { - cr3_bits cr3; - unsigned int i; -}cr3; - -#endif +#define CR3_PAGE_DIRECTORY_MASK 0xFFFFF000 #endif |