OEMAddressTable
;;;-------------------------------------------------------------
;;; Virt Addr Phys Addr MB
;;;-------------------------------------------------------------
DCD 0x80000000, 0x02000000, 30 ; 30 MB SRAM(SRAM/ROM) BANK 0
DCD 0x82000000, 0x08000000, 32 ; 32 MB SROM(SRAM/ROM) BANK 1
DCD 0x84000000, 0x10000000, 32 ; 32 MB SROM(SRAM/ROM) BANK 2
DCD 0x86000000, 0x18000000, 32 ; 32 MB SROM(SRAM/ROM) BANK 3
DCD 0x88000000, 0x20000000, 32 ; 32 MB SROM(SRAM/ROM) BANK 4
DCD 0x8A000000, 0x28000000, 32 ; 32 MB SROM(SRAM/ROM) BANK 5
DCD 0x8C000000, 0x30000000, 64 ; 64 MB DRAM BANK 0, 1
config.bib
NK 8C200000 01D00000 RAMIMAGE
RAM 8E000000 01F00000 RAM
; Common RAM areas
AUD_DMA 8c002000 00002000 RESERVED
DRV_GLB 8c010000 00010000 RESERVED
DBGSER_DMA 8c022000 00002000 RESERVED
SER_DMA 8c024000 00002000 RESERVED
IR_DMA 8c026000 00002000 RESERVED
SD_DMA 8c028000 00008000 RESERVED
DISPLAY 8c032000 001a0000 RESERVED
GLOBALS 8c1D2000 0002E000 RESERVED
请教在驱动里面,如何使用 GLOBALS 作全局变量?
volatile int *P;
P = (volatile int *)VirtualAlloc((PVOID)0x8c1D2000, sizeof(int), MEM_RESERVE, PAGE_READWRITE);
为什么这样总是分配内存失败?
要在两个驱动间共享一个全局变量如何实现?