void pagemap_init(void) { int i; /* RC2014 512/512K has RAM in the top 512 KiB of physical memory * corresponding pages are 32-63 (page size is 16 KiB) * Pages 32-34 are used by the kernel * Page 35 is the common area for init * Page 36 is the disk cache * Pages 37 amd 38 are the second kernel bank */ for (i = 32 + 7; i < 64; i++) pagemap_add(i); /* finally add the common area */ pagemap_add(32 + 3); ds1302_init(); if (acia_present) kputs("6850 ACIA detected at 0x80.\n"); if (sio_present) kputs("Z80 SIO detected at 0x80.\n"); if (sio1_present) kputs("Z80 SIO detected at 0x84.\n"); if (ctc_present) kputs("Z80 CTC detected at 0x88.\n"); if (ds1302_present) kputs("DS1302 detected at 0xC0.\n"); }
void pagemap_init(void) { int i = msxmaps - 1; /* Add all the RAM, except 0,1,2,3 which is the kernel data/bss, add 0 last to become the common for init */ while (i > 4) pagemap_add(i--); /* Init will pick this up correctly as its common */ pagemap_add(4); }
void pagemap_init(void) { int i; /* We have 64 8k pages for a CoCo3 so insert every other one * into the kernel allocator map. */ for (i = 10; i < 64; i+=2) pagemap_add(i); /* add common page last so init gets it */ pagemap_add(6); }
void pagemap_init(void) { int i; /* 0/1/2 kernel, 3 initial common, 4+ to use */ for (i = 4; i < 128 ; i++) pagemap_add(i); /* * The kernel boots with 3 as the common, list it last here so it also * gets given to init as the kernel kicks off the init stub. init will then * exec preserving this common and all forks will be copies from it. */ pagemap_add(3); }
/* Add pagemap codes depending upon the present banks */ void pagemap_init(void) { /* We didn't find any extra page mode memory */ if (bankmap < (2 << 8)) panic("no pagemode"); /* Add the present banks (may be non contiguous). The first bank is the kernel and not available */ if (bankmap & 2) pagemap_add(0x22); if (bankmap & 4) pagemap_add(0x44); if (bankmap & 8) pagemap_add(0x88); }
void pagemap_init(void) { int i; /* 0/1/2 image, 3/4/5 kernel 6-19 apps */ /* Don't add page 6 yet - it's the initial common at boot */ for (i = 0x80 + 7; i < 0x80 + 20; i++) pagemap_add(i); /* * The kernel boots with 0x86 as the common, list it last here so it also * gets given to init as the kernel kicks off the init stub. init will then * exec preserving this common and all forks will be copies from it. */ pagemap_add(0x86); }
void pagemap_init(void) { uint8_t n = procmem / 32; uint8_t *p = map_translate; uint8_t nv = 0xFF; uint8_t ct; uint8_t i; if (!sidecar && carttype != 2) panic("No suitable memory extension"); n /= 32; /* Handle sidecar memory */ if (sidecar) { nv = n - 4; /* Number of non sidecar blocks (including in RAM) */ ct = 0x83; /* 0x80-0x83 are sidecar maps */ } else ct = n; /* 1..n are cartridge (1 = in memory) */ for (i = n; i > 0; i--) { if (i == nv) ct = nv; *p++ = ct--; pagemap_add(i); } map_live = p - 1; /* We add RAM last */ }
void pagemap_init(void) { int i; /* ZETA SBC V2 has RAM in the top 512 KiB of physical memory * corresponding pages are 32-63 (page size is 16 KiB) * Pages 32-34 are used by the kernel * Page 35 is the common area * Pages starting from DEV_RD_START are used by RAM disk */ for (i = 32 + 4; i < DEV_RD_START; i++) pagemap_add(i); /* finally add the common area */ pagemap_add(32 + 3); }
/* Map handling: We have flexible paging. Each map table consists of a set of pages with the last page repeated to fill any holes. */ DISC void pagemap_init(void) { int i; int max = scanmem(); /* We have 64 8k pages for a CoCo3 so insert every other one * into the kernel allocator map. */ for (i = 12; i < max ; i+=2) pagemap_add(i); /* add common page last so init gets it */ pagemap_add(6); /* initialize swap pages */ for (i = 0; i<MAX_SWAPS; i++) swapmap_init(i); }
void pagemap_init(void) { /* The high bits do nothing but it's a cheap way to avoid 0x00 */ pagemap_add(0x12); pagemap_add(0x10); ds1302_init(); if (sio_present) kputs("Z80 SIO detected at 0x80.\n"); if (sio1_present) kputs("Z80 SIO detected at 0x84.\n"); if (ctc_present) kputs("Z80 CTC detected at 0x88.\n"); if (ds1302_present) kputs("DS1302 detected at 0xC0.\n"); }
/* Pages 0/1/2/3 are the kernel 4/5 are display and fonts */ void pagemap_init(void) { uint8_t maxpages; uint8_t i; maxpages = ramsize / 16; for (i = 6; i < maxpages; i += 2) pagemap_add(i); }
void pagemap_init(void) { int i; /* map bank 1 last for init, leave 0 for kernel */ for (i = membanks - 1; i > 0; i--) pagemap_add(i); #ifdef SWAPDEV for (i = 0; i < MAX_SWAPS; i++) swapmap_add(i); #endif }
void pagemap_init(void) { /* Really 8K banks 0,1,2,... but we pair them up so we have */ /* 8 x 16 banks numbered 0,2,4,.... , 0 is the kernel, init starts in 2 */ pagemap_add(14); pagemap_add(12); pagemap_add(10); pagemap_add(8); pagemap_add(6); pagemap_add(4); pagemap_add(2); }
void pagemap_init(void) { uint_fast8_t i; uint_fast8_t m = 2; for (i = 1; i < 8; i++) { if (probe_bank(m) == 0) { pagemap_add(m); ramsize += 48; procmem += 48; } m <<= 1; } if (procmem < 96) panic("insufficient memory"); }
void pagemap_init(void) { int i; for (i = 1; i < 8; i++) pagemap_add(i); }
void pagemap_init(void) { /* This is model dependent */ pagemap_add(PAGE_MAP(2)); pagemap_add(PAGE_MAP(3)); #if defined(CONFIG_UB256) || defined(CONFIG_UB512) pagemap_add(PAGE_MAP(0) | 0x40); pagemap_add(PAGE_MAP(1) | 0x40); pagemap_add(PAGE_MAP(2) | 0x40); pagemap_add(PAGE_MAP(3) | 0x40); #endif #if defined(CONFIG_UB256TC) || defined(CONFIG_UB512) pagemap_add(PAGE_MAP(0) | 0x80); pagemap_add(PAGE_MAP(1) | 0x80); pagemap_add(PAGE_MAP(2) | 0x80); pagemap_add(PAGE_MAP(3) | 0x80); #endif #if defined(CONFIG_UB512) pagemap_add(PAGE_MAP(0) | 0xC0); pagemap_add(PAGE_MAP(1) | 0xC0); pagemap_add(PAGE_MAP(2) | 0xC0); pagemap_add(PAGE_MAP(3) | 0xC0); #endif /* and if we ever poke at the 1024 stuff its bit 7-5/1-0 */ }
void pagemap_init(void) { int i; for (i = 1; i < 7; i++) pagemap_add(1 << i); }
/* * Add all the available pages to the list of pages we an use. If this * is runtime dynamic check to make sure you don't add more than MAX_MAPS * of them. On some machines with a lot of RAM the implementation turns * the excess into a RAM disc * * The mapping can be logical numbers 1-n, or can be physical values to * write into registers. Whatever works best. The 0 value is however * reserved throughout to indicate kernel mode in calls, and also * to mean swapped out for processes. If your bank 0 is user space you * might need to just dec/inc before using it in an I/O port or similar * to avoid confusion. * * Kernel in bank 0, user in banks 1-14, high 32K is bank 15 */ void pagemap_init(void) { uint8_t i; for (i = 1; i < 15; i++) pagemap_add(i); }