VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp@ 20413

Last change on this file since 20413 was 20413, checked in by vboxsync, 15 years ago

fix OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/** @file
2 * VBoxAcpi - Virtual Box ACPI maniputation functionality.
3 */
4
5/*
6 * Copyright (C) 2009 Sun Microsystems, Inc.
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
17 * Clara, CA 95054 USA or visit http://www.sun.com if you need
18 * additional information or have any questions.
19 */
20
21#if !defined(IN_RING3)
22#error Pure R3 code
23#endif
24
25#include <VBox/pdmdev.h>
26#include <VBox/pgm.h>
27#include <VBox/log.h>
28#include <VBox/param.h>
29#include <iprt/assert.h>
30#include <iprt/alloc.h>
31#include <iprt/string.h>
32
33#ifdef VBOX_WITH_DYNAMIC_DSDT
34/* vbox.dsl - input to generate proper DSDT on the fly */
35# include <vboxdsl.hex>
36#else
37/* Statically compiled AML */
38# include <vboxaml.hex>
39#endif
40
41#ifdef VBOX_WITH_DYNAMIC_DSDT
42static int prepareDynamicDsdt(PPDMDEVINS pDevIns,
43 void* *ppPtr,
44 size_t *puDsdtLen)
45{
46 //LogRel(("file is %s\n", g_abVboxDslSource));
47 *ppPtr = NULL;
48 *puDsdtLen = 0;
49 return 0;
50}
51
52static int cleanupDynamicDsdt(PPDMDEVINS pDevIns,
53 void* pPtr)
54{
55 return 0;
56}
57#endif
58
59/* Two only public functions */
60int acpiPrepareDsdt(PPDMDEVINS pDevIns, void * *ppPtr, size_t *puDsdtLen)
61{
62#ifdef VBOX_WITH_DYNAMIC_DSDT
63 return prepareDynamicDsdt(pDevIns, ppPtr, puDsdtLen);
64#else
65 *ppPtr = AmlCode;
66 *puDsdtLen = sizeof(AmlCode);
67 return 0;
68#endif
69}
70
71int acpiCleanupDsdt(PPDMDEVINS pDevIns, void * pPtr)
72{
73#ifdef VBOX_WITH_DYNAMIC_DSDT
74 return cleanupDynamicDsdt(pDevIns, pPtr);
75#else
76 /* Do nothing */
77 return 0;
78#endif
79}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette