Structures added for MasterBootRecord support
This commit is contained in:
parent
bd5d3f5d49
commit
9173b90eb1
11
src/kernel/PartitionTable/MBR/MasterBootRecord.h
Normal file
11
src/kernel/PartitionTable/MBR/MasterBootRecord.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include "PartitionTableEntry.h"
|
||||
|
||||
struct MBR {
|
||||
uint8_t code [440];
|
||||
uint32_t uniqueID;
|
||||
uint16_t Reserved;
|
||||
PartitionTableEntry TableEntries[4];
|
||||
uint16_t ValidBootsector;
|
||||
}__attribute__((packed));
|
11
src/kernel/PartitionTable/MBR/PartitionTableEntry.h
Normal file
11
src/kernel/PartitionTable/MBR/PartitionTableEntry.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
struct PartitionTableEntry{
|
||||
uint8_t driveAttribute;
|
||||
uint8_t CHS_start_address [3];
|
||||
uint8_t PartitionType;
|
||||
uint8_t CHS_lastSector_Address[3];
|
||||
uint32_t LBA_partition_start;
|
||||
uint32_t Number_sectors_inPartition;
|
||||
}__attribute__((packed));
|
Loading…
Reference in New Issue
Block a user