Rev 1196 | Rev 1667 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1196 | Rev 1540 | ||
---|---|---|---|
Line 368... | Line 368... | ||
368 | tm.vector = VECTOR_CLK; |
368 | tm.vector = VECTOR_CLK; |
369 | tm.mode = TIMER_PERIODIC; |
369 | tm.mode = TIMER_PERIODIC; |
370 | tm.masked = false; |
370 | tm.masked = false; |
371 | l_apic[LVT_Tm] = tm.value; |
371 | l_apic[LVT_Tm] = tm.value; |
372 | 372 | ||
- | 373 | /* |
|
373 | /* Measure and configure the timer to generate timer interrupt each ms. */ |
374 | * Measure and configure the timer to generate timer |
- | 375 | * interrupt with period 1s/HZ seconds. |
|
- | 376 | */ |
|
374 | t1 = l_apic[CCRT]; |
377 | t1 = l_apic[CCRT]; |
375 | l_apic[ICRT] = 0xffffffff; |
378 | l_apic[ICRT] = 0xffffffff; |
376 | 379 | ||
377 | while (l_apic[CCRT] == t1) |
380 | while (l_apic[CCRT] == t1) |
378 | ; |
381 | ; |
379 | 382 | ||
380 | t1 = l_apic[CCRT]; |
383 | t1 = l_apic[CCRT]; |
381 | delay(1000); |
384 | delay(1000000/HZ); |
382 | t2 = l_apic[CCRT]; |
385 | t2 = l_apic[CCRT]; |
383 | 386 | ||
384 | l_apic[ICRT] = t1-t2; |
387 | l_apic[ICRT] = t1-t2; |
385 | 388 | ||
386 | /* Program Logical Destination Register. */ |
389 | /* Program Logical Destination Register. */ |