1 /* 2 * Copyright 2005, Haiku, Inc. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Axel Dörfler, axeld@pinc-software.de 7 */ 8 9 10 #include "via.h" 11 12 13 static uint32 14 via_count_mtrrs(void) 15 { 16 return 0; 17 } 18 19 20 static status_t 21 via_set_mtrr(uint32 index, addr_t base, addr_t length, uint32 type) 22 { 23 return B_OK; 24 } 25 26 27 static status_t 28 via_unset_mtrr(uint32 index) 29 { 30 return B_OK; 31 } 32 33 34 static status_t 35 via_init(void) 36 { 37 system_info info; 38 if (get_system_info(&info) != B_OK) 39 return B_ERROR; 40 41 if ((info.cpu_type & B_CPU_x86_VENDOR_MASK) != B_CPU_VIA_IDT_x86) 42 return B_ERROR; 43 44 return B_OK; 45 } 46 47 48 static status_t 49 via_uninit(void) 50 { 51 return B_OK; 52 } 53 54 55 static status_t 56 via_stdops(int32 op, ...) 57 { 58 switch (op) { 59 case B_MODULE_INIT: 60 return via_init(); 61 case B_MODULE_UNINIT: 62 return via_uninit(); 63 } 64 65 return B_ERROR; 66 } 67 68 69 x86_cpu_module_info gVIAModule = { 70 { 71 "cpu/generic_x86/via/v1", 72 0, 73 via_stdops, 74 }, 75 76 via_count_mtrrs, 77 via_set_mtrr, 78 via_unset_mtrr, 79 }; 80