11.7Sandvar/* $NetBSD: OsdEnvironment.c,v 1.7 2021/08/21 23:00:31 andvar Exp $ */ 21.1Skochi 31.1Skochi/* 41.1Skochi * Copyright 2001 Wasabi Systems, Inc. 51.1Skochi * All rights reserved. 61.1Skochi * 71.1Skochi * Written by Jason R. Thorpe for Wasabi Systems, Inc. 81.1Skochi * 91.1Skochi * Redistribution and use in source and binary forms, with or without 101.1Skochi * modification, are permitted provided that the following conditions 111.1Skochi * are met: 121.1Skochi * 1. Redistributions of source code must retain the above copyright 131.1Skochi * notice, this list of conditions and the following disclaimer. 141.1Skochi * 2. Redistributions in binary form must reproduce the above copyright 151.1Skochi * notice, this list of conditions and the following disclaimer in the 161.1Skochi * documentation and/or other materials provided with the distribution. 171.1Skochi * 3. All advertising materials mentioning features or use of this software 181.1Skochi * must display the following acknowledgement: 191.1Skochi * This product includes software developed for the NetBSD Project by 201.1Skochi * Wasabi Systems, Inc. 211.1Skochi * 4. The name of Wasabi Systems, Inc. may not be used to endorse 221.1Skochi * or promote products derived from this software without specific prior 231.1Skochi * written permission. 241.1Skochi * 251.1Skochi * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 261.1Skochi * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 271.1Skochi * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 281.1Skochi * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 291.1Skochi * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 301.1Skochi * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 311.1Skochi * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 321.1Skochi * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 331.1Skochi * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 341.1Skochi * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 351.1Skochi * POSSIBILITY OF SUCH DAMAGE. 361.1Skochi */ 371.1Skochi 381.1Skochi/* 391.1Skochi * OS Services Layer 401.1Skochi * 411.1Skochi * 6.1: Environmental support. 421.1Skochi */ 431.1Skochi 441.1Skochi#include <sys/cdefs.h> 451.7Sandvar__KERNEL_RCSID(0, "$NetBSD: OsdEnvironment.c,v 1.7 2021/08/21 23:00:31 andvar Exp $"); 461.1Skochi 471.1Skochi#include <sys/types.h> 481.1Skochi 491.1Skochi#include <dev/acpi/acpica.h> 501.1Skochi#include <dev/acpi/acpivar.h> 511.1Skochi#include <dev/acpi/acpi_osd.h> 521.1Skochi 531.1Skochi#include <machine/acpi_machdep.h> 541.1Skochi 551.1Skochi#define _COMPONENT ACPI_OS_SERVICES 561.6SjruohoACPI_MODULE_NAME ("ENVIRONMENT"); 571.1Skochi 581.1Skochi/* 591.1Skochi * AcpiOsInitialize: 601.1Skochi * 611.1Skochi * Initialize the OSL subsystem. 621.1Skochi */ 631.1SkochiACPI_STATUS 641.1SkochiAcpiOsInitialize(void) 651.1Skochi{ 661.1Skochi /* Initialize the Osd Scheduler. */ 671.1Skochi acpi_osd_sched_init(); 681.1Skochi 691.4Sjmcneill return acpi_md_OsInitialize(); 701.1Skochi} 711.1Skochi 721.1Skochi/* 731.1Skochi * AcpiOsTerminate: 741.1Skochi * 751.1Skochi * Terminate the OSL subsystem. 761.1Skochi */ 771.1SkochiACPI_STATUS 781.1SkochiAcpiOsTerminate(void) 791.1Skochi{ 801.6Sjruoho return AE_OK; 811.1Skochi} 821.1Skochi 831.1Skochi/* 841.1Skochi * AcpiOsGetRootPointer: 851.1Skochi * 861.7Sandvar * Obtain the Root ACPI table pointer (RSDP) 871.1Skochi */ 881.2SjmcneillACPI_PHYSICAL_ADDRESS 891.2SjmcneillAcpiOsGetRootPointer(void) 901.1Skochi{ 911.2Sjmcneill return acpi_OsGetRootPointer(); 921.1Skochi} 93