enable arch specific config manager, to allow hardcoding devices.

On x86 we might want to publish isa devices like PS/2 ports if they aren't found via ACPI.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26105 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2008-06-23 15:37:30 +00:00
parent aa385c7cb2
commit c9a9fe0f74
8 changed files with 133 additions and 3 deletions
@@ -4,5 +4,7 @@ UsePrivateHeaders kernel ;
KernelAddon config_manager :
config_manager.c
: config_manager_arch.a
;
SubInclude HAIKU_TOP src add-ons kernel bus_managers config_manager arch $(TARGET_ARCH) ;
@@ -6,5 +6,7 @@ UsePrivateHeaders kernel [ FDirName kernel arch m68k ] ;
KernelStaticLibrary config_manager_arch :
config_manager_arch.c
amiga_hardcoded.c
atari_hardcoded.c
;
@@ -0,0 +1,42 @@
/*
* Copyright 2007 Haiku, Inc.
* Distributed under the terms of the MIT License.
*
* arch-specific config manager
*
* Authors (in chronological order):
* François Revol ([email protected])
*/
#include "config_manager_arch.h"
#if 0
#define DIS sizeof(struct device_info)
#define DIF (B_DEVICE_INFO_ENABLED|B_DEVICE_INFO_CONFIGURED)
#define DID 'm', '6', '8',
static struct hardcoded_device gHardcodedDevices[] = {
/* video */
{{DIS, DIS, B_ISA_BUS, {PCI_display, PCI_display_other, 0xff}, {DID, 0}, DIF, B_OK },
.isa = {}},
/* ide */
{{DIS, DIS, B_ISA_BUS, {PCI_mass_storage, PCI_ide, 0xff}, {DID, 1}, DIF, B_OK },
.isa = {}}
/* scsi */
{{DIS, DIS, B_ISA_BUS, {PCI_mass_storage, PCI_scsi, 0xff}, {DID, 2}, DIF, B_OK },
.isa = {}}
/* audio */
{{DIS, DIS, B_ISA_BUS, {PCI_multimedia, 0xff, 0xff}, {DID, 3}, DIF, B_OK },
.isa = {}}
};
#endif
status_t
amiga_hardcoded(struct device_info **info, int32 *count)
{
return B_OK;
}
@@ -0,0 +1,42 @@
/*
* Copyright 2007 Haiku, Inc.
* Distributed under the terms of the MIT License.
*
* arch-specific config manager
*
* Authors (in chronological order):
* François Revol ([email protected])
*/
#include "config_manager_arch.h"
#define DIS sizeof(struct device_info)
#define DIF (B_DEVICE_INFO_ENABLED|B_DEVICE_INFO_CONFIGURED)
#define DID 'm68k', 'atar', 'i '
static struct hardcoded_device gHardcodedDevices[] = {
/* video */
{{DIS, DIS, B_ISA_BUS, {PCI_display, PCI_display_other, 0xff}, {DID, 0}, DIF, B_OK },
{ .isa = {} },
.configs = {}},
/* ide */
{{DIS, DIS, B_ISA_BUS, {PCI_mass_storage, PCI_ide, 0xff}, {DID, 1}, DIF, B_OK },
{ .isa = {} },
.configs = {}},
/* scsi */
{{DIS, DIS, B_ISA_BUS, {PCI_mass_storage, PCI_scsi, 0xff}, {DID, 2}, DIF, B_OK },
{ .isa = {} },
.configs = {}},
/* audio */
{{DIS, DIS, B_ISA_BUS, {PCI_multimedia, 0xff, 0xff}, {DID, 3}, DIF, B_OK },
{ .isa = {} },
.configs = { }},
};
status_t
atari_hardcoded(struct device_info **info, int32 *count)
{
return B_OK;
}
@@ -8,8 +8,15 @@
* François Revol ([email protected])
*/
int config_manager_scan_hardcoded(void *)
#include <OS.h>
#include <config_manager.h>
status_t config_manager_scan_hardcoded(struct device_info **info, int32 *count)
{
//XXX
return atari_hardcoded(info, count);
count = 0;
return B_OK;
}
@@ -0,0 +1,29 @@
/*
* Copyright 2007 Haiku, Inc.
* Distributed under the terms of the MIT License.
*
* arch-specific config manager
*
* Authors (in chronological order):
* François Revol ([email protected])
*/
#ifndef _CONFIG_MANAGER_ARCH_H
#define _CONFIG_MANAGER_ARCH_H
#include <ISA.h>
#include <PCI.h>
#include <isapnp.h>
#include <config_manager.h>
struct hardcoded_device {
struct device_info info;
union {
struct isa_info isa;
pci_info pci;
//pcmcia...
} bus;
struct possible_device_configurations configs;
};
#endif /* _CONFIG_MANAGER_ARCH_H */
@@ -8,7 +8,10 @@
* François Revol ([email protected])
*/
int config_manager_scan_hardcoded(void *)
#include <OS.h>
#include <config_manager.h>
int config_manager_scan_hardcoded(struct device_info **info, int32 *count)
{
return B_OK;
}
@@ -8,7 +8,10 @@
* François Revol ([email protected])
*/
int config_manager_scan_hardcoded(void *)
#include <OS.h>
#include <config_manager.h>
int config_manager_scan_hardcoded(struct device_info **info, int32 *count)
{
return B_OK;
}