Showing posts with label hardware. Show all posts
Showing posts with label hardware. Show all posts

2007-12-19

OpenMoko Debug Board

I've had a problem with my u-boot_env since ever since I flashed a bad u-boot version in early august. The first time I tried to flash a new kernel it wrote right over the environment partition and since then I've been unable to boot without holding in AUX and use Factory Reset. Also, since the u-boot_env was overwritten I had no way to redirect the u-boot serial terminal output to USB because the limited default boot menu only includes Boot and Factory Reset.

Fortunately I managed to get my hands on a debug board. (Thanks abraxa_!) Following the instructions in the wiki I installed libftdi and started looking for an openocd ebuild. Wasn't until later that I realized I didn't need to install openocd in Gentoo at all, since it was a lot easier to use the one built by the Moko Makefile.

Next I connected the debug board to the pc but it just wouldn't show up correctly. Taking a closer look at the debug board page in the wiki I noticed I was missing kernel module. Recompile the kernel to include Device Drivers -> USB -> USB Serial Converter Support -> USB FTDI Single Port Serial Driver as a module, and after a modprobe ftdi_sio vendor=0x1457 product=0x5118 the device was detected the way it should:
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB Serial Device
ftdi_sio 2-1.1:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT2232C
usb 2-1.1: FTDI USB Serial Device converter now attached to ttyUSB0
ftdi_sio 2-1.1:1.1: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT2232C
usb 2-1.1: FTDI USB Serial Device converter now attached to ttyUSB1
usbcore: registered new interface driver ftdi_sio
drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver
I updated the openocd.conf according to the wiki and it started without complaints. Did a telnet localhost 4444 and was greeted by the openocd prompt. The only problem now was that I had no real clue how to proceed. I typed help in the prompt and then tried some of the commands. After a mix of a halt and reset commands the Neo1973 went black. Trying to restart from scratch I closed openocd and unplugged the debug board. That turned out to be a bad idea. After reconnecting the USB cable and restarting openocd I constantly got the error:
Info: openocd.c:93 main(): Open On-Chip Debugger (2007-09-05 09:00 CEST)
Info: configuration.c:50 configuration_output_handler(): Command ft2232_vid_pid not found
Info: configuration.c:50 configuration_output_handler(): Command ft2232_layout not found
Error: jtag.c:1461 jtag_init(): No valid jtag interface found (ft2232)
Error: jtag.c:1462 jtag_init(): compiled-in jtag interfaces:
Error: jtag.c:1465 jtag_init(): 0: parport
The reason it failed was probably that the Neo was still on, but halted, and I guess that caused some trouble for the debug board. After disconnecting both devices and taking the battery out of the Neo, then starting over again it worked better.

Asked for some help in #openmoko for how to get that u-boot_env repaired and NineX suggested using the Devirginator since it had worked well for him. At that time the buildhost was down, so I tried to configure it to use my local repository instead. After about an hour or so fighting with the config file, only getting useless error messages, I got tired and gave up for the day.

At the same time as NineX mentioned the devirginator, Mike Montour put together a short list of steps in a pastebin explaining how to do it manually and my plan was to try that next time. While I was away during the weekend, moving to Stockholm, he wrote an awesome wiki page on how to do that manual Unbricking. Thanks a lot for the clear and helpful wiki page Mr Montour!

I followed the steps on that page straight through, using a mix of openocd, dfu-util and cu, I now have a Neo1973 that boots correctly. Rebuilding my Bad Block Table showed that I had a bad block at 0x00004000, the default u-boot_env address. Maybe that, in combination with an early August version of u-boot was the reason I got this problem in the first place.

The Debug Board itself is not so easy to use at first, especially when you're not really familiar with embedded things like JTAG and serial consoles. Despite that it is still very nice to have one around when you experiment with your Neo1973. If I knew this low level stuff was so much fun I would have bought the Advanced Kit from the start.

2007-11-24

OpenMoko is growing

I just took a quick look at the statistics for the OpenMoko project and it made me happy.

Currently there is 3500 revisions in the svn repository and bugzilla has reached 1022 bugs, 241 of them are still open. The wiki has 3685 pages and 6090 registered users, and maybe more impressively, projects has 1507 developers and 81 projects registered.

