blob: d7b354708742a763e0e6e928c26f2cfa2967e2e1 [file] [log] [blame]
Kevin O'Connorf076a3e2008-02-25 22:25:15 -05001// Definitions for X86 bios disks.
2//
3// Copyright (C) 2008 Kevin O'Connor <kevin@koconnor.net>
4//
5// This file may be distributed under the terms of the GNU GPLv3 license.
6
7#include "ioport.h" // outb
8
9#define DISK_RET_SUCCESS 0x00
10#define DISK_RET_EPARAM 0x01
11#define DISK_RET_ECHANGED 0x06
12#define DISK_RET_EBOUNDARY 0x09
13#define DISK_RET_ECONTROLLER 0x20
14#define DISK_RET_ETIMEOUT 0x80
15#define DISK_RET_EMEDIA 0xC0
16
17static inline void
18eoi_master_pic()
19{
20 outb(PIC1_IRQ5, PORT_PIC1);
21}
22
23static inline void
24eoi_both_pics()
25{
26 outb(PIC2_IRQ13, PORT_PIC2);
27 eoi_master_pic();
28}
29
30// floppy.c
31struct bregs;
32void floppy_13(struct bregs *regs, u8 drive);
33void floppy_tick();