<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">

<channel>
	<title>Planet FreeBSD Summer of Code 2008</title>
	<link>http://planet.freebsdish.org/soc2008</link>
	<language>en</language>
	<description>Planet FreeBSD Summer of Code 2008 - http://planet.freebsdish.org/soc2008</description>

<item>
	<title>Rui Paulo: Apple Time Machine + FreeBSD in 14 steps.</title>
	<guid>http://blogs.freebsdish.org/rpaulo/?p=20</guid>
	<link>http://blogs.freebsdish.org/rpaulo/2008/10/04/apple-time-machine-freebsd-in-14-steps/</link>
	<description>&lt;p&gt;So, here&amp;#8217;s a quick howto on how to setup Time Machine on Mac OS X so that it backups to a networked machine running FreeBSD.&#160;&lt;/p&gt;
&lt;p&gt;On the FreeBSD machine:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Build &amp;amp; Install net/netatalk from ports.&lt;/li&gt;
&lt;li&gt;Edit /usr/local/etc/AppleVolumes.default&lt;/li&gt;
&lt;li&gt;Append: &amp;#8220;/your_time_machine_path TimeMachine allow:your_user_name cnidscheme:cdb options:usedots&amp;#8221; and replace your path and your username in the proper places.&lt;/li&gt;
&lt;li&gt;Optionally, remove the &amp;#8220;~&amp;#8221; already present in that file if you don&amp;#8217;t want to share users home directories.&lt;/li&gt;
&lt;li&gt;Add &amp;#8220;netatalk_enable=&amp;#8221;YES&amp;#8221;&quot; and &amp;#8220;afpd_enable=&amp;#8221;YES&amp;#8221;&quot; to /etc/rc.conf.&lt;/li&gt;
&lt;li&gt;/usr/local/etc/rc.d/netatalk start (nothing will be printed).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;On the Mac OS X machine (running Leopard, of course):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Mount your remote volume. Command+K on the Finder and then type: &amp;#8220;afp://&amp;lt;machine IP address or local hostname if you have a local DNS server&amp;gt;&amp;#8221;. You can&amp;#8217;t type the machine name because we&amp;#8217;re not using multicast DNS.&lt;/li&gt;
&lt;li&gt;Build a sparse bundle image using &amp;#8220;Disk utility&amp;#8221; (HFS+ case-sensitive formatted). Usually, the size should be something that gives you enough room for expansion. If you want to backup your whole MacBook/iMac/etc. disk, you can set the sparse bundle image size the same as the disk your are backing up.&lt;/li&gt;
&lt;li&gt;The name of this image is important. It should be &amp;#8220;Your_Computer_Name_MACAddress.sparsebundle&amp;#8221;. Check your computer name from the &amp;#8220;Sharing&amp;#8221; section of &amp;#8220;System Preferences&amp;#8221; and the MAC address comes from the interface you&amp;#8217;ll be using to do the backup. I really recommend using your Wired interface. Check the MAC address via ifconfig(1) or via the &amp;#8220;Network&amp;#8221; &#160;section of &amp;#8220;System Preferences&amp;#8221;. E.g., if you&amp;#8217;re John Doe, have a MacBook and your MAC address is 00:01:02:03:04:05, your file should be named &amp;#8220;John Doe&amp;#8217;s MacBook_000102030405.sparsebundle&amp;#8221;.&lt;/li&gt;
&lt;li&gt;On the Terminal, type &amp;#8220;defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1&amp;#8243;. &lt;strong&gt;This is the crucial thing.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Go to &amp;#8220;System Preferences&amp;#8221;, &amp;#8220;Time Machine&amp;#8221; and enable it. The networked volume will now show up on the list.&lt;/li&gt;
&lt;li&gt;Before selecting the volume on which you&amp;#8217;ll dump the backup, copy the sparse bundle file you&amp;#8217;ve created to your networked volume called &amp;#8220;TimeMachine&amp;#8221;.&lt;/li&gt;
&lt;li&gt;Select the networked Volume from the Time Machine volumes list.&lt;/li&gt;
&lt;li&gt;Initiate the backup!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: As Remko points out in the comments, the MAC address is not restrictive. So, if you want to backup via wired interface and after that via wireless, Time Machine will work using both interfaces. I suppose that Time Machine inspects all MAC addresses in your machine and then searches a sparse bundle in the networked volume that matches.&lt;/p&gt;</description>
	<pubDate>Sat, 04 Oct 2008 15:47:11 +0000</pubDate>
	<dc:creator>Rui Paulo</dc:creator>
</item>
<item>
	<title>Ryan French: The final countdown and what I&#8217;m working on</title>
	<guid>http://blogs.freebsdish.org/rfrench/?p=15</guid>
	<link>http://blogs.freebsdish.org/rfrench/2008/09/24/the-final-countdown-and-what-im-working-on/</link>
	<description>&lt;p&gt;So I figured that even though the Summer of Code has finished I am still going to keep posting here. Mostly I will be posting about the progress of MPLS in FreeBSD, but I will also write a few other posts about other interesting, and not so interesting depending on your point of view, things that I am up to.&lt;/p&gt;
&lt;p&gt;As I am writing this I currently have just under 4 weeks till I have finished university, hopefully for good. I have been going through the process of trying to find a job that I can step into once I complete my degree but unfortunately the graduate IT jobs in New Zealand are few and far between, so much so that I have started applying for jobs overseas.&lt;/p&gt;
&lt;p&gt;The biggest problem with this time of year is the amount of work that is due in a matter of a few weeks. I have been working a lot on getting my assignments done. The majority of them are reasonably standard and uninteresting, like the work I have been doing in XNA using Vertex and Pixel Shaders, but some of it is a lot more interesting. The biggest project I have at the moment, besides my Implementation of MPLS in FreeBSD which is due in 5 weeks, is a Distributed File System using FUSE. This file system, if successful, may be looked at for using on the University of Waikato&amp;#8217;s cluster computer.&lt;/p&gt;
&lt;p&gt;Hopefully within the next week I will have some serious time to go over MPLS. I am up to the stage now of testing the code for receiving and sending of packets, and hopefully that works pretty quickly so I can start on routing table implementation and then maybe even move onto LDP, but I very much doubt I will have the time before the dissertation on the project is due (approximately October 24th).&lt;/p&gt;</description>
	<pubDate>Wed, 24 Sep 2008 02:21:26 +0000</pubDate>
	<dc:creator>Ryan French</dc:creator>
</item>
<item>
	<title>Rui Paulo: (D)VCS for $HOME mirroring</title>
	<guid>http://blogs.freebsdish.org/rpaulo/?p=18</guid>
	<link>http://blogs.freebsdish.org/rpaulo/2008/09/09/dvcs-for-home-mirroring/</link>
	<description>&lt;p&gt;Many people use a Version Control Systems to mirror their $HOMEs in several networked computers. This has clear advantages of doing incremental backups of your $HOME (TimeMachine, anyone? :-)) and keeping it in sync across several computers. In the past, I&amp;#8217;ve used Mercurial to do this job, but some months ago I switched to Subversion because I wanted to use try the one-VCS-for-all meme (Subversion is now being used by FreeBSD in case you don&amp;#8217;t know). Unfortunately, it didn&amp;#8217;t work out well. The computer where I kept the svn repo had a horrible hard disk failure and this made me wonder if I was using the right tool. Today, I switched back to Mercurial and I guess this is the right tool for the job.&lt;/p&gt;</description>
	<pubDate>Tue, 09 Sep 2008 22:14:22 +0000</pubDate>
	<dc:creator>Rui Paulo</dc:creator>
