Beispiel #1
0
static void
disk0_read_blks_nolock(uint32_t blkno, uint32_t nblks) {
    int ret;
    uint32_t sectno = blkno * DISK0_BLK_NSECT, nsecs = nblks * DISK0_BLK_NSECT;
    if ((ret = ide_read_secs(DISK0_DEV_NO, sectno, disk0_buffer, nsecs)) != 0) {
        panic("disk0: read blkno = %d (sectno = %d), nblks = %d (nsecs = %d): 0x%08x.\n",
                blkno, sectno, nblks, nsecs, ret);
    }
}
Beispiel #2
0
DRESULT disk_read (BYTE drive, BYTE* buffer, DWORD sectorNumber, BYTE sectorCount){
	//FAT_PRINTF("[FATFS], disk_read on drive%d\n", drive);
	//from dev_diso0.c read_blks
	int ret;
//  kprintf("disk_read ## %d\n", drive);
	if ((ret = ide_read_secs(MMC0_DEV_NO, sectorNumber, buffer, sectorCount)) != 0) {
        panic("fat: read blkno = %d (sectno = %d), nblks = %d (nsecs = %d): 0x%08x.\n",
			  -1, sectorNumber, 0, sectorCount, ret);
    }
	return 0;
}
Beispiel #3
0
int
swapfs_read(swap_entry_t entry, struct Page *page) {
    return ide_read_secs(SWAP_DEV_NO, swap_offset(entry) * PAGE_NSECT, page2kva(page), PAGE_NSECT);
}