Changeset 1025d28 in mainline
- Timestamp:
- 2008-11-13T07:54:48Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 37e518b
- Parents:
- aa8d0f7
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/ia64/loader/gefi/HelenOS/hello.c
raa8d0f7 r1025d28 154 154 155 155 rArg rSAL; 156 rArg rPAL; 157 156 158 //Setup AP's wake up address 157 158 159 LibSalProc(0x01000000,2,0x4400200,0,0,0,0,0,&rSAL); 160 161 162 //Get System Frequency 163 UINT64 sys_freq; 164 LibSalProc(0x01000012,0,0,0,0,0,0,0,&rSAL); 165 sys_freq=rSAL.p1; 166 167 168 UINT64 freq_scale; 169 //Get CPU Frequency to System Frequency ratio 170 LibPalProc(14,0,0,0,&rPAL); 171 freq_scale=rPAL.p1; 159 172 160 173 … … 162 175 LibGetSalIpiBlock(&sapic); 163 176 Print (L"SAPIC:%X\n", sapic); 164 bootinfo->sapic=sapic;177 //bootinfo->sapic=sapic; 165 178 166 179 … … 168 181 wakeup_intno=0xf0; 169 182 Print (L"WAKEUP INTNO:%X\n", wakeup_intno); 170 bootinfo->wakeup_intno=wakeup_intno;183 //bootinfo->wakeup_intno=wakeup_intno; 171 184 172 185 … … 213 226 bootinfo->sapic=(unsigned long *)sapic; 214 227 bootinfo->wakeup_intno=wakeup_intno; 228 bootinfo->sys_freq=sys_freq; 229 bootinfo->freq_scale=freq_scale; 215 230 216 231 //Run Kernel -
kernel/arch/ia64/include/bootinfo.h
raa8d0f7 r1025d28 49 49 50 50 unsigned long * sapic; 51 unsigned long sys_freq; 52 unsigned long freq_scale; 51 53 unsigned int wakeup_intno; 52 54 -
kernel/arch/ia64/include/drivers/it.h
raa8d0f7 r1025d28 42 42 * 43 43 */ 44 #define IT_DELTA 10000044 #define IT_DELTA it_delta 45 45 46 46 extern void it_init(void); -
kernel/arch/ia64/src/drivers/it.c
raa8d0f7 r1025d28 47 47 #define IT_SERVICE_CLOCKS 64 48 48 49 #define FREQ_NUMERATOR_SHIFT 32 50 #define FREQ_NUMERATOR_MASK 0xffffffff00000000LL 51 52 #define FREQ_DENOMINATOR_SHIFT 0 53 #define FREQ_DENOMINATOR_MASK 0xffffffffLL 54 55 56 uint64_t it_delta; 57 58 49 59 static irq_t it_irq; 50 60 … … 65 75 it_irq.handler = it_interrupt; 66 76 irq_register(&it_irq); 77 78 uint64_t base_freq; 79 base_freq = ((bootinfo->freq_scale) & FREQ_NUMERATOR_MASK) >> FREQ_NUMERATOR_SHIFT; 80 base_freq *= bootinfo->sys_freq; 81 base_freq /= ((bootinfo->freq_scale) & FREQ_DENOMINATOR_MASK) >> FREQ_DENOMINATOR_SHIFT; 82 83 it_delta = base_freq /HZ; 84 67 85 } 68 86
Note:
See TracChangeset
for help on using the changeset viewer.