Skip to content

Open Source VMware Guest Tools

So, I’ve mentioned these before but Dan Williams’ blog post about SET_NETDEV_DEV in the vmxnet driver clearly tells me I need to try and publicise these more. Back in September last year we open-sourced the Linux and BSD guest tools – including all the kernel drivers. So, if you found a problem in a driver (or any other part of the tools), you have an avenue for discussion and for submitting patches at the tools web page. Or you can just go there to get the latest version – and it happens to be the case that SET_NETDEV_DEV support has been there for a while (Workstation 6.0.x is a comparatively old codebase). So, hopefully Dan reads this (couldn’t find a way to post comments) and can go and get the latest version which fixes his problem. I guess today’s question is: If things change for the better and you don’t notice, did anything really change at all?

Finally got my N810

My N810 finally arrived yesterday, and after working out how to get the battery cover off, I got it up and running with the 48MHz kernel (The N800 and N810 use exactly the same kernel, so just use the one I already released here.

I’m happy to report that the on-board eMMC is happy to run at 48MHz and performs pretty respectably with transfer rates of about 11.5MB/s compared to just over 13MB/s for the fastest card in my collection. As previously discussed, you need to force the CPU speed up to maximise transfer rates.

Other people have also said this, but if you make a backup on the N800, you can restore it on an N810 without any problems. Just remember that if you had the fmradio app installed on the N800, there’s no radio hardware in the N810 :-)

Slow memory card performance on N800 with OS2008

After I released my latest kernel with 48MHz support for accessing MMC and SD cards, a couple of readers noticed that the card performance was surprisingly low (around 4MB/s) which was way slower than I saw when I did testing way back when. Lucky, I kept those old results around and the fastest card I have was reporting 12.9MB/s and it too is now doing 4.something. That’s not good. The really weird part is that the transfer rate seems to *increase* when I put load on the CPU! Obviously, there’s a dimishing returns behaviour here but certainly if I put ~20% load on the CPU, I see the transfer rate increase by about 50%.

So, given that, it seems like there’s something funky going on with the cpu power conservation and it’s not speeding up when it needs to to maximise the data transfers.

I’ve filed bug 2838 for this problem.

In the meantime, my 48MHz patch is rather accademic as you’re never going to reach the hardware limits.

My n810 is now in the mail and I’ll report if I see any difference in behaviour.

Updated kernel for OS2008 (2.2008.50) release

Well, if I was slow with the last release, at least I can do better with this one. There was a new kernel update in this release but my patches applied fine and the resulting image checks out on n800. As before, I have no idea how well the high speed mode interacts with the eMMC inside the n810 and I’m afraid I still have no idea when I’ll be able to check that out; I’m in the US – where we’re lucky enough to have to deal with a web store which doesn’t accept the maemo discount codes and their out of stock anyway. *sigh* It would be nice if someone from Nokia could comment on this mess.

Anyway, you can grab the kernel binary and patches from here. Enjoy!

Updated kernel for OS2008 (1.2008.44)

Hi all,

For some odd reason, I never hit publish on this. It’s since been overtaken by the release of the 2.2008-50 release which I’m currently trying to get my hands around. Expect an update shortly.

I’ve finally got around to getting the Maemo 4.0 dev environment so I’ve now been able to build a new kernel with the highspeed MMC/SD patch applied. The docs are not super clear but I believe this same kernel image is used for both the N800 and N810 – I’ve only tested it out on my N800 as the N810 isn’t released here until the 19th. Although the N810 only has a miniSD slot, this patch is still useful as it’s possible to get miniSD and microSD cards that can operate at 50MHz. However, N810 users should note that I have no idea how the internal 2GB eMMC reports itself and how it will interact with highspeed operations. It’s a Samsung part that’s basically just the guts of an MMC card soldered to the board but it does have some differences. I’d be interested in hearing any reports and I will obviously check for myself once I get my hands on one.

Enjoy!

Updated N800 kernel for 4.2007.38

As my regular readers will be aware, Nokia released a bug fix kernel for the N800 last week that fixes a data corruption bug in the SD/MMC subsystem. They just released the source code for this new kernel build, so I’ve been able to take a look at what’s in it – and despite the official description, there’s actually a lot of new SD/MMC backports in it. The most notable inclusions are two patches that I had in my previous custom kernel – one that adds MMCplus 4bit bus support and another that adds formalised support for high speed modes. This infrastructure patch is not terribly profound when you read the code, but it has the interesting side effect of doing a few more sanity checks which have the effect of introducing delays into the card initialisation sequence that accidentally help some flaky MMC cards to work reliably.

