Re: [PATCH 1/2] OLPC: Add support for calling into Open Firmware

From: Mitch Bradley
Date: Mon Apr 21 2008 - 04:04:24 EST




Yinghai Lu wrote:
...

geode is using SMI to simulate the pci conf space, wonder that could be problem.

On the current OLPC system, we don't use the SMI-based PCI config space simulator. The code for that "VSA" module is only partially open sourced (some of it is open, and some of it is just not available). The parts of it for which we do have source can only be compiled with an old proprietary toolchain that is no longer available.

Instead of using the SMI-based simulation, we have added a PCI configuration access method in the kernel that supplies the necessary information from a table. The code for that hardware-specific access method is roughly 40 lines of code plus a few data tables.

In the past few weeks, I have developed a rather complete Open Firmware-based reimplementation of the SMI PCI config hardware emulator. All-told, it requires over 1000 lines. It remains to be seen whether the complicated version will ultimately be deployed. Personally, I find it distasteful to use a lot of code to make the hardware pretend that it is something other than what it really is, when a much smaller driver works just as well. The SMI-based emulator is quite difficult to understand and maintain, because the Geode SMI handling mechanism is complex, incompletely documented, and suffers from many of the multiple-mode-switches problems as real-mode to protected-mode gateway code.

later you have 64 runtime service for 64 platform like UEFI?

Possibly. 64-bit systems are not a problem per se - there have been 64-bit OFW implementations for 64-bit architectures like SPARC and Alpha dating back to a long time ago. The main issue from my point of view is whether or not there is a customer to motivate the work.
YH

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/