关于Palette

Dec 10th, 2008 Posted in ARM | No Comments »

最近做WinCE下的显示驱动,不得不了解一下以前懒得去抠的东西。

看看这篇文章Palettes in WindowsUsing DIBs with Palettes,就明白了。

显示设备有支持调色板的(8bpp以下,包括8bpp),有不支持的(16bpp24bpp等)。支持调色板的设备接收颜色索引值,不支持调色板的直接接受RGB值。其中支持调色板的设备支持的调色板可能可以改变,也可能不可以改变。普通VGA的调色板是可以变的,只是只能同时显示256色而已。

对于WinCE中从GPE类继承下来的IsPaletteSetable()和SetPalette(),两个函数的作用还不太清楚。什么时候使用?

SetPalette()貌似是设置硬件调色板。是不是IsPletteSetable()返回假,就不会调用SetPalette()了??

关于分页表

Dec 3rd, 2008 Posted in ARM | No Comments »

Virtual addressing

Say we have a computer architecture with a 32 bit address bus. This means we are able to form addresses from 0×00000000 to 0xffffffff – spanning 4 Gi individual addresses, or 4 GiB when a single address contains 1 Byte. These addresses form what is referred to as the virtual address space. These addresses have no physical meaning – if we only have 16MB of memory, all addresses above 0×01000000 would be invalid. However, as mentioned, almost all programs do not use all 4GB of memory when a program runs, but only parts of it at a time. For example, the text, data, and stack segments may only be used and together only take 1 megabyte in total over the time where it runs.

假如我们有32位地址总线。这意味着我们的寻址空间为4Gi(从0×00000000 到0xffffffff)。这些地址空间叫做“虚拟地址空间”。这些地址是没有物理意义的——如果我们只有16MB的物理内存,所有0×01000000以上的地址是不可用的。然而,几乎没有哪个程序会使用全部的4GB内存。

Read the rest of this entry »

关于MMU

Dec 2nd, 2008 Posted in ARM | 1 Comment »

A memory management unit (MMU), sometimes called paged memory management unit (PMMU), is a computer hardware component responsible for handling accesses to memory requested by the central processing unit (CPU). Its functions include translation of virtual addresses to physical addresses (i.e., virtual memory management), memory protection, cache control, bus arbitration, and, in simpler computer architectures (especially 8-bit systems), bank switching.

内存管理单元,也称作页面内存管理单元,用来处理CPU对内存的访问。功能包括虚拟地址到物理地址的转换,内存保护、缓存控制、总线仲裁和简化计算机结构(特别是8位系统)、块切换。

Read the rest of this entry »

ARM笔记(3)

Nov 28th, 2008 Posted in ARM | No Comments »

S3C2410的DMA

1. S3C2410支持四通道DMA,DMA操作可以由软件、内部外设或者外部引脚发起。

a) 源设备和目标都在系统总线AHB上

b) 源设备和目标都在外围总线APB上

c) 源设备在系统总线,而目标设备位于外围总线

d) 源设备在外围总线,而目标设备位于系统总线

Read the rest of this entry »

NAND Flash Controller In S3C2410X

Nov 26th, 2008 Posted in ARM | No Comments »

S3C2410X支持NAND启动:

  • Auto boot mode
    1. 复位完成后
    2. NAND中的前4KB代码被复制到4KB的内部SRAM中(映射到nGCS0)
    3. CPU开始执行SRAM中的代码。

Read the rest of this entry »

关于存储器

Nov 23rd, 2008 Posted in ARM | No Comments »

RAM (Random-access memory)

随机存储器,分为Static random access memory (SRAM)静态随机存储器和Dynamic random access memory (DRAM),前者不用周期刷新,后者需要动态刷新,两者都断电易失存储器。前者的存取速度快,但造价高,密度也比后者低,所以一般不用于大容量的存储设备,多用作CPU的缓存而不用于主存。注意有一种synchronous DRAM,叫SDRAM,同步刷新。

Read the rest of this entry »

ARM笔记(2)

Nov 23rd, 2008 Posted in ARM | No Comments »

关于ARM的指令系统

Read the rest of this entry »

ARM笔记(1)

Nov 22nd, 2008 Posted in ARM | No Comments »

因为针对的硬件是S3C2410,所以主要是看SAMSUNG的手册。

Read the rest of this entry »