<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1267932759030097863</id><updated>2011-04-22T04:19:48.880+05:30</updated><title type='text'>kernel space</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kernel-space.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1267932759030097863/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kernel-space.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>balaji rao</name><uri>http://www.blogger.com/profile/07377592950892898313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://bp0.blogger.com/_FrOEjq8XLgU/R6tURCk3vSI/AAAAAAAAAB4/oec0f_vEPL8/S220/balue_bw.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1267932759030097863.post-1017550284233830981</id><published>2008-04-03T19:57:00.000+05:30</published><updated>2008-04-03T19:59:30.068+05:30</updated><title type='text'>My Quad Core</title><content type='html'>&lt;div class="postentry"&gt;      &lt;div class="snap_preview"&gt;&lt;p&gt;As usual I was compiling the linux kernel on my Intel Quad Core desktop, and power goes off.. The UPS starts beeping to indicate that it is low on battery. Well, I decided to stop the compilation and poweroff the machine. To my surprise, the beeping went away! I was confused. I started the compile again, and lo, the UPS sang again..&lt;/p&gt; &lt;p&gt;The power consumption increases so much that the UPS detects it as a higher rate of battery discharge and starts beeping! I was amazed!&lt;/p&gt; &lt;p&gt;Probably when we have much bigger machines , I can expect the light bulbs in my room to dim down when I begin a kernel compilation. :-)&lt;br /&gt;&lt;/p&gt; &lt;/div&gt;    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1267932759030097863-1017550284233830981?l=kernel-space.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kernel-space.blogspot.com/feeds/1017550284233830981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1267932759030097863&amp;postID=1017550284233830981' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1267932759030097863/posts/default/1017550284233830981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1267932759030097863/posts/default/1017550284233830981'/><link rel='alternate' type='text/html' href='http://kernel-space.blogspot.com/2008/04/my-quad-core.html' title='My Quad Core'/><author><name>balaji rao</name><uri>http://www.blogger.com/profile/07377592950892898313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://bp0.blogger.com/_FrOEjq8XLgU/R6tURCk3vSI/AAAAAAAAAB4/oec0f_vEPL8/S220/balue_bw.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1267932759030097863.post-7386690022023595149</id><published>2008-02-09T01:36:00.000+05:30</published><updated>2008-02-09T01:55:45.606+05:30</updated><title type='text'>git-bisect</title><content type='html'>Hello all,&lt;br /&gt;&lt;br /&gt;For the uninitiated, &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html"&gt;git-bisect&lt;/a&gt; is a tool for identifying the patch that caused a particular bug. It works on the principle of binary search.  Its a really cool thing to use, but it takes a long time to complete (not so much with make -j16 on my new Core 2 Quad!!). I identified that v2.6.24 was good and the current one was bad. (v2.6.24 was released around 15 days ago.) And within those 15 days some 4K odd patches had accumulated and I had to bisect the big pile! But thankfully it was successful and it pointed me to the right commit and hence I was able to fix the problem. Here's the patch - http://lkml.org/lkml/2008/2/8/342.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1267932759030097863-7386690022023595149?l=kernel-space.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kernel-space.blogspot.com/feeds/7386690022023595149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1267932759030097863&amp;postID=7386690022023595149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1267932759030097863/posts/default/7386690022023595149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1267932759030097863/posts/default/7386690022023595149'/><link rel='alternate' type='text/html' href='http://kernel-space.blogspot.com/2008/02/git-bisect.html' title='git-bisect'/><author><name>balaji rao</name><uri>http://www.blogger.com/profile/07377592950892898313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://bp0.blogger.com/_FrOEjq8XLgU/R6tURCk3vSI/AAAAAAAAAB4/oec0f_vEPL8/S220/balue_bw.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1267932759030097863.post-7755379338821868320</id><published>2008-02-07T23:23:00.000+05:30</published><updated>2008-02-08T00:42:08.380+05:30</updated><title type='text'>My new Intel DG33FB</title><content type='html'>&lt;span style="font-family:times new roman;"&gt;Hello all!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:times new roman;"&gt;I decided to go for a upgrade from my Core 2 Duo + 1G RAM to Core 2 Quad + 4G RAM. My dealer gave me a Intel original Motherboard DG33FB for it. The problems with the new motherboard began right at the dealer's place. I have listed them out one by one, along with the way I was able to overcome the it&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol style="font-family: times new roman;"&gt;&lt;li style="font-weight: bold;"&gt;Linux wouldn't boot, nor does Windows!&lt;/li&gt;&lt;ul&gt;&lt;li&gt;The first thing I  did on my new machine was trying to get Linux up and running. But it wouldn't work! Then I had to reluctantly try booting windows, which didn't work either. Thinking that this could be a problem with BIOS settings, I just wandered around in the BIOS setup utility and came across an option called 'SATA MODE&lt;span style="font-style: italic;"&gt;' &lt;/span&gt;which had AHCI and IDE as its two options, of which AHCI was selected by default. I tried changing it to IDE and it could boot windows now.&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;I could boot only the default Fedora 8 kernel, but none of the vanilla kernels. Surprisingly all of them hung when they tried to scan the PCI root bus.&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Vanilla kernels wouldn't boot.&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;My next objective was to boot vanilla kernels which i mentioned were hanging when they tried accessing the PCI bus. Since ACPI was famous for causing such failures, I tried booting with &lt;span style="font-family:courier new;"&gt;acpi=off&lt;/span&gt; kernel parameter. The kernel booted normally, but sadly it did use only one processor (out of the four in Core 2 Quad) which is no way acceptable!&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I decided to debug this problem and started inserting &lt;span style="font-family:courier new;"&gt;printk()s&lt;/span&gt; in the source to find out the exact reason for the hang. During this process, I came across a kernel parameter called &lt;span style="font-family:courier new;"&gt;pci=conf1&lt;/span&gt;  and I decided to give it a try. To my surprise, the kernel (2.6.24-rc5) booted perfectly fine. Later i found out an option in &lt;span style="font-family:courier new;"&gt;menuconfig&lt;/span&gt; called 'PCI ACCESS' which allowed me to select the 'direct' method of probing PCI devices, and enabling this made me avoid passing the extra 'pci=conf1' parameter to the kernel.&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;linux-2.6.git does come up, but I see a lot of PCI noise in dmesg and X doesn't come up&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Is this a regression ? Yes, it is! Everything worked perfectly with 2.6.24-rc5, but not with linux-2.6.git i.e, 2.6.24. I decided to git-bisect to find the faulty commit. I was doing my first git-bisect in my life! I bisected it and found the commit that caused this. Deciding to debug this, I began looking at the code. It was fairly easy to fix this, and I came out with a patch to LKML hoping to see it included in linux-2.6.git soon.. &lt;blockquote&gt;&lt;/blockquote&gt;Incidentally, the bug was reported already and a fix for it was committed yesterday! You can read the whole thread here on LKML Archive(&lt;a href="http://lkml.org/lkml/2008/2/7/55"&gt;http://lkml.org/lkml/2008/2/7/55&lt;/a&gt;).&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;span style="font-family:times new roman;"&gt;    &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1267932759030097863-7755379338821868320?l=kernel-space.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kernel-space.blogspot.com/feeds/7755379338821868320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1267932759030097863&amp;postID=7755379338821868320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1267932759030097863/posts/default/7755379338821868320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1267932759030097863/posts/default/7755379338821868320'/><link rel='alternate' type='text/html' href='http://kernel-space.blogspot.com/2008/02/my-new-intel-dg33fb.html' title='My new Intel DG33FB'/><author><name>balaji rao</name><uri>http://www.blogger.com/profile/07377592950892898313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://bp0.blogger.com/_FrOEjq8XLgU/R6tURCk3vSI/AAAAAAAAAB4/oec0f_vEPL8/S220/balue_bw.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1267932759030097863.post-7180258407440920270</id><published>2008-01-10T20:57:00.000+05:30</published><updated>2008-01-10T21:25:35.230+05:30</updated><title type='text'>More on HPET..</title><content type='html'>&lt;span style="font-family: verdana;"&gt;Welcome back!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;If you are all waiting for what the reply from kernelnewbies was , there was no reply infact! This post is about the HPET research i carried out with the specs in hand and looking at the source code.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The line &lt;/span&gt;&lt;span style="font-family: courier new;"&gt;hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, &lt;span style="font-family: verdana;"&gt;make me realize that something was fishy, so I decided to look into the area where the IRQs were actually assigned, and I found it in &lt;span style="font-family: courier new;"&gt;arch/x86/kernel/hpet.c.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;In that piece of code, a register field names TN_INT_ROUTE_CNF was being read from the per timer Configuration and Capabilities register. I quickly turned pages in the specs to see what it does, and It read that&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;" Default is 00h Software writes to this field to select which interrupt in the I/O (x) will be used for this timer’s interrupt. If the value is not supported by this prarticular timer, then the value read back will not match what is written. The software must only write valid values."&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;So, I got the reason why the value of 0 IRQ was being given to timer 2. Well, if it's zero be default, who changes it was the question. Ideally the BIOS assigns IRQs to various PCI devices. So, could it be a BIOS bug ? No, because many posts on LKML with dmesg, showed the same line which I got.&lt;br /&gt;&lt;br /&gt;I decided to try one more thing. Why not mmap /dev/hpet and look at the registers ? I did so, and got a dump of its 1K register space and began examining it. I turn to the 'Timer N Configuration and Capabilities register' in the spec, and began looking at the first field,&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-style: italic;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;" Tn_INT_ROUTE_CAP -&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-weight: bold; font-style: italic;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-style: italic;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;Timer n Interrupt Routing Capability: (where n is the timer number: 00 to 31) This 32-bit read-only field indicates to which interrupts in the I/O (x) APIC this timer’s interrupt can be routed. This is used in conjunction with the &lt;span style="font-weight: bold;"&gt;Tn_INT_ROUTE_CNF&lt;/span&gt; field. Each bit in this field corresponds to a particular interrupt. For example, if this timer’s interrupt can be mapped to interrupts 16, 18, 20, 22, or 24, then bits 16, 18, 20, 22, and 24 in this field will be set to 1. All other bits will be 0. "&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;Wow!! was my reaction. So using this bitmap field, I could assign interrupts to timers! I wrote a dirty and quick patch, and ran the userspace program and to my astonishment, it worked like a charm!&lt;br /&gt;&lt;br /&gt;This is about making the userspace API work. The kernelspace API is a bit different, in that it does not use ioctls, but has a struct hpet_task object and stuff. Its simple to use. So my next job is to make the kernelspace API to work..&lt;br /&gt;&lt;br /&gt;Will post again on that.. &lt;span style="font-style: italic;"&gt;stay tuned folks!&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-style: italic;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1267932759030097863-7180258407440920270?l=kernel-space.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kernel-space.blogspot.com/feeds/7180258407440920270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1267932759030097863&amp;postID=7180258407440920270' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1267932759030097863/posts/default/7180258407440920270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1267932759030097863/posts/default/7180258407440920270'/><link rel='alternate' type='text/html' href='http://kernel-space.blogspot.com/2008/01/more-on-hpet.html' title='More on HPET..'/><author><name>balaji rao</name><uri>http://www.blogger.com/profile/07377592950892898313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://bp0.blogger.com/_FrOEjq8XLgU/R6tURCk3vSI/AAAAAAAAAB4/oec0f_vEPL8/S220/balue_bw.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1267932759030097863.post-1444365105937724299</id><published>2008-01-08T22:10:00.001+05:30</published><updated>2008-01-08T22:56:06.571+05:30</updated><title type='text'>HPET support for qemu</title><content type='html'>For those who don't know what HPET is check out the &lt;span style=""&gt;&lt;a href="http://www.blogger.com/www.intel.com/technology/architecture/hpetspec.htm"&gt; specifications &lt;/a&gt; at the Intel site and continue reading.&lt;br /&gt;&lt;br /&gt;It was only yesterday I decided to work on adding HPET support to qemu. I talked to &lt;a href="http://amitshah.nav.to/"&gt;Amit Shah&lt;/a&gt;(the only employee of &lt;a href="http://web1.qumranet.com/"&gt;Qumranet&lt;/a&gt; in India), for ideas on this and how to go about it.&lt;br /&gt;&lt;br /&gt;He told me to start off by making qemu access the HPET in userspace and then extend it to make it visible on the guest. Emulation of a HPET in cases where there is no real hardware, comes at a later stage. I am lucky to have a new Core 2 Duo 945 chipset machine which has  HPET which fortunately became 'visible' only after I flashed my BIOS!. But my excitation quickly died down when I began trying to run the userspace program (Documentation/hpet.txt). It would not run. It was failing at the Interrupt Enable (HPET_IE_ON) ioctl command.&lt;br /&gt;&lt;br /&gt;As usual, i decided to find a solution to this problem by googling for HPET. But even after searching for a long time, I could not find even a &lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;single &lt;/span&gt;place where i could get help, so i decided to write &lt;span style="font-style: italic;"&gt;this&lt;/span&gt; blog, so that I will be the first one to have a &lt;span style="font-style: italic;"&gt;nice &lt;/span&gt;resource on HPET!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Deciding to track down this problem, I started looking at the kernel sources. I began by adding printks in drivers/char/hpet.c. Grepping through the kernel logs showed me that my HPET had 3 timer blocks which used interrupts 2, 8 and 0. My printks told me that when I opened /dev/hpet, I got assigned a timer block which had interrupt 0, and hence the routine hpet_ioctl_ieon would not continue using it and it fails.&lt;br /&gt;&lt;br /&gt;I think this happens because of improper ACPI tables which report the IRQ of the third HEPT timer block as 0. I have posted a query on kernelnewbies and now awaiting a reply..&lt;br /&gt;&lt;br /&gt;Will continue this once i get this reply! &lt;span style="font-style: italic;"&gt;Stay tuned..&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1267932759030097863-1444365105937724299?l=kernel-space.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kernel-space.blogspot.com/feeds/1444365105937724299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1267932759030097863&amp;postID=1444365105937724299' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1267932759030097863/posts/default/1444365105937724299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1267932759030097863/posts/default/1444365105937724299'/><link rel='alternate' type='text/html' href='http://kernel-space.blogspot.com/2008/01/hpet-support-for-qemu.html' title='HPET support for qemu'/><author><name>balaji rao</name><uri>http://www.blogger.com/profile/07377592950892898313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://bp0.blogger.com/_FrOEjq8XLgU/R6tURCk3vSI/AAAAAAAAAB4/oec0f_vEPL8/S220/balue_bw.png'/></author><thr:total>1</thr:total></entry></feed>
