BarinkOS/kernel/storage/ata pio/ATAPIO.h
Nigel 50bf952a49 Basic idea's are created for the storage solution
- Added boot device info parsing to the kernel
- Added a pointer in the kernel to our pre-kernel BootInfo structure
- Created a layout for the FAT driver
- Created a layout for the virtual filesystem
- Separated IDE driver from the basic atapio driver.
	This will ensure we are not using one or the other
- The create_harddrive shell script will now actually build a harddrive image of
	the kernel
- The virtual filesystem initializes and creates a filesystem structure
	for every FAT16 partition in the master boot record
2023-02-21 21:43:14 +01:00

37 lines
703 B
C++

#pragma once
#include <stdint-gcc.h>
#include "../ide/ideCommands.h"
#include "../ide/sampleIDE.definitions.h"
#include "../../devices/BlockDevice.h"
#include "../../terminal/kterm.h"
/*
* This first driver wil make use of IO ports.
* Doing so means reading or writing from disk is going
* to be very cpu intensive.
*/
enum DEVICE_DRIVE{
MASTER = 0xA0,
SLAVE = 0xB0
};
enum ATAPIO_PORT {
Primary = 0x1f0,
Secondary = 0x170
};
class ATAPIO
{
public:
static bool Identify(ATAPIO_PORT, DEVICE_DRIVE);
static void Read (uint16_t, DEVICE_DRIVE, uint32_t, uint16_t*);
static void Write(uint16_t, DEVICE_DRIVE);
static void Soft_Reset(ATAPIO_PORT , DEVICE_DRIVE );
};