The IRC channel on freenode has stayed at around 320 people for the last six months and there's a lot of interesting discussions going on. It's a friendly atmosphere and people interested in the project are encouraged to drop by. Usually, they get pointed to the right place in the wiki, where most questions have already been answered. A good page to read if you want to know what is going on in the project is the Community Updates page. Right now it has not been updated in over a week, but I'm sure it will be soon.

Unfortunately, a hardware bug in power management with GTA02v4 has required a fifth revision of the hardware for GTA02. It's a bit of a shame that the release will be delayed even further, but I'd rather have good hardware later, than something broken right now.

The most interesting code changes in OpenMoko recently involves gsmd, PhoneKit(pdf) and the dbus interface to it. The dialer and sms handling is also being worked at in a furious pace by the OpenedHand guys. Since about a week, calling has worked without any problems for me. Power management has been improved and the phone should last at least a day now.

Also, some guys from Ixonos have been working on an alternative to gsmd, gsmd2. I haven't looked at the code, but they have some very nice documentation and a detailed specification. Still, lots to be discussed it seems.

The GPS binary driver is still not available for download. OpenMoko have been promised by Global Locate that they will be able to distribute it, but the legal terms are not yet set. Hopefully this will be solved soon.

All in all, a lot is going on and the software will be in pretty good shape for when the GTA02 is released.

2007-09-01

X86 processors and chipsets

It's not easy to stay on top of all the latest developments in the CPU world but luckily you hardly have to any more. All new computers are fast enough for most users, unless you absolutely want to play the latest games. But for the ones that want to know I've put together a summary of what has been going on during the last few years, what happens right now, and some rumors of the future.

There is still a lot happening on the CPU front, even if it might feel like the increase in performance is not as fast paced as it used to be a few years ago. The most notable change lately is that almost all new processors have two or more cores on each chip, but let's start from the beginning shall we?

NetBurst and K7

Everyone even remotely interested in computer hardware know that NetBurst, the architecture used in the Pentium 4 processor, was far from elegant. Released in late 2000, it was built purely for high clock frequencies. The first NetBurst CPU had a 20 stage pipeline, compared to the 10 stages in the Pentium III and the AMD K7 Athlons. The long pipeline made it easier for Intel to push the clock frequency way up and soon enough the old Athlons were falling behind. AMD was simply unable to increase the clock frequencies any more with their current design and manufacturing processes.

K8

When AMD released their K8 based Opteron processors in the autumn 2003 the picture changed completely. The new CPUs completely left the NetBurst Pentium 4's in the dust. They had a completely different design, using a short 12 stage pipeline, compared to the 20 stages long pipeline used in the Northwood Pentium 4, and doing a lot more Instructions Per Clock (IPC). The K8 architecture could perform three complex x86 instructions per clock, compared to one for the Pentium 4. It had three integer and three floating point ALUs, compared to four integer and one floating point ALU for the contemporary NetBurst revision (More details here).

The Opteron also added AMD's x86-64 instruction set, making it possible to use more than 4GB ram without any inefficient work-around. The extension also included doubling the number of registers from 8 to 16, as well as doubling the size of the registers from 32 to 64 bit. Combined with a modern and efficient HyperTransport bus and a low latency on-die memory controller there was just no way Intel could compete. They did their best, using their more advanced manufacturing process to add more cache to the CPU die and increased the pipeline length even further. The seventh revision of the NetBurst architecture called Prescott had 31 stages in the pipeline, but it just wasn't enough. Yet, all the Pentium 4 did was to get smoking hot.

Pentium-M and Core

Luckily for Intel, their engineers in Israel had been working on a new power efficient processor for use in laptops and came up with a real gem. Called a Pentium III on kryptonite, the Banias was built to keep power dissipation down. Released 2003 in laptops under the Centrino brand, enthusiasts quickly noticed they could overclock it to perform better than any desktop Pentium 4, and even better than the latest Athlons. Intel gave up on NetBurst and continued to develop the Pentium-M into what would be come the Core architecture.

The first Core based CPU, code named Yonah, was released in laptops as the Core Duo in January 2006. They performed way better than AMD's laptop offer, the Turion CPUs, who were both slower and consumed more power. Later in the spring Intel brought the Core architecture to the desktop with the Conroe processor. It was released under the name Core 2 Duo and was an instant success. The chips were about 33% faster than the Athlon 64's at the same clock frequency and they also included AMD's x86-64 extensions.

