1 /* 2 * Copyright 2006, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Ingo Weinhold <bonefish@cs.tu-berlin.de> 7 * Axel Dörfler, axeld@pinc-software.de 8 */ 9 10 11 #include <arch/platform.h> 12 #include <apm.h> 13 #include <boot_item.h> 14 #include <boot/stage2.h> 15 16 17 static phys_addr_t sACPIRootPointer = 0; 18 19 20 status_t 21 arch_platform_init(struct kernel_args *args) 22 { 23 return B_OK; 24 } 25 26 27 status_t 28 arch_platform_init_post_vm(struct kernel_args *args) 29 { 30 // Now we can add boot items; pass on the ACPI root pointer 31 sACPIRootPointer = args->arch_args.acpi_root.Get(); 32 add_boot_item("ACPI_ROOT_POINTER", 33 &sACPIRootPointer, sizeof(sACPIRootPointer)); 34 35 return B_OK; 36 } 37 38 39 status_t 40 arch_platform_init_post_thread(struct kernel_args *args) 41 { 42 // APM is not supported on x86_64. 43 #ifndef __x86_64__ 44 apm_init(args); 45 #endif 46 return B_OK; 47 } 48 49