blk = map * SWAP_SIZE;
/* Write the app (and possibly the uarea etc..) to disk */
for (i = 0; i < 4; i++) {
- swapwrite(SWAPDEV, blk, size, base, *pt++);
+ swapwrite(SWAPDEV, blk, size<<9, base, *pt++);
base += 0x4000;
base &= 0xC000; /* Snap to bank alignment */
blk += size;
}
for (i = 0; i < 4; i ++) {
- swapread(SWAPDEV, blk, size, base, *pt++);
+ swapread(SWAPDEV, blk, size<<9, base, *pt++);
base += 0x4000;
base &= 0xC000;
blk += size;
/* Write the app (and possibly the uarea etc..) to disk */
for (i = 0; i < 4; i ++) {
- swapwrite(SWAPDEV, blk, size, base, *pt++);
+ swapwrite(SWAPDEV, blk, size<<9, base, *pt++);
base += 0x4000;
/* Last bank is determined by SWAP SIZE. We do the maths
in 512's (0x60 = 0xC000) */
we don't want to overwrite the live stack but buffer and fix up
in tricks.s */
#ifdef CONFIG_HAS_LOW_PAGE
- swapread(SWAPDEV, blk, 1, 0x0000);
+ swapread(SWAPDEV, blk, 512, 0x0000);
blk++;
#endif
for (i = 0; i < 4; i ++) {
- swapread(SWAPDEV, blk, size, base, *pt++);
+ swapread(SWAPDEV, blk, size<<9, base, *pt++);
base += 0x4000;
/* Last bank is determined by SWAP SIZE. We do the maths
in 512's (0x60 = 0xC000) */