diff -urN linux-2.6.4.orig/arch/i386/Kconfig linux-2.6.4/arch/i386/Kconfig
--- linux-2.6.4.orig/arch/i386/Kconfig	2004-03-13 21:51:40.000000000 +0100
+++ linux-2.6.4/arch/i386/Kconfig	2004-03-14 00:24:53.000000000 +0100
@@ -1325,6 +1325,33 @@
 
 endmenu
 
+menu "LinuxBIOS"
+
+config CONFIG_LINUXBIOS
+	bool "LinuxBIOS Support"
+
+config CONFIG_LINUXBIOS_PM
+	depends on CONFIG_LINUXBIOS
+	bool "LinuxBIOS Power Management support"
+
+config CONFIG_LINUXBIOS_PM_SIS503
+	depends on CONFIG_LINUXBIOS_PM
+	bool "SiS 503 support
+
+config CONFIG_LINUXBIOS_PM_PIIX4E
+	depends on CONFIG_LINUXBIOS_PM
+	bool "PIIX4E support"
+
+config CONFIG_LINUXBIOS_FORCE_IDE_CONTROLLER_ON
+	depends on CONFIG_LINUXBIOS
+	bool "Force IDE Controllers on"
+
+config CONFIG_LINUXBIOS_WAIT_HDA_SPINUP
+	depends on CONFIG_LINUXBIOS
+	bool "Wait for HDA to spin up"
+
+endmenu
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
diff -urN linux-2.6.4.orig/arch/i386/kernel/reboot.c linux-2.6.4/arch/i386/kernel/reboot.c
--- linux-2.6.4.orig/arch/i386/kernel/reboot.c	2004-03-13 21:51:39.000000000 +0100
+++ linux-2.6.4/arch/i386/kernel/reboot.c	2004-03-14 00:25:15.000000000 +0100
@@ -13,6 +13,157 @@
 #include <asm/apic.h>
 #include "mach_reboot.h"
 
+#ifdef CONFIG_LINUXBIOS_PM
+#include <linux/pci.h>
+#ifdef CONFIG_LINUXBIOS_PM_SIS503
+void
+sis503_reset(struct pci_dev *dev)
+{
+	unsigned char b;
+	unsigned short acpi_base;
+
+	printk(KERN_ERR  "%s : starting reset operation. \n", __FUNCTION__);
+
+	/* Enable ACPI by set B7 on Reg 0x40, LPC */
+	pci_read_config_byte(dev, 0x40, &b);
+	pci_write_config_byte(dev, 0x40, b | 0x80);
+	printk(KERN_ERR  "%s : enabled ACPI. \n", __FUNCTION__);
+
+	/* get the ACPI base address for register 0x74,0x75 of LPC */
+	pci_read_config_word(dev, 0x74, &acpi_base);	
+	printk(KERN_ERR  "%s : acpi base : %x\n", __FUNCTION__, acpi_base);
+
+	/* Set software watchdog timer init value */
+	outb(0x03, 0x4a + acpi_base);
+	printk(KERN_ERR  "%s : set the dog. \n", __FUNCTION__);
+
+	printk(KERN_ERR  "%s : enabling dog. \n", __FUNCTION__);
+	/* Software watchdog enable, issue PCIRST# when time expire */
+	outb(0x8f, 0x4b + acpi_base);
+
+	printk(KERN_ERR  "%s : We should reset soon. \n", __FUNCTION__);
+}
+
+void
+sis503_off(struct pci_dev *dev)
+{
+	unsigned char b;
+	unsigned short acpi_base;
+
+	printk(KERN_ERR  "%s : starting reset operation. \n", __FUNCTION__);
+	/* Enable ACPI by set B7 on Reg 0x40, LPC */
+	pci_read_config_byte(dev, 0x40, &b);
+	pci_write_config_byte(dev, 0x40, b | 0x80);
+	printk(KERN_ERR  "%s : enabled ACPI. \n", __FUNCTION__);
+
+        /* get the ACPI base address for register 0x74,0x75 of LPC */
+	pci_read_config_word(dev, 0x74, &acpi_base);
+	printk (KERN_ERR  "%s : acpi base : %x\n", __FUNCTION__, acpi_base);
+
+	/* ACPI Register 5, Bit 10-12, Sleeping Type,
+	   set to 101 -> S5, soft_off */
+	outb(0x14, 0x05 + acpi_base);
+	printk(KERN_ERR  "%s : DONE setting sleep type. \n", __FUNCTION__);
+
+	/* ACPI Register 5, Bit 13, Sleep Enable */
+	outb(0x20 | 0x14, 0x05 + acpi_base);
+	printk(KERN_ERR  "%s : DONE sleep enable. \n", __FUNCTION__);
+}
+#endif // CONFIG_LINUXBIOS_PM_SIS503
+#ifdef CONFIG_LINUXBIOS_PM_PIIX4E
+void
+piix4e_reset(struct pci_dev *dev)
+{
+    // simple on this part. outb 0x6 to 0xcf9
+
+    printk(KERN_ERR  "%s : starting reset operation. \n", __FUNCTION__);
+    outb(0x6, 0xcf9);
+    printk(KERN_ERR  "%s : We should reset soon. \n", __FUNCTION__);
+}
+
+void
+piix4e_off(struct pci_dev *dev)
+{
+	unsigned char b;
+	unsigned short acpi_base;
+
+	printk(KERN_ERR  "%s : no power off on this chip! \n", __FUNCTION__);
+}
+#endif
+struct pci_dev * pci_find_device(unsigned int vendor, unsigned int device, 
+				 const struct pci_dev *from);
+
+struct linuxbios_control {
+	u_short vendor, device;
+	void (*poweroff)(struct pci_dev *);
+	void (*reset)(struct pci_dev *);
+};
+
+struct linuxbios_control controls[] = {
+#ifdef CONFIG_LINUXBIOS_PM_SIS503
+	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, sis503_off, sis503_reset},
+#endif
+#ifdef CONFIG_LINUXBIOS_PM_PIIX4E
+	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, 
+	 piix4e_off, piix4e_reset},
+#endif
+	{0}
+};
+
+struct linuxbios_control *findcontrol(struct pci_dev **d)
+{
+	struct linuxbios_control *lb = controls, *retval = 0;
+	int i;
+
+	printk(KERN_ERR  "%s : Find vendor 0x%x device 0x%x\n", __FUNCTION__, 
+	       lb->vendor, lb->device);
+	for(lb = controls, i = 0; 
+	    (i < sizeof(controls)/sizeof(controls[0])) && (! retval); 
+	    i++, lb++)
+	{
+		*d = pci_find_device(lb->vendor, lb->device, 0);
+		if (*d)
+			retval = lb;
+	}
+
+	printk(KERN_ERR  "%s : result of find is %p\n", __FUNCTION__, retval);
+	return retval;
+}
+
+void
+linuxbios_poweroff(void)
+{
+	struct linuxbios_control *lb = 0;
+	struct pci_dev *dev;
+
+	printk(KERN_ERR  "%s : find an lb\n", __FUNCTION__);
+	lb = findcontrol(&dev);
+
+	printk(KERN_ERR  "%s : found lb %p, call %p\n", __FUNCTION__, 
+	       lb, lb ? lb->poweroff : 0);
+	if (lb && (lb->poweroff))
+		lb->poweroff(dev);
+	printk(KERN_ERR  "%s : Returning? Can't happen, I thought?\n", __FUNCTION__);
+}
+
+void
+linuxbios_reset(void)
+{
+	struct linuxbios_control *lb = 0;
+	struct pci_dev *dev;
+
+	printk(KERN_ERR  "%s : find an lb\n", __FUNCTION__);
+	lb = findcontrol(&dev);
+
+	printk(KERN_ERR  "%s : found lb %p, call %p\n", __FUNCTION__, 
+	       lb, lb ? lb->reset : 0);
+	if (lb && (lb->reset))
+		lb->reset(dev);
+	printk(KERN_ERR  "%s : Returning? Can't happen, I thought?\n", __FUNCTION__);
+}
+
+#endif // CONFIG_LINUXBIOS_PM
+
 /*
  * Power off function, if any
  */
