diff -Naur linux-0.01-rm-1.1/include/linux/config.h linux-0.01-rm-1.2/include/linux/config.h --- linux-0.01-rm-1.1/include/linux/config.h 2007-11-13 19:44:37.000000000 +0100 +++ linux-0.01-rm-1.2/include/linux/config.h 2007-11-13 20:34:05.000000000 +0100 @@ -9,13 +9,7 @@ * Don't make this bigger without making sure that there are enough page * directory entries (boot/head.s) */ -#if defined(LINUS_HD) #define HIGH_MEMORY (0x800000) -#elif defined(LASU_HD) -#define HIGH_MEMORY (0x400000) -#else -#error "must define hd" -#endif /* End of buffer memory. Must be 0xA0000, or > 0x100000, 4096-byte aligned */ #if (HIGH_MEMORY>=0x600000) @@ -25,13 +19,7 @@ #endif /* Root device at bootup. */ -#if defined(LINUS_HD) -#define ROOT_DEV 0x306 -#elif defined(LASU_HD) -#define ROOT_DEV 0x302 -#else -#error "must define HD" -#endif +#define ROOT_DEV 0x301 /* * HD type. If 2, put 2 structures with a comma. If just 1, put @@ -42,12 +30,7 @@ * more than 8 heads, but that is what the bios-listings seem to imply. I * just love not having a manual. */ -#if defined(LASU_HD) -#define HD_TYPE { 7,35,915,65536,920,0 } -#elif defined(LINUS_HD) -#define HD_TYPE { 5,17,980,300,980,0 },{ 5,17,980,300,980,0 } -#else -#error "must define a hard-disk type" -#endif + +#define HD_TYPE { 4,20,1024,0,4,0 } #endif diff -Naur linux-0.01-rm-1.1/include/linux/hdreg.h linux-0.01-rm-1.2/include/linux/hdreg.h --- linux-0.01-rm-1.1/include/linux/hdreg.h 2007-11-13 19:44:37.000000000 +0100 +++ linux-0.01-rm-1.2/include/linux/hdreg.h 2007-11-13 20:34:14.000000000 +0100 @@ -14,24 +14,12 @@ * but easier. We don't use BIOS for anything else, why should * we get HD-type from it? Get these values from Reference Guide. */ - -#if HARD_DISK_TYPE == 17 -#define _CYL 977 -#define _HEAD 5 -#define __WPCOM 300 -#define _LZONE 977 -#define _SECT 17 -#define _CTL 0 -#elif HARD_DISK_TYPE == 18 -#define _CYL 977 -#define _HEAD 7 -#define __WPCOM (-1) -#define _LZONE 977 -#define _SECT 17 +#define _CYL 1024 +#define _HEAD 4 +#define __WPCOM (-1) /*not used ?*/ +#define _LZONE 1024 /*same as _CYL ?*/ +#define _SECT 20 #define _CTL 0 -#else -#error Define HARD_DISK_TYPE and parameters, add your own entries as well -#endif /* Controller wants just wp-com/4 */ #if __WPCOM >= 0 @@ -55,14 +43,14 @@ #define HD_CMD 0x3f6 /* Bits of HD_STATUS */ -#define ERR_STAT 0x01 -#define INDEX_STAT 0x02 -#define ECC_STAT 0x04 /* Corrected error */ -#define DRQ_STAT 0x08 -#define SEEK_STAT 0x10 -#define WRERR_STAT 0x20 -#define READY_STAT 0x40 -#define BUSY_STAT 0x80 +#define ERR_STAT 0x01 /*0 => no error */ +#define INDEX_STAT 0x02 /*not used in new controller*/ +#define ECC_STAT 0x04 /*1 => Corrected error */ +#define DRQ_STAT 0x08 /*0=> controller not waiting for data. 1 => waiting*/ +#define SEEK_STAT 0x10 /*0=> searching. 1=> end of search. waiting for read or write*/ +#define WRERR_STAT 0x20 /*1=> write error.*/ +#define READY_STAT 0x40 /*1=> ready*/ +#define BUSY_STAT 0x80 /*1 => busy*/ /* Values for HD_COMMAND */ #define WIN_RESTORE 0x10 @@ -78,7 +66,7 @@ /* Bits for HD_ERROR */ #define MARK_ERR 0x01 /* Bad address mark ? */ #define TRK0_ERR 0x02 /* couldn't find track 0 */ -#define ABRT_ERR 0x04 /* ? */ +#define ABRT_ERR 0x04 /* command stopped */ #define ID_ERR 0x10 /* ? */ #define ECC_ERR 0x40 /* ? */ #define BBD_ERR 0x80 /* ? */ diff -Naur linux-0.01-rm-1.1/kernel/hd.c linux-0.01-rm-1.2/kernel/hd.c --- linux-0.01-rm-1.1/kernel/hd.c 2007-11-13 19:44:37.000000000 +0100 +++ linux-0.01-rm-1.2/kernel/hd.c 2007-11-25 21:40:07.000000000 +0100 @@ -192,7 +192,7 @@ outb_p(sect,++port); outb_p(cyl,++port); outb_p(cyl>>8,++port); - outb_p(0xA0|(drive<<4)|head,++port); + outb_p(0xB0|(drive<<4)|head,++port); outb(cmd,++port); } diff -Naur linux-0.01-rm-1.1/Makefile linux-0.01-rm-1.2/Makefile --- linux-0.01-rm-1.1/Makefile 2007-11-25 22:15:34.000000000 +0100 +++ linux-0.01-rm-1.2/Makefile 2007-11-25 22:15:42.000000000 +0100 @@ -62,7 +62,7 @@ boot/boot: boot/boot.s tools/system (echo -n "SYSSIZE = (";ls -l tools/system | grep system \ - | cut -c25-31 | tr '\012' ' '; echo "+ 15 ) / 16") > tmp.s + | cut -c31-37 | tr '\012' ' '; echo "+ 15 ) / 16") > tmp.s cat boot/boot.s >> tmp.s $(AS86) -o boot/boot.o tmp.s rm -f tmp.s