Subject: Re: Linux on an IBM 750 Thinkpad

From: [email-masked] (Michael Steiner)
Date: 11 Apr 1994 15:22:21 GMT

For the TP750 there are (at least as i know) the following problems:
1.) problem with PMBIOS (resulting in crashes then all memory is used)
2.) 2.88MB-floppy (not recognized )

1.) is solved by the following patch (thanx to [email-masked]) to file
/usr/src/linux/mm/memory.c:
--- begin patch 1 ---------------------------------------------------------------
*** /usr/src/linux/mm/memory.c	Fri Apr  8 22:18:46 1994
--- /usr/src/linux/mm/memory.c.orig	Wed Feb 23 09:36:51 1994
***************
*** 1069,1078 ****
  		*--p = MAP_PAGE_RESERVED;
  	start_low_mem = PAGE_ALIGN(start_low_mem);
  	start_mem = PAGE_ALIGN(start_mem);
- /* thinkpad 750 patch 
  	while (start_low_mem < 0xA0000) {
- */
- 	while (start_low_mem < 0x9f000) {
  		mem_map[MAP_NR(start_low_mem)] = 0;
  		start_low_mem += PAGE_SIZE;
  	}
--- 1069,1075 ----
--- end patch 1 -----------------------------------------------------------------

the (partial) solution to 2.) what allows you to deal with the floppy
as 1.44MB-drive is to apply the following patch (thanx to
[email-masked]) to the file usr/src/linux/drivers/block/floppy.c:
--- begin patch 2 ---------------------------------------------------------------
*** /usr/src/linux/drivers/block/floppy.c	Fri Apr  8 22:19:22 1994
--- /usr/src/linux/drivers/block/floppy.c.orig	Tue Mar  1 07:27:32 1994
***************
*** 170,179 ****
  	{ 1440, 9,2,80,0,0x2A,0x02,0xDF,0x50,"720k" },	  /* 3.5" 720kB diskette */
  	{ 2880,18,2,80,0,0x1B,0x00,0xCF,0x6C,"1.44M" },	  /* 1.44MB diskette */
  	{ 1440, 9,2,80,0,0x2A,0x02,0xDF,0x50,"720k/AT" }, /* 3.5" 720kB diskette */
- 	{ 2880,18,2,80,0,0x1B,0x00,0xCF,0x6C,"1.44M" },	  /* 1.44MB diskette */
- 	{ 1440, 9,2,80,0,0x2A,0x02,0xDF,0x50,"720k/AT" }, /* 3.5" 720kB diskette */
-  	{ 2880,18,2,80,0,0x1B,0x00,0xCF,0x6C,"1.44M" },	  /* 1.44MB diskette */
- 	{ 1440, 9,2,80,0,0x2A,0x02,0xDF,0x50,"720k/AT" }, /* 3.5" 720kB diskette */
  };
  
  /* Auto-detection: Disk type used until the next media change occurs. */
--- 170,175 ----
***************
*** 902,908 ****
  static void shake_done(void)
  {
  	current_track = NO_TRACK;
! 	if (!(inb(FD_DIR) & 0x80))
  		request_done(0);
  	redo_fd_request();
  }
--- 898,904 ----
  static void shake_done(void)
  {
  	current_track = NO_TRACK;
! 	if (inb(FD_DIR) & 0x80)
  		request_done(0);
  	redo_fd_request();
  }
***************
*** 933,939 ****
  
  static void floppy_ready(void)
  {
! 	if (!(inb(FD_DIR) & 0x80)) {
  		changed_floppies |= 1<<current_drive;
  		buffer_track = -1;
  		if (keep_data[current_drive]) {
--- 929,935 ----
  
  static void floppy_ready(void)
  {
! 	if (inb(FD_DIR) & 0x80) {
  		changed_floppies |= 1<<current_drive;
  		buffer_track = -1;
  		if (keep_data[current_drive]) {
***************
*** 1208,1214 ****
  				outb_p((current_DOR & 0xfc) | drive |
  				    (0x10 << drive),FD_DOR);
  				for (cnt = 0; cnt < 1000; cnt++) __asm__("nop");
! 				if (!(inb(FD_DIR) & 0x80))
  					keep_data[drive] = 1;
  				else
  					keep_data[drive] = 0;
--- 1204,1210 ----
  				outb_p((current_DOR & 0xfc) | drive |
  				    (0x10 << drive),FD_DOR);
  				for (cnt = 0; cnt < 1000; cnt++) __asm__("nop");
! 				if (inb(FD_DIR) & 0x80)
  					keep_data[drive] = 1;
  				else
  					keep_data[drive] = 0;
***************
*** 1241,1247 ****
  {
  	struct floppy_struct *base;
  
! 	if (code > 0 && code < 7) {
  		base = &floppy_types[(code-1)*2];
  		printk("fd%d is %s",drive,base->name);
  		return base;
--- 1237,1243 ----
  {
  	struct floppy_struct *base;
  
! 	if (code > 0 && code < 5) {
  		base = &floppy_types[(code-1)*2];
  		printk("fd%d is %s",drive,base->name);
  		return base;
--- end patch 2 -----------------------------------------------------------------

some (minor) open problems are:
- for the 750Cs X seems only to run with black and white. in
  color-mode you get all twice (no, not interlaced ...) probably
  because of dual-scan monitor.
- apmd doesn't work:
  it starts up well (it prints:
	 APM install check: v01.00PM flags 3 [ 16 32 idle=stop bios-pm-enabled ]
  but then you try to suspend (something that normally works ) it writes:
	set system suspend: Can't enter requested state
  and doesn't suspend

PS: if somebody needs a bootfloppy with this patches applied i can
    send him a disk-image .... (makes bootstrapping a bit (?!) easier.