diff options
author | Benji Dial <benji3.141@gmail.com> | 2020-05-24 11:02:43 -0400 |
---|---|---|
committer | Benji Dial <benji3.141@gmail.com> | 2020-05-24 11:02:43 -0400 |
commit | 02f14113cbf14c6f842fb43ecbc68d0c851ef3b0 (patch) | |
tree | 75d2d943d9822b3f945fd947e9b91eec1d68e900 /src/kernel/fat.h | |
parent | 31d8ae388a7ded576abd3e3d99c3d9193ea6d704 (diff) | |
download | portland-os-02f14113cbf14c6f842fb43ecbc68d0c851ef3b0.tar.gz |
very basic vga, ata, serial drivers. start of fat and fs drivers
Diffstat (limited to 'src/kernel/fat.h')
-rw-r--r-- | src/kernel/fat.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/kernel/fat.h b/src/kernel/fat.h index e7aa956..0fbf59f 100644 --- a/src/kernel/fat.h +++ b/src/kernel/fat.h @@ -4,12 +4,12 @@ struct fat_info { uint8_t oem[8]; - uint16_t bytes_per_sector; - uint8_t sectors_per_cluster; + uint16_t bytes_per_sector;//Assumed to be 512 + uint8_t sectors_per_cluster;//Assumed to be 1 uint16_t reserved_sectors; - uint8_t fats; + uint8_t fats;//Assumed to be 1 uint16_t root_entries; - uint16_t sectors; + uint16_t sectors;//Assumed not to be 0 uint8_t media_type; uint16_t sectors_per_fat; uint16_t sectors_per_track; @@ -22,4 +22,11 @@ struct fat_info { uint32_t volume_id; uint8_t label[11]; uint8_t fs_type[8]; -} __attribute__ ((packed));
\ No newline at end of file +} __attribute__ ((packed)); + +#define FAT ((void *)0x00026000) +void load_fat(); +uint16_t get_cluster(uint16_t n); +void set_cluster(uint16_t n, uint16_t v); + +uint16_t get_start_cluster(uint8_t *path);
\ No newline at end of file |