void device_init(void) { int i; for (i = 1; i <= MAX_SWAPS; i++) swapmap_init(i); }
void device_init(void) { int i; zrtc_init(); /* Add 64 swaps (4MB) to use the entire J drive */ for (i = 0; i < MAX_SWAPS; i++) swapmap_init(i); sock_init(); }
void device_init(void) { int i; /* Time of day clock */ inittod(); /* Figure out what disks we have */ diskprobe(); /* Add 64 swaps (2MB) */ for (i = MAX_SWAPS - 1 ; i >= 0; i--) swapmap_init(i); }
/* * This function is called for partitioned devices if a partition is found * and marked as swap type. The first one found will be used as swap. We * only support one swap device. */ void platform_swap_found(uint8_t letter, uint8_t m) { blkdev_t *blk = blk_op.blkdev; uint16_t n; if (swap_dev != 0xFFFF) return; letter -= 'a'; kputs("(swap) "); swap_dev = letter << 4 | m; n = blk->lba_count[m - 1] / SWAP_SIZE; if (n > MAX_SWAPS) n = MAX_SWAPS; while(n) swapmap_init(n--); }
/* 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); }
/* * This function is called for partitioned devices if a partition is found * and marked as swap type. The first one found will be used as swap. We * only support one swap device. */ void platform_swap_found(uint_fast8_t letter, uint_fast8_t m) { blkdev_t *blk = blk_op.blkdev; uint16_t n; if (swap_dev != 0xFFFF) return; letter -= 'a'; kputs("(swap) "); swap_dev = letter << 4 | m; if (blk->lba_count[m - 1] > 0xFFFF) n = 0xFFFF; else n = (uint16_t)blk->lba_count[m-1]; n /= SWAP_SIZE; if (n > MAX_SWAPS) n = MAX_SWAPS; #ifdef SWAPDEV while (n) swapmap_init(n--); #endif }