/*-1* Copyright (c) 2010 Rui Paulo <[email protected]>2* All rights reserved.3*4* Redistribution and use in source and binary forms, with or without5* modification, are permitted provided that the following conditions6* are met:7*8* 1. Redistributions of source code must retain the above copyright9* notice, this list of conditions and the following disclaimer.10* 2. Redistributions in binary form must reproduce the above copyright11* notice, this list of conditions and the following disclaimer in the12* documentation and/or other materials provided with the distribution.13*14* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR15* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES16* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.17* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,18* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT19* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,20* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY21* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT22* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF23* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.24*/2526#if defined(LOADER_FDT_SUPPORT)27#include <sys/param.h>28#include <fdt_platform.h>29#endif3031#include "loader_efi.h"3233int34efi_autoload(void)35{3637#if defined(LOADER_FDT_SUPPORT)38/*39* Setup the FDT early so that we're not loading files during bi_load.40* Any such loading is inherently broken since bi_load uses the space41* just after all currently loaded files for the data that will be42* passed to the kernel and newly loaded files will be positioned in43* that same space.44*45* We're glossing over errors here because LOADER_FDT_SUPPORT does not46* imply that we're on a platform where FDT is a requirement. If we47* fix this, then the error handling here should be fixed accordingly.48*/49if (fdt_is_setup() == 0)50fdt_setup_fdtp();51#endif52return (0);53}545556