Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
CTCaer
GitHub Repository: CTCaer/hekate
Path: blob/master/bdk/storage/ramdisk.h
1476 views
1
/*
2
* Ramdisk driver for Tegra X1
3
*
4
* Copyright (c) 2019-2021 CTCaer
5
*
6
* This program is free software; you can redistribute it and/or modify it
7
* under the terms and conditions of the GNU General Public License,
8
* version 2, as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
* more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef RAM_DISK_H
20
#define RAM_DISK_H
21
22
#include <utils/types.h>
23
24
#define RAMDISK_CLUSTER_SZ 32768
25
26
int ram_disk_init(void *ram_fs, u32 ramdisk_size);
27
int ram_disk_read(u32 sector, u32 sector_count, void *buf);
28
int ram_disk_write(u32 sector, u32 sector_count, const void *buf);
29
30
#endif
31