1993-06-12 14:58:17 +00:00
|
|
|
/*
|
|
|
|
* Mach Operating System
|
|
|
|
* Copyright (c) 1992, 1991 Carnegie Mellon University
|
|
|
|
* All Rights Reserved.
|
1995-05-30 08:16:23 +00:00
|
|
|
*
|
1993-06-12 14:58:17 +00:00
|
|
|
* Permission to use, copy, modify and distribute this software and its
|
|
|
|
* documentation is hereby granted, provided that both the copyright
|
|
|
|
* notice and this permission notice appear in all copies of the
|
|
|
|
* software, derivative works or modified versions, and any portions
|
|
|
|
* thereof, and that both notices appear in supporting documentation.
|
1995-05-30 08:16:23 +00:00
|
|
|
*
|
1993-06-12 14:58:17 +00:00
|
|
|
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
|
|
|
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
|
|
|
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
1995-05-30 08:16:23 +00:00
|
|
|
*
|
1993-06-12 14:58:17 +00:00
|
|
|
* Carnegie Mellon requests users of this software to return to
|
1995-05-30 08:16:23 +00:00
|
|
|
*
|
1993-06-12 14:58:17 +00:00
|
|
|
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
|
|
|
* School of Computer Science
|
|
|
|
* Carnegie Mellon University
|
|
|
|
* Pittsburgh PA 15213-3890
|
1995-05-30 08:16:23 +00:00
|
|
|
*
|
1993-06-12 14:58:17 +00:00
|
|
|
* any improvements or extensions that they make and grant Carnegie Mellon
|
|
|
|
* the rights to redistribute these changes.
|
1993-07-13 18:15:32 +00:00
|
|
|
*
|
1993-10-16 19:17:18 +00:00
|
|
|
* from: Mach, Revision 2.2 92/04/04 11:35:03 rpd
|
1995-06-25 14:02:57 +00:00
|
|
|
* $Id: boot.h,v 1.10 1995/05/30 07:58:29 rgrimes Exp $
|
1993-06-12 14:58:17 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/param.h>
|
1994-08-21 17:47:26 +00:00
|
|
|
#include <sys/time.h>
|
|
|
|
#include <ufs/ufs/quota.h>
|
|
|
|
#include <ufs/ffs/fs.h>
|
|
|
|
#include <ufs/ufs/inode.h>
|
1993-06-12 14:58:17 +00:00
|
|
|
|
1995-06-25 14:02:57 +00:00
|
|
|
extern char *devs[], *iodest;
|
|
|
|
extern char *name, dflname[];
|
1993-06-12 14:58:17 +00:00
|
|
|
extern struct fs *fs;
|
|
|
|
extern struct inode inode;
|
1994-12-18 19:14:19 +00:00
|
|
|
extern int dosdev, unit, slice, part, maj, boff, poff, bnum, cnt;
|
1995-01-25 21:40:47 +00:00
|
|
|
extern unsigned long tw_chars;
|
1995-04-14 21:26:53 +00:00
|
|
|
extern int loadflags;
|
|
|
|
extern struct disklabel disklabel;
|
|
|
|
|
|
|
|
/* asm.S */
|
|
|
|
#if ASM_ONLY
|
1995-04-21 16:07:12 +00:00
|
|
|
void real_to_prot(void);
|
|
|
|
void prot_to_real(void);
|
1995-04-14 21:26:53 +00:00
|
|
|
#endif
|
1995-04-21 16:07:12 +00:00
|
|
|
void startprog(unsigned int physaddr, int howto, int bootdev,
|
|
|
|
/* XXX struct bootinfo * */ unsigned int bootinfo);
|
|
|
|
void pbzero(void *dst, size_t count);
|
|
|
|
void pcpy(const void *src, void *dst, size_t count);
|
1995-04-14 21:26:53 +00:00
|
|
|
|
|
|
|
/* bios.S */
|
1995-04-21 16:07:12 +00:00
|
|
|
int biosread(int dev, int cyl, int head, int sec, int nsec, void *offset);
|
|
|
|
void putc(int c);
|
|
|
|
int getc(void);
|
|
|
|
int ischar(void);
|
|
|
|
int get_diskinfo(int drive);
|
|
|
|
int memsize(int extended);
|
1995-04-14 21:26:53 +00:00
|
|
|
|
|
|
|
/* boot.c */
|
1995-04-21 16:07:12 +00:00
|
|
|
void boot(int drive);
|
1995-04-14 21:26:53 +00:00
|
|
|
|
|
|
|
/* boot2.S */
|
1995-04-21 16:07:12 +00:00
|
|
|
void boot2(void);
|
1995-04-14 21:26:53 +00:00
|
|
|
|
|
|
|
/* disk.c */
|
1995-04-21 16:07:12 +00:00
|
|
|
int devopen(void);
|
|
|
|
void devread(void);
|
|
|
|
void Bread(int dosdev, int sector);
|
|
|
|
int badsect(int dosdev, int sector);
|
1995-04-14 21:26:53 +00:00
|
|
|
|
|
|
|
/* io.c */
|
1995-04-21 16:07:12 +00:00
|
|
|
void gateA20(void);
|
1995-06-25 14:02:57 +00:00
|
|
|
void printf(const char *format, ...);
|
1995-04-21 16:07:12 +00:00
|
|
|
void putchar(int c);
|
|
|
|
int getchar(int in_buf);
|
|
|
|
void delay1ms(void);
|
|
|
|
int gets(char *buf);
|
|
|
|
int strcmp(const char *s1, const char *s2);
|
|
|
|
void bcopy(const char *from, char *to, int len);
|
|
|
|
void twiddle(void);
|
1995-04-14 21:26:53 +00:00
|
|
|
|
|
|
|
/* probe_keyboard.c */
|
1995-04-21 16:07:12 +00:00
|
|
|
int probe_keyboard(void);
|
1995-04-14 21:26:53 +00:00
|
|
|
|
|
|
|
/* serial.S */
|
1995-04-21 16:07:12 +00:00
|
|
|
void serial_putc(int ch);
|
|
|
|
int serial_getc(void);
|
|
|
|
int serial_ischar(void);
|
|
|
|
void init_serial(void);
|
1995-04-14 21:26:53 +00:00
|
|
|
|
|
|
|
/* sys.c */
|
1995-06-25 14:02:57 +00:00
|
|
|
void xread(char *addr, int size);
|
1995-04-21 16:07:12 +00:00
|
|
|
void read(char *buffer, int count);
|
|
|
|
int find(char *path);
|
|
|
|
int block_map(int file_block);
|
|
|
|
int openrd(void);
|