AMD tried to answer up to Intels offering, but now they were once again the having the inferior architecture. And just as before, they were unable to push their processors to the frequencies needed to compete with the Core 2 CPUs on the competitive desktop market. Debuting at 2.2 GHz in 2003, the fastest Athlon 64 FX was still stuck at 2.8 GHz in mid 2006 while the Core 2 Duo with twice the cache was already available at 2.933 GHz.

Fortunately it was still going well for AMD in the lucrative 4+ CPU server space. Intel's Core 2 Xeon server chips were still stuck with an old Front Side Bus (FSB) and were unable to compete on four-sockets or more. AMD, now with the knife at their throat struggled to get Barcelona, the processor based on their new K10 architecture, ready for consumers.

Future - K10 and vPro, Bulldozer and Nehalem

The long awaited Barcelona quad core processor will be released in mid September this year. AMD are still keeping a tight lid on all the details surrounding the chip, but some leaked benchmarks from The Inquirer sure look promising. The results show that the Barcelona could be pushed to over 30,000 3DMarks 06 and 11GB/s memory bandwidth compared to Intel's fastest "quad core" having 7.5 GB/s bandwidth. Architecturally they seem to be equals, but the question is if AMD will be able to compete for the top spot when they're always a step behind Intel in the manufacturing process.

To steal some thunder from AMD, Intel will release a new platform called vPro at the same time. First presented in 2002 under the name LaGrande, together with Microsofts controversial Palladium initiative, these extensions are now known as Trusted Execution Technology (TXT). Intel have announced three new Core 2 Duo processors for use with the vPro platform. Intel is trying to push it as the ultimate virtualization technology, which it is in some ways, but it can also be used as a very powerful DRM. Hopefully people will realize what this means and how "Big Content" can use it to lock you out from using your files as you want to. Hannibal describes his concerns well in his Ars Technica article about vPro.

Next year Intel will start releasing systems using their new Common System Interface (CSI), finally replacing the old FSB that's been a bottle neck for way too long. Initially it will be intended for multi socket servers, but the technology will trickle down to desktops and laptops later on.

For AMD the future seem to be about Bulldozer. It will be the first CPU with SSE5 and will be build with AMD's new modular Fusion architecture. The idea is to be able to mix several types of cores on the same die, including on-die Graphics Processing Units (GPU). To be released in 2009, they will be up against Intel's next chip architecture called Nehalem.

Tip of the iceberg

I've intentionally left the EPIC, SPARC, CELL and POWER architectures out of this. They might be technically more interesting, but they're not x86. Maybe that's something I should get back to another day, if only to make fun of the Itanic or to admire IBM's POWER6 beast. IBM are producing the CPUs for all three new consoles, the Wii, the XBox360, and the PS 3, and there's a lot to say about all of them. I've also avoided talking about what's happening in the rapidly growing System On a Chip world. Mobile computing is exploding and there's many chip manufacturers who want a piece of the action.

I've listed several well written articles at the end of this post if you really want to dig in to details like vector processing instructions, memory bandwidth or the different manufacturing processes, they are all worth reading.

My favorite tech writer, Jon "Hannibal" Stokes have recently released a book called "Inside the Machine". I'm ashamed to say I haven't read the book yet, but it's definitely something I will do as soon as I can. Expect a review of it.

While reading forums and comments to articles about processor architectures I've come up with this modified version of Goodwin's Law, we can call it Mogren's Law:
As an online discussion about processor architecture grows longer, the probability of a comparison involving Alpha or RISC approaches one.
The Alpha was a beautiful design though, too bad EV79 and later was canceled. Luckily the clever guys behind the Alpha design were quickly hired to work on other things...


Into the Core: Intel's next-generation microarchitecture - Jon Stokes - April 05, 2006

Inside Barcelona: AMD's Next Generation - David Kanter - March 16, 2007

Intel Core 2 Duo - Franck Delattre and Marc Prieur - June 22, 2006

Core 2 Duo and the future of Intel - Rob Hallock - November 5, 2006

AMD K10 Micro-Architecture
- Yury Malich - August 17, 2007

The Common System Interface: Intel's Future Interconnect - David Kanter - August 28, 2007

Intel's new vPro: two steps forward for x86... as well as for DRM and P2P? - Jon Stokes - August 27, 2007