Some work in progress of the MTRR support. Shouldn't do any harm yet :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15525 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-12-13 00:06:52 +00:00
parent b7e7814c79
commit 2ed21b8525
16 changed files with 299 additions and 114 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ void arch_vm_aspace_swap(vm_address_space *aspace);
bool arch_vm_supports_protection(uint32 protection);
void arch_vm_init_area(vm_area *area);
status_t arch_vm_set_memory_type(vm_area *area, uint32 type);
status_t arch_vm_set_memory_type(vm_area *area, addr_t physicalBase, uint32 type);
void arch_vm_unset_memory_type(vm_area *area);
#ifdef __cplusplus
+15 -4
View File
@@ -14,14 +14,23 @@
// MSR registers (possibly Intel specific)
#define IA32_MSR_APIC_BASE 0x1b
#define IA32_MSR_APIC_BASE 0x1b
#define IA32_MSR_MTRR_CAPABILITIES 0xfe
#define IA32_MSR_MTRR_DEFAULT_TYPE 0x2ff
#define IA32_MSR_MTRR_PHYSICAL_BASE_0 0x200
#define IA32_MSR_MTRR_PHYSICAL_MASK_0 0x201
typedef struct x86_cpu_module_info {
module_info info;
uint32 (*count_mtrrs)(void);
status_t (*set_mtrr)(uint32 index, addr_t base, addr_t length, uint32 type);
status_t (*unset_mtrr)(uint32 index);
status_t (*enable_mtrrs)(void);
void (*disable_mtrrs)(void);
void (*set_mtrr)(uint32 index, addr_t base, addr_t length, uint32 type);
status_t (*get_mtrr)(uint32 index, addr_t *_base, addr_t *_length,
uint32 *_type);
} x86_cpu_module_info;
@@ -91,8 +100,10 @@ uint64 x86_read_msr(uint32 registerNumber);
void x86_write_msr(uint32 registerNumber, uint64 value);
void x86_set_task_gate(int32 n, int32 segment);
uint32 x86_count_mtrrs(void);
status_t x86_enable_mtrrs(void);
status_t x86_disable_mtrrs(void);
status_t x86_set_mtrr(uint32 index, addr_t base, addr_t length, uint32 type);
status_t x86_unset_mtrr(uint32 index);
status_t x86_get_mtrr(uint32 index, addr_t *_base, addr_t *_length, uint32 *_type);
struct tss *x86_get_main_tss(void);
#define read_ebp(value) \