目前在做一个SRAM驱动,写成的是流驱动,驱动写好了!
但是在做MMU地址映射表时出问题了!具体如下:
原来的g_oalAddressTable[DATA] 表为
g_oalAddressTable
DCD 0x80000000, 0x50000000, 128 ; 128 MB DRAM
DCD 0x90000000, 0x70000000, 4 ; SROM SFR
DCD 0x90400000, 0x71000000, 4 ; TZIC0
DCD 0x90800000, 0x72000000, 1 ; FIMG-3DSE SFR
DCD 0x90A00000, 0x74000000, 2 ; Indirect Host I/F
DCD 0x90C00000, 0x74300000, 2 ; USB Host
DCD 0x90E00000, 0x75000000, 2 ; DMA0
DCD 0x91000000, 0x76100000, 3 ; 2D Graphics
DCD 0x91300000, 0x77000000, 3 ; Post Processor
DCD 0x91600000, 0x78000000, 1 ; Camera I/F
DCD 0x91700000, 0x78800000, 1 ; JPEG
DCD 0x91800000, 0x7C000000, 5 ; USB OTG LINK
DCD 0x91D00000, 0x7D000000, 13 ; D&I(Security Subsystem Config) SFR
DCD 0x92A00000, 0x7E000000, 1 ; DMC, MFC, WDT, RTC, HSI TX/RX, Keypad, ADC, SYSCON
DCD 0x92B00000, 0x7F000000, 1 ; TZPC, AC97, I2S, I2C, UART, PWM, IrDA, GPIO, PCM, SPI
DCD 0x93000000, 0x00000000, 16 ; 32 MB SROM(SRAM/ROM) BANK 0
; nCS1~nCS5, nCS0
DCD 0x94000000, 0x18000000, 32 ; 32 MB SROM(SRAM/ROM) BANK 1 = DM9000A
;DCD 0x96000000, 0x20000000, 32 ; 32 MB SROM(SRAM/ROM) BANK 2
DCD 0x00000000, 0x00000000, 0 ; end of table
我只是把BANK2加上了如下:
g_oalAddressTable
DCD 0x80000000, 0x50000000, 128 ; 128 MB DRAM
DCD 0x90000000, 0x70000000, 4 ; SROM SFR
DCD 0x90400000, 0x71000000, 4 ; TZIC0
DCD 0x90800000, 0x72000000, 1 ; FIMG-3DSE SFR
DCD 0x90A00000, 0x74000000, 2 ; Indirect Host I/F
DCD 0x90C00000, 0x74300000, 2 ; USB Host
DCD 0x90E00000, 0x75000000, 2 ; DMA0
DCD 0x91000000, 0x76100000, 3 ; 2D Graphics
DCD 0x91300000, 0x77000000, 3 ; Post Processor
DCD 0x91600000, 0x78000000, 1 ; Camera I/F
DCD 0x91700000, 0x78800000, 1 ; JPEG
DCD 0x91800000, 0x7C000000, 5 ; USB OTG LINK
DCD 0x91D00000, 0x7D000000, 13 ; D&I(Security Subsystem Config) SFR
DCD 0x92A00000, 0x7E000000, 1 ; DMC, MFC, WDT, RTC, HSI TX/RX, Keypad, ADC, SYSCON
DCD 0x92B00000, 0x7F000000, 1 ; TZPC, AC97, I2S, I2C, UART, PWM, IrDA, GPIO, PCM, SPI
DCD 0x93000000, 0x00000000, 16 ; 32 MB SROM(SRAM/ROM) BANK 0
; nCS1~nCS5, nCS0
DCD 0x94000000, 0x18000000, 32 ; 32 MB SROM(SRAM/ROM) BANK 1 = DM9000A
DCD 0x96000000, 0x20000000, 32 ; 32 MB SROM(SRAM/ROM) BANK 2
DCD 0x00000000, 0x00000000, 0 ; end of table
编译内核:
出现问题了!在
BUILD: [01:0000000120:ERRORE] D:\WINCE600\PLATFORM\SMDK6410\SRC\OAL\OALLIB\startup.s(555) : error A0092: no immediate rotate operand can be created: -1068
这里好象说找不到这个表了,这个startup.s的内容为:
add r0, pc, #g_oalAddressTable - (. + 8)
如果把这个表改小了,也就是说把BANK1也去掉也会出错!
不知在哪里是否被定义了g_oalAddressTable这个表的大小,请高手指点。