mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-26 06:08:20 +00:00
2010-05-21 Vinu Rajashekhar <vinutheraj@gmail.com>
* rtems/score/registers.h: Remove structs with bit-fields. Add a mask for cr3 page directory.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user