158f07778SDavid Daney /***********************license start***************
258f07778SDavid Daney  * Author: Cavium Networks
358f07778SDavid Daney  *
458f07778SDavid Daney  * Contact: support@caviumnetworks.com
558f07778SDavid Daney  * This file is part of the OCTEON SDK
658f07778SDavid Daney  *
758f07778SDavid Daney  * Copyright (c) 2003-2008 Cavium Networks
858f07778SDavid Daney  *
958f07778SDavid Daney  * This file is free software; you can redistribute it and/or modify
1058f07778SDavid Daney  * it under the terms of the GNU General Public License, Version 2, as
1158f07778SDavid Daney  * published by the Free Software Foundation.
1258f07778SDavid Daney  *
1358f07778SDavid Daney  * This file is distributed in the hope that it will be useful, but
1458f07778SDavid Daney  * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
1558f07778SDavid Daney  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
1658f07778SDavid Daney  * NONINFRINGEMENT.  See the GNU General Public License for more
1758f07778SDavid Daney  * details.
1858f07778SDavid Daney  *
1958f07778SDavid Daney  * You should have received a copy of the GNU General Public License
2058f07778SDavid Daney  * along with this file; if not, write to the Free Software
2158f07778SDavid Daney  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2258f07778SDavid Daney  * or visit http://www.gnu.org/licenses/.
2358f07778SDavid Daney  *
2458f07778SDavid Daney  * This file may also be available under a different license from Cavium.
2558f07778SDavid Daney  * Contact Cavium Networks for more information
2658f07778SDavid Daney  ***********************license end**************************************/
2758f07778SDavid Daney 
2858f07778SDavid Daney /*
2958f07778SDavid Daney  * This module provides system/board/application information obtained
3058f07778SDavid Daney  * by the bootloader.
3158f07778SDavid Daney  */
3226dd3e4fSPaul Gortmaker #include <linux/export.h>
3358f07778SDavid Daney 
3458f07778SDavid Daney #include <asm/octeon/cvmx.h>
3558f07778SDavid Daney #include <asm/octeon/cvmx-sysinfo.h>
3658f07778SDavid Daney 
3758546e3bSDavid Daney /*
3858f07778SDavid Daney  * This structure defines the private state maintained by sysinfo module.
3958f07778SDavid Daney  */
4058546e3bSDavid Daney static struct cvmx_sysinfo sysinfo;	   /* system information */
4158f07778SDavid Daney 
4258f07778SDavid Daney /*
4358546e3bSDavid Daney  * Returns the application information as obtained
4458f07778SDavid Daney  * by the bootloader.  This provides the core mask of the cores
4558f07778SDavid Daney  * running the same application image, as well as the physical
4658f07778SDavid Daney  * memory regions available to the core.
4758f07778SDavid Daney  */
cvmx_sysinfo_get(void)4858f07778SDavid Daney struct cvmx_sysinfo *cvmx_sysinfo_get(void)
4958f07778SDavid Daney {
5058546e3bSDavid Daney 	return &sysinfo;
5158f07778SDavid Daney }
523e903bd9SDavid Daney EXPORT_SYMBOL(cvmx_sysinfo_get);
5358f07778SDavid Daney 
54