i386_module.c revision 82531
138465Smsmith/*- 238465Smsmith * Copyright (c) 1998 Michael Smith <msmith@freebsd.org> 338465Smsmith * All rights reserved. 438465Smsmith * 538465Smsmith * Redistribution and use in source and binary forms, with or without 638465Smsmith * modification, are permitted provided that the following conditions 738465Smsmith * are met: 838465Smsmith * 1. Redistributions of source code must retain the above copyright 938465Smsmith * notice, this list of conditions and the following disclaimer. 1038465Smsmith * 2. Redistributions in binary form must reproduce the above copyright 1138465Smsmith * notice, this list of conditions and the following disclaimer in the 1238465Smsmith * documentation and/or other materials provided with the distribution. 1338465Smsmith * 1438465Smsmith * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1538465Smsmith * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1638465Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1738465Smsmith * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1838465Smsmith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1938465Smsmith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2038465Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2138465Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2238465Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2338465Smsmith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2438465Smsmith * SUCH DAMAGE. 2538465Smsmith * 2650477Speter * $FreeBSD: head/sys/boot/i386/libi386/i386_module.c 82531 2001-08-30 00:42:12Z msmith $ 2738465Smsmith */ 2838465Smsmith 2938465Smsmith/* 3038465Smsmith * i386-specific module functionality. 3138465Smsmith * 3238465Smsmith */ 3338465Smsmith 3438465Smsmith#include <stand.h> 3538465Smsmith#include <string.h> 3638465Smsmith 3738465Smsmith#include "bootstrap.h" 3838465Smsmith#include "libi386.h" 3938465Smsmith 4038465Smsmith/* 4138465Smsmith * Use voodoo to load modules required by current hardware. 4238465Smsmith */ 4338465Smsmithint 4438465Smsmithi386_autoload(void) 4538465Smsmith{ 4682531Smsmith int error; 4782531Smsmith 4838465Smsmith /* XXX use PnP to locate stuff here */ 4982531Smsmith 5082531Smsmith /* autoload ACPI support */ 5182531Smsmith /* XXX should be in 4th keyed off acpi_load */ 5282531Smsmith if ((getenv("acpi_load") && !getenv("hint.acpi.0.disable"))) { 5382531Smsmith error = mod_load("acpi", 0, NULL); 5482531Smsmith if (error != 0) 5582531Smsmith printf("ACPI autoload failed - %s\n", strerror(error)); 5682531Smsmith } 5782531Smsmith 5838465Smsmith return(0); 5938465Smsmith} 60