</item>
<item>
	<title>Przemek Witaszczyk: also</title>
	<guid>tag:blogger.com,1999:blog-6454200798774615510.post-7149258791134369184</guid>
	<link>http://bitbay.blogspot.com/2008/09/also.html</link>
	<description>I'm preparing a diagram of our dev tree, showing the PIC location relative to PCI, root/nexus and others. Also, while filling out the final eval, an idea came to me to write a tutorial on using p4 in cumbersome situations, like having to fix broken local copy of branch etc... I had some problems with p4 and it's possible that future GSoCers will encounter them too, while the p4 part of the handbook is not helping much with those (of course one can always say RTFM..:)</description>
	<pubDate>Mon, 08 Sep 2008 14:09:00 +0000</pubDate>
	<dc:creator>vi0 (noreply@blogger.com)</dc:creator>
</item>
<item>
	<title>Przemek Witaszczyk</title>
	<guid>tag:blogger.com,1999:blog-6454200798774615510.post-4018274936722865858</guid>
	<link>http://bitbay.blogspot.com/2008/09/not-much-happened-recently-due-to-exam.html</link>
	<description>Not much happened recently due to the exam I had to pass. What we did was thinking out the device structure using the ofwbus bus. The aim is to place the PIC driver in a suitable place so the rest of the dev tree can be constructed. Now is the time to read the PIC programming part of the MPC5200B UG...</description>
	<pubDate>Mon, 08 Sep 2008 13:42:00 +0000</pubDate>
	<dc:creator>vi0 (noreply@blogger.com)</dc:creator>
</item>
<item>
	<title>Rui Paulo: So, you want to test the FreeBSD/i386 EFI boot loader?</title>
	<guid>http://blogs.freebsdish.org/rpaulo/?p=15</guid>
	<link>http://blogs.freebsdish.org/rpaulo/2008/09/03/so-you-want-to-test-the-freebsdi386-efi-boot-loader/</link>
	<description>&lt;p&gt;Well, EFI is nothing new, but, currently, we only support EFI booting on FreeBSD/ia64. Before Apple started shipping MacBooks with EFI, there would be a small interest in adding EFI boot loader to anything but ia64. But now that there are thousands of Intel Macs, interest has risen.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve been asked by several people to make available a patch for my recent take on the FreeBSD/i386 EFI boot loader. I&amp;#8217;m also making available binaries for i386.&lt;/p&gt;
