hello Octocontrabass
i want to use HPET timer 0, but my CPU operates in 32 bit mode so is this possible
i am asking because if i switch the HPET to 32 bit mode, master counter will over flow every few seconds, so i will have to track it update my comparator register, which takes time
if use it in 64 bit mode, i this there will some race conditions, since the CPU is 32 bit mode, it cannot access 64 bit Master counter and Comparator registers atomically i believe this is a problem do you agree?
How to get the FSB interrupts
HPET registers have FSB Interrupts Address and FSB interrupt values, i am little bit confused by values what is it
i have had set up for other interrupts using IOAPIC, i set the vector number in IOREDTABLE register at specified GSI number provided form the slim boot for a particular device
all the 255 or so vectors(intgate) and corresponding ISR address are defined
can you explain me if possible,,, in this context what should be interrupt address and what should be the value
FSB Address,,, a value i get form data sheet? or from where?
FSB value,,, a vector number?
Intel ATOM EHL- HPET
Intel ATOM EHL- HPET
Last edited by ravi on Tue Aug 27, 2024 1:44 pm, edited 1 time in total.
Re: Intel ATOM EHL- HPET
The easiest way to read a consistent 64-bit timestamp if you only have 32-bit registers available is:
- Read high part.
- Read low part.
- Read high part again. If it changed since step 1, return to step 1.
- Set high part to 0xffffffff
- Set low part
- Set high part
Carpe diem!
Re: Intel ATOM EHL- HPET
Hello nullplan
thanks for your response:
1) what i intended to ask was, in periodic mode processor has to do reads and writes by itself, so will it do right?...
2) what about FSB address and FSB value?
Thanks
Ravi
thanks for your response:
1) what i intended to ask was, in periodic mode processor has to do reads and writes by itself, so will it do right?...
2) what about FSB address and FSB value?
Thanks
Ravi
-
- Member
- Posts: 5491
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Intel ATOM EHL- HPET
You can use x87 or SSE instructions (FILD/FISTP/MOVQ) for atomic 64-bit reads and writes.
Those are for message-signaled interrupts. They're documented in the Intel SDM volume 3A section 11.11, Message Signalled Interrupts.
Re: Intel ATOM EHL- HPET
Hello Octocontrabass,
Got HPET working, working on HPET-interrupts now
Thanks
Ravi
Got HPET working, working on HPET-interrupts now
Thanks
Ravi
Re: Intel ATOM EHL- HPET
Hello Octocontrabass,
i was able to get the interrupts form IOAPIC-APIC but not from FSB(MSI)
1) i enabled FSB intr in HPET timer 0 config
2) Set FSB Address to 0xFEE00000(even tried with all the APIC Id's)
3) Set FSB value as 0x148, (low priority and vector= 72)
i checked the UEFI memory dump, i think it uses HPET 0 is FSB interrupt mode, but in one shot mode not periodic,, its the same as above
but still i am not able to get interrupt,,,, is there any additional thing , i have missed to enable MSI interrupts
Note: CPU is 32 bit protected mode(no paging, paging is disabled)
Thanks
Ravi
i was able to get the interrupts form IOAPIC-APIC but not from FSB(MSI)
1) i enabled FSB intr in HPET timer 0 config
2) Set FSB Address to 0xFEE00000(even tried with all the APIC Id's)
3) Set FSB value as 0x148, (low priority and vector= 72)
i checked the UEFI memory dump, i think it uses HPET 0 is FSB interrupt mode, but in one shot mode not periodic,, its the same as above
but still i am not able to get interrupt,,,, is there any additional thing , i have missed to enable MSI interrupts
Note: CPU is 32 bit protected mode(no paging, paging is disabled)
Thanks
Ravi
-
- Member
- Posts: 5491
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Intel ATOM EHL- HPET
Hello Octocontrabass,
i had already disabled legacy interrupt routing(LEG_RT_CN) and set interrupts as edge triggered (TIMER0_INT_TYPE_CNF)
as you have suggested, i will try with 0x48
Thanks
Ravi
i had already disabled legacy interrupt routing(LEG_RT_CN) and set interrupts as edge triggered (TIMER0_INT_TYPE_CNF)
as you have suggested, i will try with 0x48
Thanks
Ravi