vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / kernel / bus_managers / pci / arch / m68k / pci_controller.cpp
blob87293a3e1d19fe3e9eacba1390bbf5d3d2c48262
1 /*
2 * Copyright 2007, François Revol <revol@free.fr>.
3 * Distributed under the terms of the MIT License.
4 */
7 #include "pci_controller.h"
9 #include <arch_platform.h>
11 #include "pci_private.h"
14 * As we don't have any real PCI bus in any of the supported m68k platforms,
15 * we fake one, with hardcoded devices.
16 * TODO: this doesn't make any sense, as we can't share any drivers, anyway.
17 * We should better export dedicated bus managers for Zorro etc. busses on
18 * these systems.
19 * TODO: actually, there are several PCI boards for the Amiga.
22 #include "amiga/pci_amiga.h"
23 #include "apple/pci_apple.h"
24 #include "atari/pci_atari.h"
27 status_t
28 pci_controller_init(void)
30 switch (M68KPlatform::Default()->PlatformType()) {
31 /* case M68K_PLATFORM_AMIGA:
32 return m68k_amiga_pci_controller_init();
33 break;
34 case M68K_PLATFORM_APPLE:
35 return m68k_apple_pci_controller_init();
36 break;*/
37 case M68K_PLATFORM_ATARI:
38 return m68k_atari_pci_controller_init();
39 break;
40 default:
41 return EINVAL;
43 return B_OK;
47 phys_addr_t
48 pci_ram_address(phys_addr_t physical_address_in_system_memory)
50 return physical_address_in_system_memory;