+++ /dev/null
-#ifndef BIOS_DISKS_H
-#define BIOS_DISKS_H
-
-#include "dev.h"
-
-/*
- * Constants
- *
- */
-
-#define BIOS_DISK_MAX_NAME_LEN 6
-
-struct bios_disk_sector {
- char data[512];
-};
-
-/*
- * The location of a BIOS disk
- *
- */
-struct bios_disk_loc {
- uint8_t drive;
-};
-
-/*
- * A physical BIOS disk device
- *
- */
-struct bios_disk_device {
- char name[BIOS_DISK_MAX_NAME_LEN];
- uint8_t drive;
- uint8_t type;
-};
-
-/*
- * A BIOS disk driver, with a valid device ID range and naming
- * function.
- *
- */
-struct bios_disk_driver {
- void ( *fill_drive_name ) ( char *buf, uint8_t drive );
- uint8_t min_drive;
- uint8_t max_drive;
-};
-
-/*
- * Define a BIOS disk driver
- *
- */
-#define BIOS_DISK_DRIVER( _name, _fill_drive_name, _min_drive, _max_drive ) \
- static struct bios_disk_driver _name = { \
- .fill_drive_name = _fill_drive_name, \
- .min_drive = _min_drive, \
- .max_drive = _max_drive, \
- }
-
-/*
- * Functions in bios_disks.c
- *
- */
-
-
-/*
- * bios_disk bus global definition
- *
- */
-extern struct bus_driver bios_disk_driver;
-
-#endif /* BIOS_DISKS_H */
+++ /dev/null
-#ifndef COFF_H
-#define COFF_H
-/* Based on the elf.h file
- * Changed accordingly to support COFF file support
- */
-
-
-/* Values for f_flags. */
-#define F_RELFLG 0x0001 /* If set, not reloc. info. Clear for executables */
-#define F_EXEC 0x0002 /* No unresolved symbols. Executable file ! */
-#define F_LNNO 0x0004 /* If set, line information numbers removed */
-#define F_LSYMS 0x0008 /* If set, local symbols removed */
-#define F_AR32WR 0x0100 /* Indicates little endian file */
-
-/* Values for e_machine (architecute). */
-#define EM_E1 0x17a /* Magic number for Hyperstone. Big endian format */
-
-/* Values for f_flags. */
-#define O_MAGIC 0x017c /* Optional's header magic number for Hyperstone */
-
-/* Values for s_flags. */
-#define S_TYPE_TEXT 0x0020 /* If set, the section contains only executable */
-#define S_TYPE_DATA 0x0040 /* If set, the section contains only initialized data */
-#define S_TYPE_BSS 0x0080 /* If set, the section is BSS no data stored */
-
-
-typedef struct
-{
- unsigned short f_magic; /* magic number */
- unsigned short f_nscns; /* number of sections */
- unsigned long f_timdat; /* time & date stamp */
- unsigned long f_symptr; /* file pointer to symtab */
- unsigned long f_nsyms; /* number of symtab entries */
- unsigned short f_opthdr; /* sizeof(optional hdr) */
- unsigned short f_flags; /* flags */
-}
-COFF_filehdr;
-
-/*
- * Optional header.
- */
-typedef struct
-{
- unsigned short magic; /* type of file */
- unsigned short vstamp; /* version stamp */
- unsigned long tsize; /* text size in bytes, padded to FW bdry*/
- unsigned long dsize; /* initialized data " " */
- unsigned long bsize; /* uninitialized data " " */
- unsigned long entry; /* entry pt. */
- unsigned long text_start; /* base of text used for this file */
- unsigned long data_start; /* base of data used for this file */
-}
-COFF_opthdr;
-
-/*
- * Section header.
- */
-typedef struct
-{
- char s_name[8]; /* section name */
- unsigned long s_paddr; /* physical address, aliased s_nlib */
- unsigned long s_vaddr; /* virtual address */
- unsigned long s_size; /* section size */
- unsigned long s_scnptr; /* file ptr to raw data for section */
- unsigned long s_relptr; /* file ptr to relocation */
- unsigned long s_lnnoptr; /* file ptr to line numbers */
- unsigned short s_nreloc; /* number of relocation entries */
- unsigned short s_nlnno; /* number of line number entries*/
- unsigned long s_flags; /* flags */
-}
-COFF_scnhdr;
-
-#endif /* COFF_H */
+++ /dev/null
-#ifndef CPU_H
-#define CPU_H
-
-#include "bits/cpu.h"
-
-#endif /* CPU_H */
+++ /dev/null
-#ifndef FS_H
-#define FS_H
-
-#include <stdint.h>
-
-//typedef uint64_t sector_t;
-
-#ifdef IDE_DISK
-int ide_probe(int drive);
-int ide_read(int drive, sector_t sector, void *buffer);
-#endif
-
-#ifdef USB_DISK
-int usb_probe(int drive);
-int usb_read(int drive, sector_t sector, void *buffer);
-#endif
-
-#define DISK_IDE 1
-#define DISK_MEM 2
-#define DISK_USB 3
-
-int devopen(const char *name, int *reopen);
-int devread(unsigned long sector, unsigned long byte_offset,
- unsigned long byte_len, void *buf);
-
-int file_open(const char *filename);
-int file_read(void *buf, unsigned long len);
-int file_seek(unsigned long offset);
-unsigned long file_size(void);
-
-#define PARTITION_UNKNOWN 0xbad6a7
-
-#ifdef ELTORITO
-int open_eltorito_image(int part, unsigned long *start, unsigned long *length);
-#else
-# define open_eltorito_image(x,y,z) PARTITION_UNKNOWN
-#endif
-
-extern int using_devsize;
-
-#endif /* FS_H */
+++ /dev/null
-#ifndef _TCP_H
-#define _TCP_H
-
-#define TCP_INITIAL_TIMEOUT (3*TICKS_PER_SEC)
-#define TCP_MAX_TIMEOUT (60*TICKS_PER_SEC)
-#define TCP_MIN_TIMEOUT (TICKS_PER_SEC)
-#define TCP_MAX_RETRY 10
-#define TCP_MAX_HEADER ((int)sizeof(struct iphdr)+64)
-#define TCP_MIN_WINDOW (1500-TCP_MAX_HEADER)
-#define TCP_MAX_WINDOW (65535-TCP_MAX_HEADER)
-
-#define FIN 1
-#define SYN 2
-#define RST 4
-#define PSH 8
-#define ACK 16
-#define URG 32
-
-
-struct tcphdr {
- uint16_t src;
- uint16_t dst;
- int32_t seq;
- int32_t ack;
- uint16_t ctrl;
- uint16_t window;
- uint16_t chksum;
- uint16_t urgent;
-};
-
-extern int tcp_transaction ( unsigned long destip, unsigned int destsock,
- void *ptr,
- int (*send)(int len, void *buf, void *ptr),
- int (*recv)(int len, const void *buf, void *ptr));
-
-
-#endif /* _TCP_H */
+++ /dev/null
-#ifndef _PC_KBD_H
-#define _PC_KBD_H
-
-int kbd_ischar(void);
-
-int kbd_getc(void);
-#endif
+++ /dev/null
-#ifndef SYS_INFO_H
-#define SYS_INFO_H
-
-/* Information collected from firmware/bootloader */
-
-struct sys_info {
- /* Values passed by bootloader */
- unsigned long boot_type;
- unsigned long boot_data;
- unsigned long boot_arg;
-
- char *firmware; /* "PCBIOS", "LinuxBIOS", etc. */
- char *command_line; /* command line given to us */
-#if 0
-//By LYH
-//Will use meminfo in Etherboot
- /* memory map */
- int n_memranges;
- struct memrange {
- unsigned long long base;
- unsigned long long size;
- } *memrange;
-#endif
-};
-
-void collect_sys_info(struct sys_info *info);
-void collect_elfboot_info(struct sys_info *info);
-void collect_linuxbios_info(struct sys_info *info);
-
-/* Our name and version. I want to see single instance of these in the image */
-extern const char *program_name, *program_version;
-
-#endif /* SYS_INFO_H */