TSC rate

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: TSC rate

Post by Combuster »

How can I zero the memory everywhere? My kernel boots from multiboot so I assume that multiboot is doing that for me.
Wrong!

Btw, the point was that you do not need to zero *all* memory, but you should zero memory before use.

Grub will, however, zero the .bss section of your kernel (as required by the ELF standard). But if you allocate things dynamically, you will have to take into account that memory contains garbage, and can thus mess up anything you weren't aware of.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
limp
Member
Member
Posts: 90
Joined: Fri Jun 12, 2009 7:18 am

Re: TSC rate

Post by limp »

Combuster wrote:Btw, the point was that you do not need to zero *all* memory, but you should zero memory before use.
Sorry, I didn't get that. Yes, I know that I should zero memory before use.

The weird thing is that every time I run it, I get different IRQs.
i.e.
At 1st run I got 4 from master PIC ISR (IRQ 2) and 12 from slave PIC ISR (IRQ 10, IRQ 11).
At 2nd run I got 3 from master PIC ISR and 11 from slave PIC ISR.
At 3rd run I got 216 from master PIC ISR and 63 from slave PIC ISR., etc.

Also, is there a preferable place to disable cache or it can be done form everywhere, any time?

Thanks.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: TSC rate

Post by Combuster »

limp wrote:I got IRQ 216
You didn't... Who told you that? (hint)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
limp
Member
Member
Posts: 90
Joined: Fri Jun 12, 2009 7:18 am

Re: TSC rate

Post by limp »

Combuster wrote:
limp wrote:I got IRQ 216
You didn't... Who told you that? (hint)
I meant the value of the ISR register was 216. Fixed!
Post Reply