/* add non-autoconfiguring memory to the system */ void memory_add(void) { if (!memory_check_added(ADDMEM_0_BASE)) AddMemList(1*1024*1024, MEMF_FAST, ADDMEM_PRI, ADDMEM_0_BASE, NULL); if (!memory_check_added(ADDMEM_1_BASE)) AddMemList(512*1024, MEMF_FAST, ADDMEM_PRI, ADDMEM_1_BASE, NULL); }
/* * Detect the rest of the memory available on this device. */ void detect_memory_rest(struct ExecBase * SysBase) { int c = 0; *(ULONG *)(2*4) = (ULONG)dm_bus_error_handler; *(ULONG *)(3*4) = (ULONG)dm_addr_error_handler; while (0 != memory[c].start) { UBYTE * end; /* * Now try to detect sram size */ end = check_memory(memory[c].start); if (end != memory->start[c] && NULL != end) { AddMemList((ULONG)end-(ULONG)memory[c].start, MEMF_CHIP | MEMF_PUBLIC | MEMF_LOCAL | MEMF_24BITDMA | MEMF_KICK, memory[c].pri, memory[c].start, "fast memory"); } c++; } }