@@ -263,7 +414,10 @@
 #ifdef CONFIG_X86_IO_APIC
 	disable_IO_APIC();
 #endif
-
+#ifdef CONFIG_LINUXBIOS_PM
+	linuxbios_reset();
+#endif
+ 
 	if (!reboot_thru_bios) {
 		if (efi_enabled) {
 			efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, 0);
@@ -299,6 +453,9 @@
 		efi.reset_system(EFI_RESET_SHUTDOWN, EFI_SUCCESS, 0, 0);
 	if (pm_power_off)
 		pm_power_off();
+#ifdef CONFIG_LINUXBIOS_PM
+	linuxbios_poweroff();
+#endif
 }
 
 EXPORT_SYMBOL(machine_power_off);
diff -urN linux-2.6.4.orig/drivers/ide/ide-probe.c linux-2.6.4/drivers/ide/ide-probe.c
--- linux-2.6.4.orig/drivers/ide/ide-probe.c	2004-03-13 21:52:30.000000000 +0100
+++ linux-2.6.4/drivers/ide/ide-probe.c	2004-03-14 00:36:53.000000000 +0100
@@ -451,6 +451,14 @@
 		if ((drive->media != ide_disk) && (cmd == WIN_IDENTIFY))
 			return 4;
 	}
+	
+#ifdef CONFIG_LINUXBIOS_WAIT_HDA_SPINUP
+	if (! strncmp(drive->name, "hda", 3)) {
+	    printk("jamming drive present for %s\n", drive->name);
+	    drive->present = 1;
+	}
+#endif
+
 #ifdef DEBUG
 	printk("probing for %s: present=%d, media=%d, probetype=%s\n",
 		drive->name, drive->present, drive->media,
diff -urN linux-2.6.4.orig/drivers/ide/setup-pci.c linux-2.6.4/drivers/ide/setup-pci.c
--- linux-2.6.4.orig/drivers/ide/setup-pci.c	2004-03-13 21:52:30.000000000 +0100
+++ linux-2.6.4/drivers/ide/setup-pci.c	2004-03-14 00:37:01.000000000 +0100
@@ -620,9 +620,20 @@
 		    (secondpdc++==1) && (port==1))
 			goto controller_ok;
 			
+#ifndef CONFIG_LINUXBIOS_FORCE_IDE_CONTROLLER_ON
 		if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) ||
 		    (tmp & e->mask) != e->val))
 			continue;	/* port not enabled */
+#else
+ 		/* force 'em on! */
+		if (e->reg) {
+		    pci_read_config_byte(dev, e->reg, &tmp);
+		    tmp |= e->val;
+		    pci_write_config_byte(dev, e->reg, tmp);
+		    printk("%s: LINUXBIOS, so Jammed the enable on!\n", d->name);
+		}
+#endif
+
 controller_ok:
 
 		if (d->channels	<= port)
