[HAL]: Bus support in the HAL actually creates a further wedge between the different...
authorSir Richard <sir_richard@svn.reactos.org>
Mon, 7 Jun 2010 01:09:41 +0000 (01:09 +0000)
committerSir Richard <sir_richard@svn.reactos.org>
Mon, 7 Jun 2010 01:09:41 +0000 (01:09 +0000)
commitad1721c01643fcb01a52b9f072341f77a254803c
tree19cac9f3074771f3fe697d71338be9af5c017a3b
parentaf870b6e47f9ac95374f8e7c67c7abf956b40e21
[HAL]: Bus support in the HAL actually creates a further wedge between the different x86 HALs: There are actually two dinstinct implementations. On the ACPI HAL, the system is assumed not to have things like special ISA, MCA, EISA buses, and a PCI driver is used in combination with the ACPI Interface for PCI Bus support. On non-ACPI systems, the legacy "Bus Handler" library is used, and the HAL provides a core set of CMOS, EISA, ISA, MCA and PCI bus handlers, each with their own routines and specific code. Additionally, PCI IRQ Routing and other PCI bus internals are handled directly by the HAL -- on the ACPI HAL, the PCI Bus support is implemented through a "Fake"/static bus handler, just to keep the functions shared. On ReactOS, both the ACPI and non-ACPI HAL were currently using a mix of both HAL bus handling types, mostly implemented the "ACPI way" (with a fake PCI bus handler and such).
       As a result, none of the Hal*Bus HALDISPATCH routines were implemented, which bus drivers expect to find when they're not on ACPI systems (ReactOS today). eVb's new PCI driver was crashing, for example.
       Furthermore, legacy systems suffer, because the ACPI HAL Bus routines (that we currently have) expect perfect ACPI-style-compliant systems, not the legacy crap from the early 90ies. This works fine in VMs and new hardware, but old hardware is left behind.
       This patch basically corrects the first part of the problem, by making the bus handling support separate between ACPI and non-ACPI HALs. For now, the code remains 100% the same in functionality between both.
       However, I have started adding the first few elements:
[HAL]: Implement HalRegisterBusHandler HALDISPATCH routine.
[HAL]: On legacy HALs, register the CMOS, ISA, SYSTEM handlers.
[HAL]: Add cmosbus.c. Stub all bus-specific bus handler routines in the xxxbus.c files.
No real functionality change occurs with this patch, yet.

svn path=/trunk/; revision=47649
20 files changed:
reactos/hal/halx86/generic/acpi/busemul.c [moved from reactos/hal/halx86/generic/bus/halbus.c with 91% similarity]
reactos/hal/halx86/generic/acpi/halacpi.c
reactos/hal/halx86/generic/bus/bushndlr.c [deleted file]
reactos/hal/halx86/generic/bus/isabus.c [deleted file]
reactos/hal/halx86/generic/bus/sysbus.c [deleted file]
reactos/hal/halx86/generic/halinit.c
reactos/hal/halx86/generic/legacy/bus/bushndlr.c [new file with mode: 0644]
reactos/hal/halx86/generic/legacy/bus/cmosbus.c [new file with mode: 0644]
reactos/hal/halx86/generic/legacy/bus/isabus.c [new file with mode: 0644]
reactos/hal/halx86/generic/legacy/bus/pcibus.c [moved from reactos/hal/halx86/generic/bus/pcibus.c with 99% similarity]
reactos/hal/halx86/generic/legacy/bus/pcidata.c [moved from reactos/hal/halx86/generic/bus/pcidata.c with 100% similarity]
reactos/hal/halx86/generic/legacy/bus/sysbus.c [new file with mode: 0644]
reactos/hal/halx86/generic/legacy/bussupp.c [new file with mode: 0644]
reactos/hal/halx86/generic/legacy/halpcat.c
reactos/hal/halx86/hal_generic.rbuild
reactos/hal/halx86/hal_generic_acpi.rbuild
reactos/hal/halx86/hal_generic_pcat.rbuild
reactos/hal/halx86/hal_mini.rbuild
reactos/hal/halx86/include/bus.h
reactos/hal/halx86/include/halp.h