Mercurial > ecos-v3_0-branch
changeset 1811:a53cbddaeb77
* cdl/redboot.cdl: added CYGSEM_REDBOOT_DISK_IDE_VMWARE option.
* src/fs/ide.c : skip reset IDE commands if running under VMware.
| author | asl |
|---|---|
| date | Wed, 13 Oct 2004 21:22:53 +0000 |
| parents | 13b35973042a |
| children | 119d236b530c |
| files | packages/redboot/current/ChangeLog packages/redboot/current/cdl/redboot.cdl packages/redboot/current/src/fs/ide.c |
| diffstat | 3 files changed, 23 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,3 +1,8 @@ +2004-10-10 Iztok Zupet <iz@elsis.si> + + * cdl/redboot.cdl: added CYGSEM_REDBOOT_DISK_IDE_VMWARE option. + * src/fs/ide.c : skip reset IDE commands if running under VMware. + 2004-10-08 Andrew Lunn <andrew.lunn@ascom.ch> * doc/redboot_installing.sgml: Added links to the tools for the
--- a/packages/redboot/current/cdl/redboot.cdl +++ b/packages/redboot/current/cdl/redboot.cdl @@ -966,6 +966,14 @@ cdl_package CYGPKG_REDBOOT { When this option is enabled, RedBoot will support IDE disks." compile -library=libextras.a fs/ide.c implements CYGINT_REDBOOT_DISK_DRIVERS + + cdl_option CYGSEM_REDBOOT_DISK_IDE_VMWARE { + display "Work with VMware virtual disks" + flavor bool + default_value 0 + description " + This option controls the disk driver beaviour at ide-init" + } } cdl_component CYGSEM_REDBOOT_DISK_EXT2FS {
--- a/packages/redboot/current/src/fs/ide.c +++ b/packages/redboot/current/src/fs/ide.c @@ -99,11 +99,18 @@ ide_reset(int ctlr) { cyg_uint8 status; int delay; - +// +// VMware note: +// VMware virtual IDE device handler obviously expects that +// the reset and setup functions were already done +// by it's bios and complais if one uses reset here... +// +#ifndef CYGSEM_REDBOOT_DISK_IDE_VMWARE HAL_IDE_WRITE_CONTROL(ctlr, 6); // polled mode, reset asserted CYGACC_CALL_IF_DELAY_US(5000); HAL_IDE_WRITE_CONTROL(ctlr, 2); // polled mode, reset cleared CYGACC_CALL_IF_DELAY_US((cyg_uint32)50000); +#endif // wait 30 seconds max for not busy and drive ready for (delay = 0; delay < 300; ++delay) { @@ -132,8 +139,10 @@ ide_presence_detect(int ctlr) CYGACC_CALL_IF_DELAY_US((cyg_uint32)50000); HAL_IDE_READ_UINT8(ctlr, IDE_REG_DEVICE, val); if (val == sel) { +#ifndef CYGSEM_REDBOOT_DISK_IDE_VMWARE if (i) HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_DEVICE, 0); +#endif return 1; } }
