MobiNav

All Things Mobility

janvier 29th, 2007

Intel Embeded Graphics Drivers and Video Bios v6.1 User’s Guide

This manual provides information on both firmware and software, providing hardware design considerations, installation requirements, and static configuration options.

It is targeted at all platform and system developers who need to interface with the graphics subsystem. This includes, but is not limited to: platform designers, system BIOS developpers, system integrators, original equipment manufacturers, system control applications developpers, as well as end users.

janvier 22nd, 2007

Windows Mobile and Windows Embedded CE – what’s the difference ?

[source : Mike Hall's blog]

 

A very common question that perhaps needs some explanation is the difference between Windows Mobile 5.0 and Windows Embedded CE 6.0 – so here’s the explanation.

Windows Embedded CE is a hard real-time, componentized operating system that can be used by developers to build a wide range of embedded devices – you can think of the operating system as a box of Lego blocks, with CE 6.0 there are approximately 700 components (or Lego blocks) that make up the operating system, a developer gets to pick and choose which components or technologies they put into their embedded operating system design – the operating system could be built as a kernel only image which would boot with a ~300kb operating system image, the developer can also choose to include a web server, web browser, media player, networking, .NET Compact Framework, or a host of other operating system technologies, each of which will of course increase the size of the operating system image. Devices can be based on a range of processor architectures (ARM, MIPS, x86 or SH4) and can be headless or expose some form of user interface. The choice of operating system features also determines the application development APIs that are exposed from the device – this means that each CE based embedded device could expose a completely different set of components/technologies and therefore APIs to an application developer (and in many cases devices are closed, so there isn’t a 3rd party developer story).

Windows CE gets released to two sets of customers, the general embedded developer (who builds cow milking machines, sewing machines, industrial robots, set top boxes, and a range of other cool devices) and « Microsoft internal » customers (Windows Automotive, Windows Mobile, others).

The Windows Mobile team choose their own specific set of Lego blocks (operating system components), add their custom shell, applications (like Office Mobile), and device specific technologies (like the connection manager for example) – the result is a uniform set of operating system technologies, applications, shell and APIs that are consistent across all Windows Mobile devices – this means that an application written for one Windows Mobile smartphone (or Pocket PC) should run across all Windows Mobile devices (just check out the list of Windows Mobile applications available on Handango). Windows Mobile OEMs don’t have the ability to customize the underlying operating system/technologies because that would modify the exposed APIs on the platform, but do have the ability to add their own specific applications/services to the Windows Mobile device image (today screen plug-ins, applications like VoIP, games, or others) – this also means that it’s not easy to put Windows Mobile devices into « kiosk mode ».

You are probably wondering why I said that application « should » run across all Windows Mobile devices – while it’s true that the underlying operating system technologies and APIs are consistent across Windows Mobile devices there are also some differences that application developers may not take into account, for example screen resolution or orientation.

  Windows Embedded CE  Windows Mobile
Processors ARM, MIPS, x86, SH4 ARM
Componentized Yes No
Headless Yes No
Consistent API No Yes
Licensed By Distributors Microsoft

So, what else… There is a major difference in the underlying operating system architecture for Windows Mobile 5.0 and Windows Embedded CE 6.0 – Windows Mobile 5.0 is based on the CE 5.0 kernel/architecture – the memory architecture for CE 1.0 through CE 5.0 limits the operating system to running a maximum of 32 processes and each process runs in a 32MB virtual address space – the CE 6.0 release now allows for up to 32,768 processes running at one time, and each process gets a 2GB Virtual Address space to run in. Note tha 32,768 processes is a theoretical limit, the kernel has a 64k handle store, each process starts with at least two handles, so 64k handles divided by two handles equals 32k (32,768) processes – of course a typical application would use more than two handles so the actual number of supported processes is less then 32k, but certainly could be in the hundreds/thousands (can you think of an embedded solution that needs hundreds of processes running?).

- Mike

janvier 20th, 2007

Holux GPSmile52

Specification 

20 parallel channels.
Built-in patch antenna.
Companion CD: Adobe Acrobat Reader® for Pocket PC – PDF file viewer﹜NAV-52 Handheld Manual.
Processor: Centrality Atlas Processor at 200 MHz.
Operating System: Microsoft Windows CE. Net 4.2 Core Version.
Memory: 32 MB NAND flash memory and 64MB SDRAM memory for operating system and embedded applications.
Weight: < 180 g
Size: 95.5(L)x77(W)x22(H) mm
Car Holder / Charger:
    Input voltage: 11V. ~ 28V.
    Output voltage: 5.5V. +/- 0.3V.
Battery:Rechargeable 2600 mAh. Polymer Li-ion 
        Battery life: 8 ~ 10 hrs.
Extension Slot:SD card slot, over 1 GB.
Display:
    3.5" high-brightness & contrast ratio transflective TFT LCD (16.7 M colors) with touch screen.
    240 x 320 resolution.
LED: Red/Green LED for battery charging status.
Audio:Built-in speaker.
Software volume control.
Operation Temperature: -10 0C ~ 40 0C
Storage Temperature: -20 0C ~ 70 0C
Mini-USB Connector: USB client; DC power in

 

janvier 18th, 2007

MIO C520

MIO has just showed his C520 on the Consumer Electronics Show in Las  Vegas.

C520 has a large 4.3 inch touch screen. This screen is ideal for displaying the Raster Map.

janvier 6th, 2007

Windows CE 6

look here

janvier 6th, 2007

Finding Windows CE bugs with help from « Dr. Watson »

look here

janvier 4th, 2007

What’s new for developers in Windows Mobile 5.0

look here

janvier 4th, 2007

What is Virtual Memory

[source : here

This is really a generic topic, not something specific to Windows CE, but I’ve had to explain it to a few people so I thought it would be worth writing up.  If you had asked me what virtual memory was several years ago, I’d have given you some hand-wave explanation about making it appear as if your computer has much more RAM than it actually does.  Which is only sort of correct and fairly imprecise.  Sometimes people will get stuck on the idea of writing data to the file system, which is not quite correct either.

First, a thought experiment about a system with no virtual memory.  Suppose you have an EXE running, it has loaded a couple of DLLs, has one thread and some heap.  The physical memory might be portioned out between them like the picture on the left.

The EXE and DLLs consume an equal amount of RAM to the size of the files on the file system (Actually, probably larger because executables are mapped into RAM less compactly than they’re stored on disk, but executable loading is a story for another day.)  The EXE / DLL code is copied from the file system into RAM, and will stay there until the executables are unloaded.

The heap could be implemented to grow on demand into the unused area.  More likely, the heap would be implemented as a large fixed size block of RAM, and if the heap must grow, a new equal sized block of RAM would be allocated.  Smaller allocations would be made out of the inside of these large blocks.  This type of strategy would cut down on RAM fragmentation.

The thread stack size is fixed; by definition a thread stack must consume contiguous memory addresses, because the code refers to data on the stack by using offsets from the current frame pointer.  It is not possible to chain new blocks onto the stack because the already compiled code would incorrectly refer to the wrong addresses.

The main problem with a system like this is that you must fight endless battles between fragmentation and RAM consumption.  If the program in this picture was to unload DLL 2 and load a new DLL that was slightly larger than DLL 2, it would have to load the new DLL in the unused area, leaving a large gap where DLL 2 used to run.  Similarly, heap fragmentation can result in fragmentation of device RAM.  Yet if you were to speculatively decide to allocate a large heap block to avoid fragmentation, and if the application did not use so much heap space after all, you’d end up wasting RAM on a large unused heap block.

Additionally, such a system consumes a lot of RAM for little benefit.  For example, most EXEs and DLLs include setup code that runs when the executable is first loaded.  Once that setup code has run once, it will never run again.  Yet this system is still consuming RAM to hold that code.

Even today, some very simple systems operate without virtual memory.  But most use virtual memory to lessen the fragmentation problem.  Imagine if you could take the single chunk of RAM on the computer and break it into pieces, with unused space in between which you could choose to use up later.  That’s a virtual memory system.  You could portion your RAM out as needed into a larger address “space.”

Virtual memory is a mapping from the addresses that running programs are using (virtual addresses) to the addresses of physical RAM (physical addresses).  They almost never have any correspondence to each other; memory at a particular virtual address could come from a completely different physical address.

Virtual memory is allocated in increments of “pages” – all of the bits inside one page of virtual memory are together in the same page of physical memory.  (On all of today’s Windows CE devices, a page is 4KB.)  If two pages are next to each other in virtual memory – if their addresses are contiguous, such as 4KB page 0×00001000 and page 0×00002000 are next to each other – they are probably not next to each other in actual RAM.  If you added a new page to the heap and one to the thread stack, and then went back to add a second new page to the heap, the two heap pages would have virtual addresses next to each other but they would not be next to each other in physical RAM.

Virtual memory is implemented by using “page tables,” which list, for every virtual address, what physical page corresponds to that address and some properties of the virtual page.  Think of the page table as a big array, with one entry for each page of virtual memory.  When a running program touches a memory address, the CPU looks into the page tables to find out what physical page is being touched.  If there is no physical page there, the CPU raises an exception.  The page tables also contain properties like whether the page is read-only or read/write.  If an application tries to write to a read-only page, the CPU will raise an exception.

Note the directional nature of my definition of virtual memory: it is a mapping from VIRTUAL addresses to PHYSICAL addresses.  Not the other way around.  In Windows CE at least, it is almost impossible to ask, “For a given physical page, where is that page stored in virtual memory?”  First off, there isn’t a one-to-one mapping; the physical page may be in virtual memory more than once, or may not be in virtual memory at all.  For example if two processes load the same DLL, we won’t copy the DLL code into memory twice.  We’ll copy it once and map two different virtual addresses to the same physical memory.  Also, we just don’t keep track of physical pages that way.  The Windows CE kernel doesn’t have a big table of information about each page of physical memory.  It does have a list of free physical pages that aren’t being used for anything.  Beyond that, the page mappings are tracked only in the page tables.  The kernel does keep a reference count per page, so that it knows when the last page table reference to the page is removed.

32-bit addresses give you a 4GB address space (2^32 = 4GB), and Windows CE is a 32-bit operating system, so Windows CE has 4GB of address space.  Does that mean you need a 4GB RAM chip in your device?  No!  There will be large areas of virtual address space with no physical memory assigned to them.
You could stop right there and you’d have a system that uses virtual memory.  However most systems today take it a step further, and use the virtual memory system to implement physical memory savings.

Once you have a virtual address space that is different from the physical address space underneath it, you can do more than just leave empty space between allocations.  You can also decide not to keep all of the virtually allocated pages in physical RAM at once.  For example, when the application creates a new thread, you could reserve virtual address space for the thread stack, to satisfy the previously mentioned requirement that it be contiguous, but not assign physical RAM pages to those addresses.  If the executing thread touched a virtual page that had no physical page behind it, the CPU would raise an exception.  The kernel would have to catch that exception, recognize that it was an exception on a stack page, allocate a new physical page for the stack and fix up the page tables to point at the new page.  Then the kernel could say for the thread to continue execution on the same instruction.  This time the thread would find real RAM at that virtual address, and access it successfully.  The exception (a “page fault”) is completely handled by the kernel so the application never knows that the stack memory was not already allocated.

I don’t know how widely used this terminology is – it may just be from Win32 – but virtual addresses are either “committed” (have physical memory assigned to them), “reserved” (assigned to an allocation, like a DLL or stack or heap, but don’t have physical memory assigned to them), or “free.”

Windows CE will “demand commit” pages, meaning that it will usually delay committing them until the last possible moment.  There are also some cases in which Windows CE will take committed pages out of memory again, returning them to “reserved” status:

  • Since DLL and EXE code can easily be re-loaded from the file system, it is often decommitted.
  • Memory-mapped file pages also have well defined files to read from, so those are decommitted as well.
  • Thread stack can shrink; if the system is very low on memory we’ll scavenge the top pages from a stack if the thread is not currently using them.
  • Heaps can shrink; if the system is very low on memory we’ll check whether there are heap pages without data in them that can be decommitted.

However that is where Windows CE stops.  Other operating systems have a “page file” in which they will write other pages that don’t have corresponding files, notably:

  • Stack
  • Heap
  • Allocations from VirtualAlloc()
  • Memory-mapped files that don’t actually have files underneath them (CreateFileMapping with INVALID_HANDLE_VALUE)
  • The writable data of executables (global variables)

Those operating systems have algorithms to decide that these pages have not been used in a while, and will write them to the page file and decommit the RAM.  Windows CE does not have a page file.  We’ll demand-commit to delay committing these pages as long as possible, but once they are committed, the operating system won’t page them out again.

So, as you see, virtual memory in its most minimal definition is just having a mapping between virtual addresses and physical addresses.  To lay out allocations in the address space in an efficient manner and avoid wasting physical memory on unallocated address space.  In more practical terms, we also use the virtual address space to implement paging, avoid wasting physical memory on allocated addresses that are not actively being used.

And finally to get to the most pressing reason I wrote this post.  People have asked, does the fact that Windows CE 6 changes from having 32MB of virtual memory per process to 2GB of virtual memory per process mean that CE 6 devices now require more RAM?  And the answer is, absolutely not.  Our address space just became sparser – there are more free gaps between allocations.

 

janvier 2nd, 2007

4G mobile technologies

4G mobile technologies include WiMax, EV-DO (Evolution-Data Optimized) Revision C, and the LTE (Long-Term Evolution) generations of UMTS.

|