<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>G33K @ Work &#187; Hacking</title>
	<atom:link href="http://www.geekatwork.de/category/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geekatwork.de</link>
	<description>Basteleien eines Geeks</description>
	<lastBuildDate>Mon, 12 Jul 2010 08:38:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>OS Development Demo Code</title>
		<link>http://www.geekatwork.de/2010/07/12/os-development-demo-code/</link>
		<comments>http://www.geekatwork.de/2010/07/12/os-development-demo-code/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 08:36:14 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[OSDev]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[interrupts]]></category>
		<category><![CDATA[low level]]></category>
		<category><![CDATA[pic]]></category>
		<category><![CDATA[pit]]></category>
		<category><![CDATA[sigint]]></category>
		<category><![CDATA[x86]]></category>

		<guid isPermaLink="false">https://www.geekatwork.de/?p=274</guid>
		<description><![CDATA[A while ago, I wrote some demo code to demonstrate vari [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago, I wrote some demo code to demonstrate various things you need to do to write your own operating system.<br />
In May 2010 I held a lecture and workshop about this code and the concepts at <a href="http://events.ccc.de/sigint/2010/wiki/Hauptseite" target="_blank">SigInt conference in Cologne</a>, Germany.</p>
<p>I just thought that this code may be interesting to other people who did not attend this conference.<span id="more-274"></span></p>
<p><a href="http://github.com/G33KatWork/SigInt10OSWorkshop" target="_blank">The demo code</a> includes mainly x86 specific stuff and it is truly demo code, so don&#8217;t just copy it into another project. Even if it works at first sight, it it is highly likely to break sooner or later <img src='http://www.geekatwork.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The code contains samples for:</p>
<ul>
<li>A small &#8220;Hello World&#8221; bootsector in realmode</li>
<li>A sample how to enable the A20 gate. This works at least in QEMU</li>
<li>Loading a barebone-kernel written in C by GRUB</li>
<li>Switching to protected mode and writing to the textmode framebuffer</li>
<li>Handling interrupts in protected mode using the old PIC</li>
<li>Configuring and using the old PIT (Timer)</li>
<li>Switching to longmode (64 Bit)</li>
<li>A multitasking demo how to do context switching</li>
</ul>
<p>The first two samples are completely written in Assembly and are loaded directly by the BIOS from a floppy drive. All other samples are mainly written in C spiced with some Assembly and are loaded from a FAT formatted floppy disk by a GRUB bootloader.</p>
<p>For those of you who speak german, here are the slides of the conference:<br />
<a href="http://events.ccc.de/sigint/2010/wiki/Fahrplan/events/3889.de.html" target="_blank">Talk</a><br />
<a href="http://events.ccc.de/sigint/2010/wiki/Fahrplan/events/3890.de.html" target="_blank">Workshop </a></p>
<p>If you do anything with this demo code, I would appreciate to hear about your project or experiences. Also, If there are specific questions or problems about/with this code which are not easily resolvable by Googling and using your brain, feel free to ask in the comments. <img src='http://www.geekatwork.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
 <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://www.geekatwork.de/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.geekatwork.de/2010/07/12/os-development-demo-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switch Hacking</title>
		<link>http://www.geekatwork.de/2010/02/02/switch-hacking/</link>
		<comments>http://www.geekatwork.de/2010/02/02/switch-hacking/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 12:18:33 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Elektronik]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[Switch]]></category>

		<guid isPermaLink="false">http://www.geekatwork.de/?p=130</guid>
		<description><![CDATA[Last week I stumbled upon tmbinc's blog entry series "W [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I stumbled upon tmbinc&#8217;s blog entry series &#8220;What&#8217;s inside&#8221;.<br />
<a href="http://debugmo.de/?p=134" target="_blank">This one</a> was especially interesting to me since I always wanted to buy a GBit switch (I never had one until today, really <img src='http://www.geekatwork.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).<span id="more-130"></span></p>
<p>I ordered this switch (a TP-Link TL-SG1008D) for just about 30€ including shipping and today I got my package. I opened it, checked if the switch works and voided the warranty.<br />
After opening the device it was clear that I got some other hardware compared to tmbinc. I don&#8217;t have this monster heat sink on top of a BGA chip. Instead there are two smaller LQFP-Chips with one heat sink each.</p>
<p><a href="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.26.06-e1265110298308.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-117" title="2010-02-02 12.26.06" src="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.26.06-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>A closer look at my and tmbinc&#8217;s images relieve that my switch is actually revision 1.1 and tmbinc&#8217;s is revision 2.0.</p>
<p>I tried to remove the heat sinks with pliers but I didn&#8217;t want to damage my new toy.<br />
Also, I wanted to know how warm these chips get while using the device, so I took some ethernet cables, made some loops and inserted one cable into the ethernet jack into my laptop. As soon as Mac OS detected an active connection it broadcasted at least one package onto the line that was looping happily from one switch port to the next <img src='http://www.geekatwork.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
I let this thing running for about 10 minutes and the chips didn&#8217;t get very warm. I hoped that the glue would get a bit less sticky due to the heat, but there was just no heat. Seems that the heat sinks did a good job there. <img src='http://www.geekatwork.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  So I tried the exact opposite and put this thing into my freezer for a few minutes. After it got cooled down a few degrees I took my pliers and applied some force and look: They came off.</p>
<p><a href="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.26.23-e1265110848915.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-120" title="2010-02-02 12.26.23" src="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.26.23-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>As you can see there are two Realtek chips on this board. The right chip is an RTL8214. The <a href="http://www.realtek.com.tw/products/productsView.aspx?Langid=1&amp;PNid=16&amp;PFid=47&amp;Level=5&amp;Conn=4&amp;ProdID=222" target="_blank">Realtek Website</a> says that this chip is just a quad-port gigabit ethernet transceiver.<br />
The other chip is an RTL8368S. Here the <a href="http://www.realtek.com.tw/products/productsView.aspx?Langid=1&amp;PNid=18&amp;PFid=43&amp;Level=5&amp;Conn=4&amp;ProdID=198" target="_blank">Realtek Website</a> tells us, that this chip is actually the switch controller for 8 ports, but it has only 4 transceivers, hence the second transceiver chip. On the pictures you can clearly see some bus between the two ICs.<br />
And look at the features: Per port-ACLs on Layer 2, 3 and 4, VLAN, Spanning Tree, 802.1x, QoS and several statistic counters.<br />
Unfortunately the datasheets for both chips don&#8217;t seem to be publicly available.<br />
&lt;rant&gt;I absolutely hate all this NDA crap&#8230; Those fscking ethernet chips are no rocket science that needs to be protected in such a way. SRSLY!&lt;/rant&gt;</p>
<p><a href="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.26.59-e1265111511977.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-122" title="2010-02-02 12.26.59" src="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.26.59-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>On the upper side of the image above you can see a small <a href="http://www.datasheetcatalog.com/datasheets_pdf/2/4/C/0/24C08.shtml" target="_blank">IC with part number 24C08</a>, which is an 8KBit I2C EEPROM. I haven&#8217;t looked at the contents yet, but I suspect that this EEPROM contains the configuration for the switch controller, but I doubt that the contents will be of any help without a datasheet <img src='http://www.geekatwork.de/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Some closeups of the chips:<br />
<a href="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.26.30-e1265111971380.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-123" title="2010-02-02 12.26.30" src="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.26.30-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.26.50-e1265112024789.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-124" title="2010-02-02 12.26.50" src="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.26.50-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.27.05-e1265112065514.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-125" title="2010-02-02 12.27.05" src="http://www.geekatwork.de/wp-content/uploads/2010-02-02-12.27.05-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><strong>Update:</strong> I <a href="ftp://83.149.205.218/pub/hardware/realtek/" target="_blank">found some datasheets</a> for several Realtek Chips. There is no datasheet for the RTL8368, but for the RTL8369. It seems that the only difference between those two chips are that the latter doesn&#8217;t have any transceivers on-die, but only some <a href="http://en.wikipedia.org/wiki/Serial_Gigabit_Media_Independent_Interface" target="_blank">SGMII</a> ports for all 8 Ethernet ports. I think I&#8217;m going to dump the EEPROM and try to get some information out of it with the 8369 datasheet.</p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = 'G33KatWork';
var flattr_url = 'http://www.geekatwork.de';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'G33K @ Work';
var flattr_dsc = 'Basteleien eines Geeks';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://www.geekatwork.de/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.geekatwork.de/2010/02/02/switch-hacking/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