That leaves my patch set down to just two patches – one of which just adds some debug output, so it doesn’t really count. The one remaining patch is the one that enables 48MHz highspeed support. As I’ve mentioned before, the 48MHz mode is not supported by Nokia because they’ve observed problems with it and TI aren’t confident that it really works. So, this patch will never be accepted by Nokia, and I don’t blame them. Nevertheless, it works for me and many other people, so I’ll continue to offer patched kernels here.

Enjoy!

New N800 update with fix for MMC/SD corruption bug

Nokia have just released a new update of the N800 firmware with a fix for a MMC/SD corruption bug. This was discussed quite a bit in the comments to my last N800 post, so I know a lot of people are glad to see it sorted out. As soon as the new kernel source is released, I’ll check it out to see if any of the extra patches from my kernel have been incorporated. It’s definite that the 48MHz bus speed will not be in – Nokia have observed problems with it and TI (the chip manufacturer) don’t speak highly of it either. I’ll continue to offer it as it works fine or me and for others.

Open source VMware guest tools

I haven’t made a work related post in quite some time, but I’ve got a good reason now.

Yesterday, we announced that we’re open-sourcing most parts of our Linux/FreeBSD/Solaris guest tools. You can see the site with details of what’s present (including kernel modules) here.

I think this is genuinely a big deal – it opens the door to integrating the tools into distros so that a newly created vm starts up with all the tools in place and updates to them come through the standard distro mechanisms. I also hope we see them ported to other operating systems. If you wished your favourite boutique OS had full guest support, now it can.

Use MMC cards with Ricoh R5C832 controllers!

Update: You do not need to use the setpci instructions in this article if your kernel is 2.6.25 or newer

The Ricoh R5C832 is a multi-function chip that provides Firewire and four types of memory card support (SD/MMC/Memory Stick/xD). It appears in many laptops including the Dell XPS m1330 that I recently bought for myself. It works great for SD cards, but due to the hardware design, with a separate dedicated MMC controller, it has been impossible, up until now, to use MMC cards on linux. This is because we don’t have specs for the MMC controller, and instead have written a driver for the SD controller (the SDHCI driver) that can additionally handle MMC cards. But for this to work, the SD controller has to be able to see the MMC cards. Unfortunately, the R5C832 detects MMC cards in hardware and directs them to the MMC controller – so the SD controller never sees them!

I strongly suspected that there was a way to disable the MMC controller, because some laptops, for various reasons, come with only the SD controller enabled (I believe the recent Thinkpads are configured this way) and these ones can handle MMC cards through the SD controller just fine. But there is a lack of useful documentation for the chip, so we had no way to know how to do this disabling. Fortunately, Dell were able to come to the rescue on this one – thanks to the efforts of Matt Domsch and Rezwanul Kabir, we know how to do it! You have to write to specific PCI config space register on the Firewire function of the controller. On my laptop, this is device ’03:01.0′ but it might not be on yours – so check your lspci output.

So, I type:

  • /sbin/setpci -s ’03:01.0′ 0xCA=0×57 (Write Enable)
  • /sbin/setpci -s ’03:01.0′ 0xCB=0×02 (MMC Disable)
  • /sbin/setpci -s ’03:01.0′ 0xCA=0×00 (Write Disable)

For now, you’ll want to put these in a startup script, but I’m looking at ways to get this into the kernel in an automatic way. Pierre doesn’t want to use a quirk, so we need to be creative. He suggested a dummy driver for the MMC controller that just disables it. Heh.

S3 is a cruel mistress

Well, I suppose I have no one to blame up myself. You may recall my triumphant declaration that S3 suspend was working on my desktop machine without any quirks. Naturally, that couldn’t last. Yesterday, something happened to the machine such that it will no longer resume from S3 – and it seems to be a very low level problem – I can’t resume successfully in windows anymore, either. I tried using a custom stripped down kernel but to no avail – I get identical symptoms in all cases. When I power it back on, basiclaly nothing happens. The drives power up and the disk activity light comes on solid for a while and then goes out – nothing else happens. Looking at the kernel logs, it seems control is never returned to the OS – and that would explain the failure on windows too.

I tried out S1 and I’ve confirmed that that still works, but something has broken S3 and I can’t for the life of me say what it is. I even wiped the BIOS configuration and recreated it, wondering if something bad had ended up in the nvram – but I’m not seeing any changes.

If anyone out there has any suggestions, I’m eager to hear them – but I’m feeling very pessimistic right now.