&lt;p&gt;So, if you have a Core Duo/Solo MacBook (Core 2 won&amp;#8217;t work yet, sorry) and want to try it out, do the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install &lt;a href=&quot;http://refit.sf.net/&quot;&gt;rEFIt&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Download &lt;a href=&quot;http://people.freebsd.org/~rpaulo/boot.tgz&quot;&gt;http://people.freebsd.org/~rpaulo/boot.tgz&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Extract boot.tgz to your / HFS+ partition (don&amp;#8217;t worry, rEFIt will find it).&lt;/li&gt;
&lt;li&gt;Reboot.&lt;/li&gt;
&lt;li&gt;Select /boot/loader.efi from the rEFIt boot prompt.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One thing worth playing with is the &amp;#8216;col&amp;#8217; command I just added. It basically changes the screen resolution. So here&amp;#8217;s your chance to have something super leet: a FreeBSD boot loader at 1280&amp;#215;800 or more! &lt;img src=&quot;http://blogs.freebsdish.org/rpaulo/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:-)&quot; class=&quot;wp-smiley&quot; /&gt; Also, EFI will make your HFS+ partition avaiable to the boot loader, so doing an &amp;#8216;ls&amp;#8217; will really show your files.&lt;/p&gt;
&lt;p&gt;Oh, the source code? Here: &lt;a href=&quot;http://people.freebsd.org/~rpaulo/efi.tgz&quot;&gt;http://people.freebsd.org/~rpaulo/efi.tgz&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One final thing: I&amp;#8217;m still working on kernel booting, so don&amp;#8217;t expect it to work.&lt;/p&gt;</description>
	<pubDate>Wed, 03 Sep 2008 17:21:24 +0000</pubDate>
	<dc:creator>Rui Paulo</dc:creator>
</item>
<item>
	<title>Rui Paulo: FreeBSD IA32 EFI boot loader</title>
	<guid>http://blogs.freebsdish.org/rpaulo/2008/08/31/freebsd-ia32-efi-boot-loader/</guid>
	<link>http://blogs.freebsdish.org/rpaulo/2008/08/31/freebsd-ia32-efi-boot-loader/</link>
	<description>&lt;p&gt;Something I&amp;#8217;ve wanted to do for sometime was to boot FreeBSD on my MacBook via EFI. EFI is a firmware standard for BIOS and OS writers to deal with. Basically, it replaces the good old MBR booting scheme and is capable of much more, namely, all the real mode restrictions are gone, TCP support in the firmware and, if you write a driver, you can have UFS, ZFS, whateverFS support on the firmware itself&lt;/p&gt;
&lt;p&gt;Apparently, I couldn&amp;#8217;t make it work for last years&amp;#8217;s Summer of Code, but now something works. &lt;img src=&quot;http://blogs.freebsdish.org/rpaulo/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:-)&quot; class=&quot;wp-smiley&quot; /&gt; I was able to boot loader.efi on my MacBook and see a &amp;#8220;FreeBSD/i386&amp;#8243; boot message. Yay! Unfortunately, there seems to be a bug in (probably) the FORTH library and it sometimes hangs or, if it doesn&amp;#8217;t hang, it displays a lot of garbage.&lt;/p&gt;
&lt;p&gt;So, you have a MacBook and want to try this out? Great! Here&amp;#8217;s the procedure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Grab loader.efi from &lt;a href=&quot;http://people.freebsd.org/~rpaulo/loader.efi&quot;&gt;http://people.freebsd.org/~rpaulo/&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install &lt;a href=&quot;http://refit.sf.net&quot;&gt;rEFIt&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Copy loader.efi to, for example, /efi/freebsd/loader.efi.&lt;/li&gt;
&lt;li&gt;Reboot and select loader.efi from the rEFIt boot menu.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Don&amp;#8217;t expect nothing fancy though.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE: &lt;/strong&gt;the bug is not in the FORTH library as I originally though.&lt;/p&gt;</description>
	<pubDate>Sun, 31 Aug 2008 17:09:49 +0000</pubDate>
	<dc:creator>Rui Paulo</dc:creator>
</item>
<item>
	<title>Przemek Witaszczyk: WANTED: PIC driver...</title>
	<guid>tag:blogger.com,1999:blog-6454200798774615510.post-2173663107224743977</guid>
	<link>http://bitbay.blogspot.com/2008/08/wanted-pic-driver.html</link>
	<description>Finally, I've managed to fix all (at least up till now..) broken OF calls, and the kernel went further, to the place where devices are attached. Among them, there should be a PIC driver, which is missing... After adding the ofwbus driver which I got from Andrew, I've constructed a PIC driver skeleton from the sys/powerpc/powermac/hrowpic.c. The PIC was found to resist on the ofwbus3, and the attch method fails to allocate memory (nice screenshot on my wiki http://wiki.freebsd.org/Porting_FreeBSD_to_Efika_(PPC_bring_up)). Now I have to mutate the old mac driver to obey the mpc5k2 will... I've also created a new folder in the p4 branch, where all the stuff concerning MPC5200B will be stored. It's called ... mpc5k2 :)</description>
	<pubDate>Wed, 27 Aug 2008 07:01:00 +0000</pubDate>
	<dc:creator>vi0 (noreply@blogger.com)</dc:creator>
</item>
<item>
	<title>Przemek Witaszczyk: Staying late pays...</title>
	<guid>tag:blogger.com,1999:blog-6454200798774615510.post-1603866010460684580</guid>
	<link>http://bitbay.blogspot.com/2008/08/staying-late-pays.html</link>
	<description>&lt;p&gt;Thanks to simple, yet great advice by Andrew Turner concerning calls to openfirmware and utilizing *OF_buf, it seems that eventually I came to the point where the kernel panics due to the lack of PIC!:&lt;/p&gt;&lt;p&gt;===================&lt;/p&gt;&lt;p&gt;&#160;atomic_subtract_16(0)... panic: no PIC detected&lt;br /&gt;&lt;br /&gt;KDB: enter: panic&lt;br /&gt;[thread pid 0 tid 100000 ]&lt;br /&gt;Stopped at      0x29587c:       addi    r0, r0, 0x0&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;===================&lt;/p&gt;&lt;p&gt;As you can see, the KDB by itself stops at this point, no crash at last:)&lt;/p&gt;&lt;p&gt;All thanks to the AT and the fact that I'm studying hard for the exam (Quantum Mechanics for PhD students....)&lt;/p&gt;</description>
	<pubDate>Tue, 19 Aug 2008 18:52:00 +0000</pubDate>
	<dc:creator>vi0 (noreply@blogger.com)</dc:creator>
</item>
<item>
	<title>Przemek Witaszczyk: /*decr_init()*/</title>
	<guid>tag:blogger.com,1999:blog-6454200798774615510.post-8472821194294522838</guid>
	<link>http://bitbay.blogspot.com/2008/08/decrinit.html</link>
	<description>&lt;p&gt;Some new things came up recentrly, I've added some code from NetBSD and commented out the decr_init() in cpu_startup(). Now, during the boot I've rached subsystem 3800000 , as last time w/o decr_init(), but this time it seems it entered the newbus!&lt;/p&gt;&lt;p&gt;==========================================&lt;/p&gt;&lt;p&gt;[thread pid 0 tid 100000 ]&lt;br /&gt;Breakpoint at   0x4930d8:       stwu    r1, r1, -0x20&lt;br /&gt;db&gt;&lt;br /&gt;nexus0: registered as a time-of-day clock (resolution 1000us)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type memory (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type serial (no driver attached)&lt;br /&gt;nexus0: , type builtin (no driver attached)&lt;br /&gt;nexus0: , type pci (no driver attached)&lt;br /&gt;sc0: no video adapter found.&lt;br /&gt;nexus0: , type syscons (no driver attached)&lt;br /&gt;done.&lt;br /&gt;&#160;  ofw_bus_gen_get_name(0)... cpu_exception:&lt;br /&gt;SRR0 0x01035CFC SRR1  0x00003030 MSR  0x00003030&lt;br /&gt;LR   0x0103E1E4 CTR   0x0101A5F0 CR   0x44002042   XER 0x20000000&lt;br /&gt;DAR  0xD0004DDE DSISR 0x42000000 Type 3&lt;br /&gt;GPR[] 0x00000007 0x00559EB4 0x00000000 0x00000000 0x07C05323 0x00000005 0x0000000D 0x0058EBB8&lt;br /&gt;&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;============================================&lt;br /&gt;&lt;/p&gt;&lt;p&gt;And again, the old friend. I can't spot the cause of those crashes. They always look the same, with the same content of SRR0,1 and MSR. Adding some stuff from NetBSD helped, but it only took it just a few steps further. Thus it must be something wih the OF, but what? This time it's nothing about the stack, because the registers contains some crazy addresses, neither form kernel, nor from the OF stack... During some previous tests I've encountered some crashes on instructions reading/writing to SPRG0 and IBAT4, in &#160;ofw_sprg_prepare(); and in&lt;/p&gt;&lt;p&gt;===========&lt;/p&gt;&lt;p&gt;from: src/sys/powerpc/aim/ofw_machdep.c&lt;/p&gt;&lt;p&gt;&#160;__asm __volatile(       &quot;\t&quot;&lt;br /&gt;&#160;               &quot;sync\n\t&quot;&lt;br /&gt;&#160;               &quot;mfmsr  %0\n\t&quot;&lt;br /&gt;&#160;               &quot;mtmsr  %1\n\t&quot;&lt;br /&gt;&#160;               &quot;isync\n&quot;&lt;br /&gt;&#160;               : &quot;=r&quot; (oldmsr)&lt;br /&gt;&#160;               : &quot;r&quot; (ofmsr[0])&lt;br /&gt;&#160;       );&lt;br /&gt;============&lt;br /&gt;&lt;/p&gt;&lt;p&gt;both in openfirmware()...&lt;/p&gt;</description>
	<pubDate>Tue, 19 Aug 2008 06:54:00 +0000</pubDate>
	<dc:creator>vi0 (noreply@blogger.com)</dc:creator>
</item>
<item>
	<title>Ryan French: Final Summer of Code Report</title>
	<guid>http://blogs.freebsdish.org/rfrench/2008/08/18/final-summer-of-code-report/</guid>
	<link>http://blogs.freebsdish.org/rfrench/2008/08/18/final-summer-of-code-report/</link>
	<description>&lt;p&gt;Summer of Code has now officially finished. Well, at least the coding part of it has. This is my final GSoC report, but hopefully will not be my last post here. As it stands at the moment, I have not managed to get sending and receiving working, but I am very close to it. I honestly am unsure as to why it is not working,&#160; but I believe it may be to do with how I have tied my code into the kernel, and I dont think it is getting initialized or compiled with the right preprocessor defines or something. However, I will still be working on getting this going, as not only is it my dissertation for university this year to do this, but it has become somewhat of a personal challenge to prove to myself that I can do it.&lt;/p&gt;
&lt;p&gt;With that in mind I will keep on working on this at every oppurtunity I get, and will definately have at least sending/receiving working by October, which is when the dissertation is due. So here is a run down of what I have accomplished so far for the GSoC, and what I plan to implement in the future.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Accomplished:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;MPLS-needle - this is a small tool I built for testing of MPLS. It takes a configuration file and uses that to define and build an MPLS packet, which is then inserted onto the networking stack using a BPF device.&lt;/p&gt;
&lt;p&gt;Basic port of OpenBSD/Ayame code - I have been working solidly for the last few months on porting the OpenBSD code, which is based on Ayame, to FreeBSD. This was a much bigger task than I orginally intended. As I have had no previous experience with kernel coding this has involved a huge learning curve, not only in just kernel coding itself, but in how the FreeBSD networking code works, and how it differs to OpenBSD (by the way, it is a lot more than I thought it would be). The code has been ported over and changed accordingly, but still does not work. However, the kernel does compile and run, it just appears that the MPLS code does not run when a packet is received. I think this is because of incorrect #defines, as I&amp;#8217;m not entirely sure where I need to define these (in the Makefile or somewhere in my code). I will continue to work on this and attempt to get it working asap.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Future Plans:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once basic sending/receiving is acheived, I will be attempting to implement the following features. I believe this will be a lot easier as I will be working mostly on my own code, independant of the kernel code itself, but I have been known to be wrong before.&lt;/p&gt;
&lt;p&gt;Routing Table Manipulation - create a way to store, insert, edit and delete MPLS routes in a table.&lt;/p&gt;
&lt;p&gt;Static Label Switching - being able to receive a packet, swap the label, and send it out using a statically defined route in the routing table.&lt;/p&gt;
&lt;p&gt;LDP Implementation - implement the LDP daemon for autmatic label distribution and routing table building.&lt;/p&gt;
&lt;p&gt;Tunnels - implement MPLS L2 and L3 tunnels with first virtual interfaces, and then real interfaces.&lt;/p&gt;
&lt;p&gt;At least thats the plan for now, and I&amp;#8217;m really hoping that it becomes a reality.&lt;/p&gt;
&lt;p&gt;I would like to take this chance to thank everyone that has helped me through this transition into kernel hacking and opensource hacking. It has been a lot of fun, with a lot of frustration, but very much worth it. If anyone would like to take a look at my work and provide some feedback, whether it be stuff I need to change, or help on completing my goals, it would be welcomed and very much appreciated. The code can be viewed &lt;a href=&quot;http://p4web.freebsd.org/@md=d&amp;cd=//depot/projects/soc2008/&amp;c=AN8@//depot/projects/soc2008/rfrench_mpls/?ac=83&quot; title=&quot;rfrench_mpls on Perforce&quot;&gt;here&lt;/a&gt; on Perforce.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;-Ryan French.&lt;/p&gt;</description>
	<pubDate>Mon, 18 Aug 2008 23:21:26 +0000</pubDate>
	<dc:creator>Ryan French</dc:creator>
</item>
<item>
	<title>Przemek Witaszczyk: odd discovery</title>
	<guid>tag:blogger.com,1999:blog-6454200798774615510.post-5329895237445517790</guid>
	<link>http://bitbay.blogspot.com/2008/08/odd-discovery.html</link>
	<description>&lt;p&gt;I was fighting with the OF_peer() to check if it passes the openfirmware() call, which is OF entry and after lots of tries it seems that it does. It's very different from what I thought before. After using ofw_stack() from NetBSD in OF_peer() as it was done in OF_read()/OF_write(), that function seems to be working but the crash remains.&#160;&lt;/p&gt;&lt;p&gt;Here's the dump:&lt;/p&gt;&lt;p&gt;DEBUG 2&lt;br /&gt;done.&lt;br /&gt;subsystem 2100000&lt;br /&gt;&#160;  freebsd4_sigreturn(0)...&lt;br /&gt;cpu_startup() DEBUG 0&lt;br /&gt;** DEBUGL OF_printf(): after OF_peer() in decr_init()&lt;br /&gt;cpu_exception:&lt;br /&gt;SRR0 0x004A0DF0 SRR1  0x00003030 MSR  0x00003030&lt;br /&gt;LR   0x01003ED8 CTR   0x00000000 CR   0x24002044   XER 0x0&lt;br /&gt;DAR  0xD0004D3C DSISR 0x42000000 Type 3&lt;br /&gt;========================&lt;br /&gt;What is very strange, during the trace I've encountered the call to OF_write() just after OF_peer(), like there were _two_ calls to openfirmware() insted of one. And it's the second one that crashes... Now, what I don't get is where from this second call come ? There's no printf() around OF_peer()...:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;========================&lt;/p&gt;&lt;p&gt;from: sys/dev/ofw/openfirm.c&lt;/p&gt;&lt;p&gt;phandle_t&lt;br /&gt;OF_peer(phandle_t node)&lt;br /&gt;{&lt;br /&gt;&#160;       &#160; &#160; static struct {&lt;br /&gt;&#160;&#160;               &#160; &#160;cell_t name;&lt;br /&gt;&#160;               &#160; &#160; cell_t nargs;&lt;br /&gt;&#160; &#160; &#160;               cell_t nreturns;&lt;br /&gt;&#160;               &#160; &#160; cell_t node;&lt;br /&gt;&#160;               &#160; &#160; cell_t next; } &lt;/p&gt;&lt;p&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;args = {&lt;br /&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(cell_t)&quot;peer&quot;,&lt;br /&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; 1,&lt;br /&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; 1,&lt;br /&gt;&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;};&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&#160;       ofw_stack();&lt;br /&gt;&#160;       args.node = node;&lt;br /&gt;&#160;       if (openfirmware(&amp;amp;args) == -1)&lt;br /&gt;&#160;               return (-1);&lt;br /&gt;&#160;       return (args.next);&lt;br /&gt;}&lt;br /&gt;=========================&lt;br /&gt;&lt;/p&gt;</description>
	<pubDate>Sun, 17 Aug 2008 17:41:00 +0000</pubDate>
	<dc:creator>vi0 (noreply@blogger.com)</dc:creator>
</item>
<item>
	<title>Vincenzo Iozzo: Final results</title>
	<guid>http://blogs.freebsdish.org/snagg/2008/08/16/final-results/</guid>
	<link>http://blogs.freebsdish.org/snagg/2008/08/16/final-results/</link>
	<description>&lt;p&gt;Hi all,&#160;it has been a long time since my last post. Due to some problems I didn&amp;#8217;t have the chance to update this blog. Anyhow before the end of the soc, I&amp;#8217;m here to speak about what I did in this period.First of all my auditpipe patch changed a bit: it supports only pid-based subscription to events due to internal decision taken by me and other developers. How to use it then?&lt;br /&gt;
fd = open(&amp;#8221;/dev/auditpipe&amp;#8221;, O_RDONLY);&lt;br /&gt;
	if (fd &amp;lt; 0)&lt;br /&gt;
		err(-1, &amp;#8220;/dev/auditpipe&amp;#8221;);&lt;/p&gt;
&lt;p&gt;	entry = malloc(sizeof(struct auditpipe_ioctl_preselect_proc));&lt;br /&gt;
	if(entry == NULL)&lt;br /&gt;
		err(-1, &amp;#8220;MALLOC&amp;#8221;);&lt;/p&gt;
&lt;p&gt;	value = AUDITPIPE_PRESELECT_MODE_PROC;&lt;br /&gt;
	if (ioctl(fd, AUDITPIPE_SET_PRESELECT_MODE, &amp;amp;value) aipp_pid = pid;&lt;/p&gt;
&lt;p&gt;	if (ioctl(fd, AUDITPIPE_SET_PRESELECT_PROC, entry) &amp;lt; 0)&lt;br /&gt;
			err(-1, &amp;#8220;AUDITPIPE_SET_PRESELECT_EVENTS&amp;#8221;);&lt;/p&gt;
&lt;p&gt;What it does is to open auditpipe, change the preselection mode to AUDITPIPE_PRESELECT_MODE_PROC and set up an entry with a specific pid. From there on auditpipe will trace that specific pid. Clean and concise:P&#160;&#160;&#160;Now the second half of the project. I ought to write a regression test framework. After several unsuccessful attempts, I figured out how to make it works with a bit of shared memory. The general idea is to have a testing function/process which communicates with a parent process and exchange runtime information in order to run the test. &#160;The testing function will take read records from auditpipe and compare them with runtime information collected before. If some inconsistencies are found they are reported.&#160;More in details, here is a sample testing module:&lt;br /&gt;
/*-&lt;br /&gt;
 * Copyright (c) 2008 Vincenzo Iozzo&lt;br /&gt;
 * All rights reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * Redistribution and use in source and binary forms, with or without&lt;br /&gt;
 * modification, are permitted provided that the following conditions&lt;br /&gt;
 * are met:&lt;br /&gt;
 * 1. Redistributions of source code must retain the above copyright&lt;br /&gt;
 *    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
 * 2. Redistributions in binary form must reproduce the above copyright&lt;br /&gt;
 *    notice, this list of conditions and the following disclaimer in the&lt;br /&gt;
 *    documentation and/or other materials provided with the distribution.&lt;br /&gt;
 *&lt;br /&gt;
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS &amp;#8220;AS IS&amp;#8221; AND&lt;br /&gt;
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;br /&gt;
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE&lt;br /&gt;
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE&lt;br /&gt;
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&lt;br /&gt;
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS&lt;br /&gt;
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)&lt;br /&gt;
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT&lt;br /&gt;
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY&lt;br /&gt;
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF&lt;br /&gt;
 * SUCH DAMAGE.&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;/p&gt;
&lt;p&gt;#include &amp;#8220;audit_pipe_regression_test_utils.h&amp;#8221;&lt;/p&gt;
&lt;p&gt;struct sysctl_record&lt;br /&gt;
{&lt;br /&gt;
	int mib[6];&lt;br /&gt;
	char err_val[256];&lt;br /&gt;
	int ret;&lt;br /&gt;
	int index;&lt;br /&gt;
	struct sysctl_record *next;&lt;br /&gt;
};&lt;/p&gt;
&lt;p&gt;struct sysctl_record *&lt;br /&gt;
add_field(struct sysctl_record *head, struct sysctl_record *new)&lt;br /&gt;
{&lt;br /&gt;
	struct sysctl_record *tmp;&lt;/p&gt;
&lt;p&gt;	tmp = head;&lt;br /&gt;
	if(tmp == NULL) {&lt;br /&gt;
		new-&amp;gt;next = NULL;&lt;br /&gt;
		return (new);&lt;br /&gt;
	}&lt;/p&gt;
&lt;p&gt;	/* Reach the last element of the list*/&lt;br /&gt;
	for(; tmp-&amp;gt;next != NULL;tmp = tmp-&amp;gt;next);&lt;/p&gt;
&lt;p&gt;	new-&amp;gt;index = tmp-&amp;gt;index +1;&lt;br /&gt;
	tmp-&amp;gt;next= new;&lt;br /&gt;
	new-&amp;gt;next = NULL;&lt;/p&gt;
&lt;p&gt;	return (head);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;void test_sysctl()&lt;br /&gt;
{&lt;br /&gt;
	int mib[2];&lt;br /&gt;
	int ret, val;&lt;/p&gt;
&lt;p&gt;	init_channel_primary();&lt;/p&gt;
&lt;p&gt;	mib[0] = CTL_KERN;&lt;br /&gt;
	mib[1] = KERN_SECURELVL;&lt;br /&gt;
	val = 2;&lt;br /&gt;
	ret = sysctl(&amp;amp;mib, 2, NULL, NULL, &amp;amp;val, sizeof(int));&lt;/p&gt;
&lt;p&gt;	write_int(mib[0], &amp;#8220;arg&amp;#8221;);&lt;br /&gt;
	write_int(mib[1], &amp;#8220;arg1&amp;#8243;);&lt;br /&gt;
	write_int(ret, &amp;#8220;ret&amp;#8221;);&lt;br /&gt;
	if (ret == -1)&lt;br /&gt;
		write_string(strerror(errno), &amp;#8220;ret_val&amp;#8221;);&lt;br /&gt;
	else&lt;br /&gt;
		write_string(&amp;#8221;success&amp;#8221;, &amp;#8220;ret_val&amp;#8221;);&lt;br /&gt;
	write_end();&lt;/p&gt;
&lt;p&gt;	val = 1;&lt;br /&gt;
	ret = sysctl(&amp;amp;mib, 2, NULL, NULL, &amp;amp;val, sizeof(int));&lt;br /&gt;
	write_int(mib[0], &amp;#8220;arg&amp;#8221;);&lt;br /&gt;
	write_int(mib[1], &amp;#8220;arg1&amp;#8243;);&lt;br /&gt;
	write_int(ret, &amp;#8220;ret&amp;#8221;);&lt;br /&gt;
	if (ret == -1)&lt;br /&gt;
		write_string(strerror(errno), &amp;#8220;ret_val&amp;#8221;);&lt;br /&gt;
	else&lt;br /&gt;
		write_string(&amp;#8221;success&amp;#8221;, &amp;#8220;ret_val&amp;#8221;);&lt;br /&gt;
	write_end();&lt;/p&gt;
&lt;p&gt;	end_channel();&lt;/p&gt;
&lt;p&gt;	/* Let auditsysctl flush all data */&lt;br /&gt;
	sleep(5);&lt;br /&gt;
	return;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;void validate(FILE *f, struct sysctl_record *head, char *path, pid_t pid)&lt;br /&gt;
{&lt;br /&gt;
	int i, ret, reclen, bytesread, to_parse, arg_counter;&lt;br /&gt;
	struct sysctl_record *tmp, *elem;&lt;br /&gt;
	int err = -1;&lt;br /&gt;
	tokenstr_t tok;&lt;br /&gt;
	u_char *buf;&lt;br /&gt;
	u_char type = 0;&lt;br /&gt;
	FILE *fp;&lt;br /&gt;
	long control_flag;&lt;/p&gt;
&lt;p&gt;	to_parse = WAITING;&lt;br /&gt;
	arg_counter = 0;&lt;br /&gt;
	control_flag = 0;&lt;/p&gt;
&lt;p&gt;	fp = fopen(path, &amp;#8220;r&amp;#8221;);&lt;br /&gt;
	if(fp == NULL)&lt;br /&gt;
		return;&lt;/p&gt;
&lt;p&gt;	tmp = head;&lt;br /&gt;
	if(tmp == NULL)&lt;br /&gt;
		return;&lt;/p&gt;
&lt;p&gt;	while(1) {&lt;/p&gt;
&lt;p&gt;		to_parse = WAITING;&lt;br /&gt;
		if(!err || reclen == -1)&lt;br /&gt;
			break;&lt;/p&gt;
&lt;p&gt;		/* Record must begin with a header token. */&lt;br /&gt;
		do {&lt;br /&gt;
			type = fgetc(fp);&lt;br /&gt;
		} while(type != AU_HEADER_32_TOKEN);&lt;br /&gt;
		ungetc(type, fp);&lt;/p&gt;
&lt;p&gt;		while ((reclen = au_read_rec(fp, &amp;amp;buf)) != -1) {&lt;br /&gt;
			bytesread = 0;&lt;br /&gt;
			while (bytesread mib[0]);&lt;br /&gt;
						else&lt;br /&gt;
							ret = check_arg(tok.tt.arg32, tmp-&amp;gt;mib[1]);&lt;/p&gt;
&lt;p&gt;						if(!ret)&lt;br /&gt;
							report_error(tok, f);&lt;br /&gt;
						break;&lt;/p&gt;
&lt;p&gt;					case AUT_RETURN32:&lt;br /&gt;
						TOKEN_FLAG_SET(control_flag, TOKEN_RETURN);&lt;br /&gt;
						ret = check_ret(tok.tt.ret32, tmp-&amp;gt;ret, tmp-&amp;gt;err_val);&lt;br /&gt;
						if(!ret)&lt;br /&gt;
							report_error(tok, f);&lt;br /&gt;
						break;&lt;/p&gt;
&lt;p&gt;					case AUT_TRAILER:&lt;br /&gt;
						to_parse = WAITING;&lt;br /&gt;
						if(!TOKEN_FLAG_ISSET(control_flag, TOKEN_SUBJECT))&lt;br /&gt;
							report_error_string(&amp;#8221;Missing Subject token&amp;#8221;, f);&lt;br /&gt;
						if (!TOKEN_FLAG_ISSET(control_flag, TOKEN_ARG) || arg_counter != 2)&lt;br /&gt;
							report_error_string(&amp;#8221;Missing Argument token&amp;#8221;, f);&lt;br /&gt;
						if(!TOKEN_FLAG_ISSET(control_flag, TOKEN_RETURN))&lt;br /&gt;
							report_error_string(&amp;#8221;Missing Return token&amp;#8221;, f);&lt;br /&gt;
						control_flag = 0;&lt;br /&gt;
						arg_counter = 0;&lt;br /&gt;
						if(tmp-&amp;gt;next != NULL)&lt;br /&gt;
							tmp = tmp-&amp;gt;next;&lt;br /&gt;
						break;&lt;/p&gt;
&lt;p&gt;					default:&lt;br /&gt;
						break;&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;/p&gt;
&lt;p&gt;free(buf);&lt;br /&gt;
fclose(fp);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;int&lt;br /&gt;
main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
	int i, quit, fd, value, index, fdout, count;&lt;br /&gt;
	char *shared_string, *descr, path[512];&lt;br /&gt;
	pid_t pid;&lt;br /&gt;
	struct sysctl_record *head, *elem;&lt;br /&gt;
	FILE *f;&lt;/p&gt;
&lt;p&gt;	index = 0;&lt;br /&gt;
	head = NULL;&lt;/p&gt;
&lt;p&gt;	init_channel();&lt;/p&gt;
&lt;p&gt;	pid = fork();&lt;br /&gt;
	if(!pid) {&lt;br /&gt;
		sleep(15);&lt;br /&gt;
		test_sysctl();&lt;br /&gt;
	} else {&lt;br /&gt;
		fd = setup_auditpipe(pid);&lt;br /&gt;
		snprintf(path, 512, &amp;#8220;/tmp/audit-%d&amp;#8221;, pid);&lt;/p&gt;
&lt;p&gt;		fdout = open(path, O_RDWR | O_CREAT);&lt;br /&gt;
		if(fdout == -1)&lt;br /&gt;
			err(-1, &amp;#8220;OPEN&amp;#8221;);&lt;/p&gt;
&lt;p&gt;		quit = 0;&lt;br /&gt;
		while (!waitpid(pid, &amp;amp;quit, WNOHANG)) {&lt;/p&gt;
&lt;p&gt;			/* Audit pipe input. */&lt;br /&gt;
			read_auditpipe(fd, fdout);&lt;/p&gt;
&lt;p&gt;			/*&lt;br /&gt;
			 * See whether is there anything on the shared-memory,&lt;br /&gt;
			 * if so build a structure&lt;br /&gt;
			 */&lt;br /&gt;
			sem_getvalue(mutex, &amp;amp;count);&lt;br /&gt;
			if(count) {&lt;br /&gt;
				shared_string = read_string();&lt;br /&gt;
				elem = malloc(sizeof(struct sysctl_record));&lt;br /&gt;
				if(elem == NULL)&lt;br /&gt;
						err(-1, &amp;#8220;MALLOC&amp;#8221;);&lt;/p&gt;
&lt;p&gt;				while((count = parse_string(shared_string)) != -1) {&lt;br /&gt;
					descr = get_descr(shared_string);&lt;br /&gt;
					if(count == INT_TYPE) {&lt;br /&gt;
						if(!strncmp(descr, &amp;#8220;arg1&amp;#8243;, 4))&lt;br /&gt;
							elem-&amp;gt;mib[1] = get_int(shared_string);&lt;br /&gt;
						else if (!strncmp(descr, &amp;#8220;arg&amp;#8221;, 3))&lt;br /&gt;
							elem-&amp;gt;mib[0] = get_int(shared_string);&lt;br /&gt;
						else&lt;br /&gt;
							elem-&amp;gt;ret = get_int(shared_string);&lt;br /&gt;
					}&lt;br /&gt;
					else if ( count == STRING_TYPE) {&lt;br /&gt;
						snprintf(elem-&amp;gt;err_val, sizeof(elem-&amp;gt;err_val) &amp;gt;&lt;br /&gt;
								strlen(shared_string) +1 ?&lt;br /&gt;
								strlen(shared_string) +1 :&lt;br /&gt;
								sizeof(elem-&amp;gt;err_val), &amp;#8220;%s&amp;#8221;,&lt;br /&gt;
								shared_string);&lt;br /&gt;
					}&lt;br /&gt;
					shared_string = read_string();&lt;br /&gt;
				}&lt;br /&gt;
				head = add_field(head, elem);&lt;br /&gt;
				if(head == NULL)&lt;br /&gt;
					err(-1, &amp;#8220;List error&amp;#8221;);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	close_auditpipe(fd, fdout);&lt;br /&gt;
	end_channel();&lt;br /&gt;
	f = init_log(pid);&lt;br /&gt;
	validate(f, head, path, pid);&lt;br /&gt;
	fclose(f);&lt;br /&gt;
	return (0);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;As you might see, the validate() function will compare records against collected data, whereas the test_sysctl() will send &#160;to the parent, using shared memory, information regarding the events. You might see a sort of &#160;&amp;#8221;API&amp;#8221; here, those functions were provided in order to ease tests writing. They are somehow commented, so you might find useful to take a look at the code.&#160;I wrote tests for 20 events, but theoretically they are 500+, so we need your help. As usual if you have any kind of suggestions or comments feel free to contact me.&#160;Here: http://www1.autistici.org/snagg/final.zip you can find the whole code.&#160;&#160;Cheers,Snagg&#160;&lt;/p&gt;</description>
	<pubDate>Sat, 16 Aug 2008 19:08:17 +0000</pubDate>
	<dc:creator>snagg</dc:creator>
</item>
<item>
	<title>Anders Nore: Nearing end, call for testers</title>
	<guid>http://blogs.freebsdish.org/andenore/2008/08/16/nearing-end-call-for-testers/</guid>
	<link>http://blogs.freebsdish.org/andenore/2008/08/16/nearing-end-call-for-testers/</link>
	<description>&lt;p&gt;Hi, it&amp;#8217;s nearing the end of GSoC 2008 and I&amp;#8217;ve updated my wiki ( http://wiki.freebsd.org/AndersNore/pkg_improved ) about the pkg_improved project and there are testing instructions for those brave enough. Please test and please report bugs. There are several new features to the pkg-tools and there are some speed improvements made. Lately I&amp;#8217;ve been cleaning some of the code mostly fixing bugs and writing documentation in the form of man-pages.&lt;/p&gt;</description>
	<pubDate>Sat, 16 Aug 2008 17:50:36 +0000</pubDate>
	<dc:creator>andenore</dc:creator>
</item>
<item>
	<title>Przemek Witaszczyk</title>
	<guid>tag:blogger.com,1999:blog-6454200798774615510.post-1726951362836065456</guid>
	<link>http://bitbay.blogspot.com/2008/08/ive-tried-to-find-differences-between.html</link>
	<description>I've tried to find the differences between the contexts of calling openfirmware()&lt;br /&gt;from OF_write()/OF_read() and OF_peer(), but I found none. It's not possible&lt;br /&gt;to break into the fwentry() call from openfirmware(), since it always results in&lt;br /&gt;spinlock corrupt crash. &#160;I've tried to insert the call to decr_init() into several&lt;br /&gt;boot subsystems, it always ended with the same crash, even before the VM init.&lt;br /&gt;I've also called the OF_peer() at the very beginning of OF_write() to see if it's&lt;br /&gt;possible to execute it at the very early stage of the boot, before the KDB entry.&lt;br /&gt;It crashed. I've also tried to switch off the decr_init() call in the cpu_starup() and the system passed several following subsystems to subsystem 3000000 (or so) and crashed in the same way it does with decr_init().&lt;br /&gt;I've inspected what does the ofw_stack() function do, but it only copies the current call stack to the firmware stack located in locore.S. This call was added in OF_read()/write() to make them work on Efika. Now, I can guess it's something with what could have change in p4 FBSD vs FBSD 6.x, since the patch was for that version. I'll try to apply the patch to version 6.x. Also, I'll have a look at the NetBSD source. I really don't understand, why it does work work the OF_read()/OF_write() and does not for OF_peer(), since those calls are so similar.</description>
	<pubDate>Sat, 16 Aug 2008 06:32:00 +0000</pubDate>
	<dc:creator>vi0 (noreply@blogger.com)</dc:creator>
</item>
<item>
	<title>Przemek Witaszczyk: still no luck, and a new problem</title>
	<guid>tag:blogger.com,1999:blog-6454200798774615510.post-5887681693398099028</guid>
	<link>http://bitbay.blogspot.com/2008/08/still-no-luck-and-new-problem.html</link>
	<description>I've performed lots of experiments with the ofwreal.S and locore.S&lt;br /&gt;sources in aim to try to remove the problem with the stack.&lt;br /&gt;It does't work for now, but I've managed to overcome that by utilizing&lt;br /&gt;some free registers. Now I've encountered yet another problem - the&lt;br /&gt;kernel now crashes on the openfirmware entry in the fwentry(). It's probably&lt;br /&gt;coused by a wrong address of the entry point, coming from the virtual&lt;br /&gt;instead of the real addressing.  Here's the crash site:&lt;br /&gt;=============&lt;br /&gt;cpu_exception:&lt;br /&gt;SRR0 0x00000000 SRR1  0x00083030 MSR  0x00003030&lt;br /&gt;LR   0x004A0E70 CTR   0x00000000 CR   0x44002082   XER 0x20000000&lt;br /&gt;=============&lt;br /&gt;I've made a small test by changing the address the firmware entry is supposed to&lt;br /&gt;be at and I get slightly similar crash:&lt;br /&gt;=============&lt;br /&gt;cpu_exception:&lt;br /&gt;SRR0 0x01003ED8 SRR1  0x00003030 MSR  0x00003030&lt;br /&gt;LR   0x004A0E70 CTR   0x00000000 CR   0x44002044   XER 0x0&lt;br /&gt;=============&lt;br /&gt;The LR's point to the same location, the very next instrucion after  branch to OF.&lt;br /&gt;So I suppose it's the OF address, not just the argument addresing&lt;br /&gt;that is responsible at the moment. I'm trying to find out how to translate an&lt;br /&gt;address to the real mode. All help would be greatly appreciated...:)</description>
	<pubDate>Fri, 08 Aug 2008 15:28:00 +0000</pubDate>
	<dc:creator>vi0 (noreply@blogger.com)</dc:creator>
</item>
<item>
	<title>Konrad Jankowski: Enter Libc</title>
	<guid>http://blogs.freebsdish.org/konrad/2008/08/05/enter-libc/</guid>
	<link>http://blogs.freebsdish.org/konrad/2008/08/05/enter-libc/</link>
	<description>&lt;p&gt;I spend last weeks on importing interesting parts of Apple&amp;#8217;s libc to FreeBSD. I ended up with this patch: http://versus.ath.cx/patches/fbsd_7.0_collation.patch, which I than applied to the CURRENT libc, and commited as my p4 libc branch.&lt;/p&gt;
&lt;p&gt;It wasn&amp;#8217;t however without accident - I suffered two serious laptop breakages, ending with en essentially dead one. First the display broke down - stopped showing anything - I think it was the backlight. I was lucky - I had external monitor enabled and configured for Dual Head. When I connected it however, I started to get IDE timeout problems when booting FreeBSD. So my hard drive also died. I managed to boot off live-cd, and copy and my gsoc data, and that was it.&lt;/p&gt;
&lt;p&gt;After installing everything on my new-bought laptop, I got to finishing my work on libc, and was able to get in into - I think - fully working state. There are still some little things I want to fix/enhance, but general functionality is there.&lt;/p&gt;
&lt;p&gt;Now I&amp;#8217;m focusing on writing regression tests, than will come manpages. At the end will be a call for testers.&lt;/p&gt;</description>
	<pubDate>Tue, 05 Aug 2008 11:55:39 +0000</pubDate>
	<dc:creator>konrad</dc:creator>
</item>
<item>
	<title>Ryan French: Weekly Report - 4/8/08</title>
	<guid>http://blogs.freebsdish.org/rfrench/2008/08/03/weekly-report-4808/</guid>
	<link>http://blogs.freebsdish.org/rfrench/2008/08/03/weekly-report-4808/</link>
	<description>&lt;p&gt;I managed to get a few things done this week which and spend a few hours going over FreeBSD networking code and making changes to my own code. I am very close to being able to get the basics of MPLS going, and once that is done the more advanced features will actually be a bit easier as I have the Ayame project to reference those off, whereas at the moment I have no real reference material on how to integrate my MPLS code with the FreeBSD networking code. As I said last week, if anyone has any advice or experience on how to get netisr calling my MPLS code, I think I almost have it, but it would be hugely appreciated as it will save me precious time that I dont really have. I realised this weekend that there is only a month till the end of the Summer of Code, at which point I really need to have at least simple sending/receiving and basic label switching going. Luckily, I am also doing this project as a dissertation for my Post Graduate Diploma in Computer Science this year, so I will be working on it for at elast another month after the summer of code stuff has finished, and I plan on getting a fully working implementation of MPLS going for FreeBSD eventually by completing it once I leave university.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Accomplished Last Week:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;- Went through the FreeBSD networking code, trying to figure out where abouts the actual call to the protocol initialising functions are made. It&amp;#8217;s not as easy as you would think for someone with almost no previous Operating System code experience to look at this stuff and try and figure it all out, but I&amp;#8217;m getting there.&lt;/p&gt;
&lt;p&gt;- Made some changes to my own code to use the FreeBSD specific networking routines, rather than the OpenBSD ones, particularly involving if_ethersubr.c and the netisr files.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plans for Next Week:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;- Finally finish figuring out where I am to call the mplsinitr function and getting the protocol registered with netisr. I&amp;#8217;ve said this many times before, and&#160; it keeps elluding me, but basically once this is done then the protocol will have a basic functionality and I can actually be semi-happy with the work I have accomplished.&lt;/p&gt;
&lt;p&gt;- Figure out what feature is more important to concentrate on next. With so little time remaining in the GSoC I am wanting to make sure I have gotten as many features of the protocol implemented as I can, but I want to make sure I have all the key features that I need implemented as well.&lt;/p&gt;</description>
	<pubDate>Sun, 03 Aug 2008 23:52:07 +0000</pubDate>
	<dc:creator>Ryan French</dc:creator>
</item>
<item>
	<title>Anders Nore: New pkg_info -M (installtime comparison)</title>
	<guid>http://blogs.freebsdish.org/andenore/2008/08/03/new-pkg_info-m-installtime-comparison/</guid>
	<link>http://blogs.freebsdish.org/andenore/2008/08/03/new-pkg_info-m-installtime-comparison/</link>
	<description>&lt;p&gt;Now the new date feature is doing something useful, I&amp;#8217;ve added an option (-M) to pkg_info which compares installtimes of packages similar to the comparison of versions. So now you can do &amp;#8220;pkg_info -M &amp;#8216;*&amp;gt;2008 07 18&amp;#8242; &amp;#8221; and it will display all pacakges installed after the date YYYY MM DD, you can also use the -x or -X option with the -M option. I&amp;#8217;m also planning to make use of this in pkg_delete so you can delete packages within date-ranges. Also pkg_convert will have an option so you can make the installtime of packages (who do not have a @comment DATE field) equal e.g., to the changetime of +DESC in /var/db/pkg/pkgname/ (which is correct for most packages). I&amp;#8217;ve also decided to cache the installtime which makes this operation a lot faster than calling read_plist for every package to find the installtime.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve also done some improvements to the &amp;#8216;pkg_add -r&amp;#8217; progress indication output, which now displays the speed of the download as well as percentage progress.&lt;/p&gt;</description>
	<pubDate>Sun, 03 Aug 2008 22:23:06 +0000</pubDate>
	<dc:creator>andenore</dc:creator>
</item>
<item>
	<title>Przemek Witaszczyk: hard progress</title>
	<guid>tag:blogger.com,1999:blog-6454200798774615510.post-4010509782318405583</guid>
	<link>http://bitbay.blogspot.com/2008/08/hard-progress.html</link>
	<description>&lt;p&gt;Eventually, with the aid of my mentor, we found the exact position of the faulting instruction. I've managet to turn on the KDB facility and thus we were able to make some breakpoints. In aim to spot the bug we used the DAR register content and toolchan version of the objdump tool. &#160;Fortunately, it appeared that addresses obtained from the objdump and those from the running kernel match. Here's the dump: &lt;/p&gt;&lt;p&gt;====================================================================&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;SRR0 0x004A0D10 SRR1 0x00003030 MSR 0x00003030&lt;br /&gt;LR 0x01003ED8 CTR 0x00000000 CR 0x24002044 XER 0x0&lt;br /&gt;DAR 0xD0004D3C DSISR 0x42000000 Type 3&lt;br /&gt;GPR[] 0x004A0BC4 0xD0004D30 0x00000000 0x01003ED8 0x00003030 0x00000000 0x00000020 0x00000000&lt;br /&gt;...&lt;br /&gt;&lt;/p&gt;&lt;p&gt;====================================================================&lt;/p&gt;&lt;p&gt;The evil instrucion is in the openfirmware entry point wrapper,&lt;/p&gt;&lt;p&gt;====================================================================&lt;/p&gt;&lt;p&gt;ofwreal.S&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;/*&lt;br /&gt;&#160;* Emulated firmware entry.&lt;br /&gt;&#160;*/&lt;br /&gt;fwentry:&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&#160;lis     %r3,clsave@ha           &#160; /* save mmu values of client */&lt;br /&gt;&#160;       addi    %r3,%r3,clsave@l       &lt;br /&gt;&#160;       lis     %r3,fwsave@ha           /* restore mmu values of firmware */&lt;br /&gt;&#160;       addi    %r3,%r3,fwsave@l&lt;br /&gt;&#160;       bl      restoremmu &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&#160;       lis     %r3,ofentry@ha&lt;br /&gt;&#160;       lwz     %r3,ofentry@l(%r3)      /* get actual firmware entry */&lt;br /&gt;&#160;       mtlr    %r3&lt;br /&gt;&lt;br /&gt;&#160;       mfmsr   %r4                    &lt;br /&gt;&#160;       stw     %r4,12(%r1)             /* save MSR */&lt;br /&gt;&#160;       ori     %r4,%r4,PSL_IR|PSL_DR   /* turn on MMU */&lt;br /&gt;&#160;       andi.   %r4,%r4,~PSL_EE@l       /* turn off interrupts */&lt;br /&gt;&#160;       mtmsr   %r4&lt;br /&gt;&#160;       isync&lt;br /&gt;&lt;br /&gt;====================================================================&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The problem is with the stack,&lt;/p&gt;&lt;p&gt;stw     %r4,12(%r1)             /* save MSR */&lt;/p&gt;&lt;p&gt;That line causes probably a DSI exception. The problem is that it crashes just after the restoremmu function branch. If one stores something on the stuck before that branch, ther's no crash. So the problem lies in the restoremmu function, but it's not clear to me where exactly it is, because the restoremmu does not operate the %r1 register explicitly.&lt;/p&gt;</description>
	<pubDate>Fri, 01 Aug 2008 07:29:00 +0000</pubDate>
	<dc:creator>vi0 (noreply@blogger.com)</dc:creator>
</item>

</channel>
</rss>
