Hi,
does anyone own a motherboard with an intel chipset and with an ICH5/6 io controller hub? I've modified atapi a little bit. Atapi may detect the second ide (SATA) controller of an ICH5/6. I'm interested on the debug output from atapi while booting.
- Hartmut
M:\Sandbox\ros_work\reactos>set SVN_EDITOR=notepad
M:\Sandbox\ros_work\reactos>d:\programme\subversion\bin\svn.exe diff drivers\storage\atapi\atapi.c Index: drivers/storage/atapi/atapi.c =================================================================== --- drivers/storage/atapi/atapi.c (revision 14209) +++ drivers/storage/atapi/atapi.c (working copy) @@ -123,7 +123,15 @@ ULONG Dummy; } UNIT_EXTENSION, *PUNIT_EXTENSION;
-PCI_SLOT_NUMBER LastSlotNumber; +#if 1 +/* + * FIXME: + * ScsiPortGetDeviceBase must check if a resource is already in use. + * This needs to implement IoReportResourceUsage or IoReportResourceForDetection. + */ +ULONG CommandPortArray[64]; +ULONG CommandPortCount = 0; +#endif
#ifdef ENABLE_NATIVE_PCI typedef struct _PCI_NATIVE_CONTROLLER @@ -388,8 +396,6 @@ InitData.DeviceId = 0; InitData.DeviceIdLength = 0;
- LastSlotNumber.u.AsULONG = 0xFFFFFFFF; - Status = ScsiPortInitialize(DriverObject, RegistryPath, &InitData, @@ -437,6 +443,27 @@ #ifdef ENABLE_DMA ULONG Length; #endif +#if 1 + /* + * FIXME: + * ScsiPortGetDeviceBase must check if a resource is already in use. + * This needs to implement IoReportResourceUsage or IoReportResourceForDetection. + */ + ULONG i; + + for (i = 0; i < CommandPortCount; i++) + { + if (CommandPortArray[i] == CommandPortBase) + { + break; + } + } + if (i < CommandPortCount || + CommandPortCount >= 64) + { + return FALSE; + } +#endif IoAddress = ScsiPortConvertUlongToPhysicalAddress(CommandPortBase); IoBase = ScsiPortGetDeviceBase((PVOID)DevExt, InterfaceType, @@ -534,6 +561,14 @@ { ConfigInfo->AtdiskSecondaryClaimed = TRUE; } +#if 1 + /* + * FIXME: + * ScsiPortGetDeviceBase must check if a resource is already in use. + * This needs to implement IoReportResourceUsage or IoReportResourceForDetection. + */ + CommandPortArray[CommandPortCount++] = CommandPortBase; +#endif return TRUE; }
@@ -559,7 +594,7 @@ BOOLEAN DeviceFound; ULONG BusMasterBasePort = 0;
- DPRINT("AtapiFindCompatiblePciController() Bus: %lu Slot: %lu\n", + DPRINT1("AtapiFindCompatiblePciController() Bus: %lu Slot: %lu\n", ConfigInfo->SystemIoBusNumber, ConfigInfo->SlotNumber);
@@ -600,10 +635,10 @@ } } - DPRINT("%x %x\n", PciConfig.BaseClass, PciConfig.SubClass); - if (PciConfig.BaseClass == 0x01 && - PciConfig.SubClass == 0x01) // && -// (PciConfig.ProgIf & 0x05) == 0) + DPRINT("%x %x %x\n", PciConfig.BaseClass, PciConfig.SubClass, PciConfig.ProgIf); + if (PciConfig.BaseClass == PCI_CLASS_MASS_STORAGE_CTLR && + PciConfig.SubClass == PCI_SUBCLASS_MSC_IDE_CTLR && + (PciConfig.ProgIf & 0x05) == 0) { /* both channels are in compatibility mode */ DPRINT("Bus %1lu Device %2lu Func %1lu VenID 0x%04hx DevID 0x%04hx\n", @@ -692,7 +727,7 @@ BOOLEAN ChannelFound = FALSE; BOOLEAN DeviceFound = FALSE;
- DPRINT("AtapiFindIsaBusController() called!\n"); + DPRINT1("AtapiFindIsaBusController() called!\n");
*Again = FALSE;
@@ -770,7 +805,7 @@ ULONG Count; BOOLEAN ChannelFound;
- DPRINT("AtapiFindNativePciController() called!\n"); + DPRINT1("AtapiFindNativePciController() called!\n");
SlotNumber.u.AsULONG = ConfigInfo->SlotNumber; StartDeviceNumber = SlotNumber.u.bits.DeviceNumber; @@ -799,9 +834,30 @@ break; } } - if (Count < sizeof(PciNativeController)/sizeof(PCI_NATIVE_CONTROLLER)) + if (PciConfig.BaseClass == 0x01) { - /* We have found a known native pci ide controller */ + DPRINT1("Bus %1lu Device %2lu Func %1lu VenID 0x%04hx DevID 0x%04hx\n", + ConfigInfo->SystemIoBusNumber, + SlotNumber.u.bits.DeviceNumber, + SlotNumber.u.bits.FunctionNumber, + PciConfig.VendorID, + PciConfig.DeviceID); + DPRINT1("BaseClass %02x, SubClass %02x, ProgIF %02x\n", PciConfig.BaseClass, PciConfig.SubClass, PciConfig.ProgIf); + DPRINT1("BaseAddresses[0] %08x\n", PciConfig.u.type0.BaseAddresses[0]); + DPRINT1("BaseAddresses[1] %08x\n", PciConfig.u.type0.BaseAddresses[1]); + DPRINT1("BaseAddresses[2] %08x\n", PciConfig.u.type0.BaseAddresses[2]); + DPRINT1("BaseAddresses[3] %08x\n", PciConfig.u.type0.BaseAddresses[3]); + DPRINT1("BaseAddresses[4] %08x\n", PciConfig.u.type0.BaseAddresses[4]); + DPRINT1("BaseAddresses[5] %08x\n", PciConfig.u.type0.BaseAddresses[5]); + DPRINT1("InterruptLine %d\n", PciConfig.u.type0.InterruptLine); + } + + if (Count < sizeof(PciNativeController)/sizeof(PCI_NATIVE_CONTROLLER) || + (PciConfig.BaseClass == PCI_CLASS_MASS_STORAGE_CTLR && + PciConfig.SubClass == PCI_SUBCLASS_MSC_IDE_CTLR && + (PciConfig.ProgIf & 0x05) == 0x05)) + { + /* We have found a known or a native pci ide controller */ if ((PciConfig.ProgIf & 0x80) && (PciConfig.u.type0.BaseAddresses[4] & PCI_ADDRESS_IO_SPACE)) { DPRINT("Found IDE Bus Master controller!\n"); @@ -813,40 +869,24 @@ BusMasterBasePort = 0; }
- DPRINT("VendorID: %04x, DeviceID: %04x\n", PciConfig.VendorID, PciConfig.DeviceID); + DPRINT1("VendorID: %04x, DeviceID: %04x\n", PciConfig.VendorID, PciConfig.DeviceID); ConfigInfo->NumberOfBuses = 1; ConfigInfo->MaximumNumberOfTargets = 2; ConfigInfo->MaximumTransferLength = 0x10000; /* max 64Kbyte */
- /* FIXME: - We must not store and use the last tested slot number. If there is a recall - to the some device and we will claim the primary channel again than the call - to ScsiPortGetDeviceBase in AtapiClaimHwResource will fail and we can try to - claim the secondary channel. - */ ChannelFound = FALSE; - if (LastSlotNumber.u.AsULONG != SlotNumber.u.AsULONG) + /* try to claim primary channel */ + if ((PciConfig.u.type0.BaseAddresses[0] & PCI_ADDRESS_IO_SPACE) && + (PciConfig.u.type0.BaseAddresses[1] & PCI_ADDRESS_IO_SPACE)) { - /* try to claim primary channel */ - if ((PciConfig.u.type0.BaseAddresses[0] & PCI_ADDRESS_IO_SPACE) && - (PciConfig.u.type0.BaseAddresses[1] & PCI_ADDRESS_IO_SPACE)) - { - /* primary channel is enabled */ - ChannelFound = AtapiClaimHwResources(DevExt, - ConfigInfo, - PCIBus, - PciConfig.u.type0.BaseAddresses[0] & PCI_ADDRESS_IO_ADDRESS_MASK, - PciConfig.u.type0.BaseAddresses[1] & PCI_ADDRESS_IO_ADDRESS_MASK, - BusMasterBasePort, - PciConfig.u.type0.InterruptLine); - if (ChannelFound) - { - AtapiFindDevices(DevExt, ConfigInfo); - *Again = TRUE; - ConfigInfo->SlotNumber = LastSlotNumber.u.AsULONG = SlotNumber.u.AsULONG; - return SP_RETURN_FOUND; - } - } + /* primary channel is enabled */ + ChannelFound = AtapiClaimHwResources(DevExt, + ConfigInfo, + PCIBus, + PciConfig.u.type0.BaseAddresses[0] & PCI_ADDRESS_IO_ADDRESS_MASK, + PciConfig.u.type0.BaseAddresses[1] & PCI_ADDRESS_IO_ADDRESS_MASK, + BusMasterBasePort, + PciConfig.u.type0.InterruptLine); } if (!ChannelFound) { @@ -862,21 +902,21 @@ PciConfig.u.type0.BaseAddresses[3] & PCI_ADDRESS_IO_ADDRESS_MASK, BusMasterBasePort ? BusMasterBasePort + 8 : 0, PciConfig.u.type0.InterruptLine); - if (ChannelFound) - { - AtapiFindDevices(DevExt, ConfigInfo); - *Again = FALSE; - LastSlotNumber.u.AsULONG = 0xFFFFFFFF; - return SP_RETURN_FOUND; - } } } + if (ChannelFound) + { + CHECKPOINT1; + AtapiFindDevices(DevExt, ConfigInfo); + *Again = TRUE; + ConfigInfo->SlotNumber = SlotNumber.u.AsULONG; + return SP_RETURN_FOUND; + } } } StartFunctionNumber = 0; } *Again = FALSE; - LastSlotNumber.u.AsULONG = 0xFFFFFFFF; DPRINT("AtapiFindNativePciController() done!\n");
return(SP_RETURN_NOT_FOUND);
Hi guys
Taking credits for others work is not a nice thing to todo (Thx Alot).. but you made it worse anyway so no hard feelings :-)
To talk about something else i start a new projekt called CubeOs and i would like to know if their are any special copyrights in reactos..?
Thomas...
Hi! (•) Thomas Larsen (•) wrote:
Hi guys
Taking credits for others work is not a nice thing to todo (Thx Alot).. but you made it worse anyway so no hard feelings :-)
What happen? What reference to work, do you mean?
To talk about something else i start a new projekt called CubeOs and i would like to know if their are any special copyrights in reactos..?
Thomas...
GNU GPL and LGPL in most cases, but we use GPL. James
Good Lord! If you want public domain stuff, then a GPL (and fragmentarily LGPL) project is not the place to look. If you want Public Domain stuff, go to Simtel or suchlike. There's a ton of stuff ranging from GPL and near-GPLed stuff there, to outright Public Domain where the author says explicitly, "use this any way you like. I don't care."
If you want near-Public Domain stuff that looks like Windows, pick up a pre-LGPL Wine tar-ball - it's BSD licensed.
But as you say,
Taking credits for others work is not a nice thing to todo (Thx Alot).. but you made it worse anyway so no hard feelings :-)
Wesley Parish
On Tue, 29 Mar 2005 19:55, James Tabor wrote:
Hi!
(•) Thomas Larsen (•) wrote:
Hi guys
Taking credits for others work is not a nice thing to todo (Thx Alot).. but you made it worse anyway so no hard feelings :-)
What happen? What reference to work, do you mean?
To talk about something else i start a new projekt called CubeOs and i would like to know if their are any special copyrights in reactos..?
Thomas...
GNU GPL and LGPL in most cases, but we use GPL. James _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Taking credits for others work is not a nice thing to todo (Thx Alot).. but you made it worse anyway so no hard feelings :-)
What is it about? Can you point me to time/date/subject you refer to.
To talk about something else i start a new projekt called CubeOs and i would like to know if their are any special copyrights in reactos..?
Just curious: what is the project about?
Oliver
Please tell us the revision of the change you are referring to. If your patch was committed with a commit message not acknowledging you, I'm sure it's just an innocent mistake and we can correct the commit message.
Casper
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of (.) Thomas Larsen (.) Sent: 29. marts 2005 09:39 To: ros-dev@reactos.com Subject: [ros-dev] STATEMENT
Hi guys
Taking credits for others work is not a nice thing to todo (Thx Alot).. but you made it worse anyway so no hard feelings :-)
To talk about something else i start a new projekt called CubeOs and i would like to know if their are any special copyrights in reactos..?
Thomas... _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Casper Hornstrup wrote:
Please tell us the revision of the change you are referring to. If your patch was committed with a commit message not acknowledging you, I'm sure it's just an innocent mistake and we can correct the commit message.
Casper
Hi,
it seems that Klemens has done the same work (removing hardcoded english phrases from source code) which is also a part of Thomas' patch (bug #581). The changed part is not identical but it is the same idea. Thomas' patch contains many changes of tabs and spaces, changes of indentation, changing of comments from c to c++ and so on. It is not possible to understand the changes within the patch (wrong format). It is very difficult to find the real changes with winmerge after applying the patch.
- Hartmut
(•) Thomas Larsen (•) wrote:
Hi guys
Taking credits for others work is not a nice thing to todo (Thx Alot)..
That is true
but you made it worse anyway so no hard feelings :-)
What on earth is this supposed to mean?
To talk about something else i start a new projekt called CubeOs and i would like to know if their are any special copyrights in reactos..?
If you are going to act like a child, I'd rather you left this project. We are all adults here ( or at least trying to be ). Your drama and trolling does nobody any good, and it's not welcome. Grow up. If you have a beef, state so clearly, without the drama, and present details on how you were wronged, and give us an opportunity to make it right.