+++ /dev/null
-/* $NetBSD: sal.h,v 1.1 2006/04/07 14:21:18 cherry Exp $ */\r
-\r
-/*-\r
- * Copyright (c) 2001 Doug Rabson\r
- * All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions\r
- * are met:\r
- * 1. Redistributions of source code must retain the above copyright\r
- * notice, this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright\r
- * notice, this list of conditions and the following disclaimer in the\r
- * documentation and/or other materials provided with the distribution.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\r
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\r
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
- * SUCH DAMAGE.\r
- *\r
- * $FreeBSD$\r
- */\r
-\r
-#ifndef _MACHINE_SAL_H_\r
-#define _MACHINE_SAL_H_\r
-\r
-struct sal_system_table {\r
- char sal_signature[4];\r
-#define SAL_SIGNATURE "SST_"\r
- u_int32_t sal_length;\r
- u_int8_t sal_rev[2];\r
- u_int16_t sal_entry_count;\r
- u_int8_t sal_checksum;\r
- u_int8_t sal_reserved1[7];\r
- u_int8_t sal_a_version[2];\r
- u_int8_t sal_b_version[2];\r
- char sal_oem_id[32];\r
- char sal_product_id[32];\r
- u_int8_t sal_reserved2[8];\r
-};\r
-\r
-struct sal_entrypoint_descriptor {\r
- u_int8_t sale_type; /* == 0 */\r
- u_int8_t sale_reserved1[7];\r
- u_int64_t sale_pal_proc;\r
- u_int64_t sale_sal_proc;\r
- u_int64_t sale_sal_gp;\r
- u_int8_t sale_reserved2[16];\r
-};\r
-\r
-struct sal_memory_descriptor {\r
- u_int8_t sale_type; /* == 1 */\r
- u_int8_t sale_need_virtual;\r
- u_int8_t sale_current_attribute;\r
- u_int8_t sale_access_rights;\r
- u_int8_t sale_supported_attributes;\r
- u_int8_t sale_reserved1;\r
- u_int8_t sale_memory_type[2];\r
- u_int64_t sale_physical_address;\r
- u_int32_t sale_length;\r
- u_int8_t sale_reserved2[12];\r
-};\r
-\r
-struct sal_platform_descriptor {\r
- u_int8_t sale_type; /* == 2 */\r
- u_int8_t sale_features;\r
- u_int8_t sale_reserved[14];\r
-};\r
-\r
-struct sal_tr_descriptor {\r
- u_int8_t sale_type; /* == 3 */\r
- u_int8_t sale_register_type;\r
- u_int8_t sale_register_number;\r
- u_int8_t sale_reserved1[5];\r
- u_int64_t sale_virtual_address;\r
- u_int64_t sale_page_size;\r
- u_int8_t sale_reserved2[8];\r
-};\r
-\r
-struct sal_ptc_cache_descriptor {\r
- u_int8_t sale_type; /* == 4 */\r
- u_int8_t sale_reserved[3];\r
- u_int32_t sale_domains;\r
- u_int64_t sale_address;\r
-};\r
-\r
-struct sal_ap_wakeup_descriptor {\r
- u_int8_t sale_type; /* == 5 */\r
- u_int8_t sale_mechanism;\r
- u_int8_t sale_reserved[6];\r
- u_int64_t sale_vector;\r
-};\r
-\r
-/*\r
- * SAL Procedure numbers.\r
- */\r
-\r
-#define SAL_SET_VECTORS 0x01000000\r
-#define SAL_GET_STATE_INFO 0x01000001\r
-#define SAL_GET_STATE_INFO_SIZE 0x01000002\r
-#define SAL_CLEAR_STATE_INFO 0x01000003\r
-#define SAL_MC_RENDEZ 0x01000004\r
-#define SAL_MC_SET_PARAMS 0x01000005\r
-#define SAL_REGISTER_PHYSICAL_ADDR 0x01000006\r
-#define SAL_CACHE_FLUSH 0x01000008\r
-#define SAL_CACHE_INIT 0x01000009\r
-#define SAL_PCI_CONFIG_READ 0x01000010\r
-#define SAL_PCI_CONFIG_WRITE 0x01000011\r
-#define SAL_FREQ_BASE 0x01000012\r
-#define SAL_UPDATE_PAL 0x01000020\r
-\r
-/* SAL_SET_VECTORS event handler types */\r
-#define SAL_OS_MCA 0\r
-#define SAL_OS_INIT 1\r
-#define SAL_OS_BOOT_RENDEZ 2\r
-\r
-/* SAL_GET_STATE_INFO, SAL_GET_STATE_INFO_SIZE types */\r
-#define SAL_INFO_MCA 0\r
-#define SAL_INFO_INIT 1\r
-#define SAL_INFO_CMC 2\r
-#define SAL_INFO_CPE 3\r
-#define SAL_INFO_TYPES 4 /* number of types we know about */\r
-\r
-struct ia64_sal_result {\r
- int64_t sal_status;\r
- u_int64_t sal_result[3];\r
-};\r
-\r
-typedef struct ia64_sal_result sal_entry_t\r
- (u_int64_t, u_int64_t, u_int64_t, u_int64_t,\r
- u_int64_t, u_int64_t, u_int64_t, u_int64_t);\r
-\r
-extern sal_entry_t *ia64_sal_entry;\r
-\r
-extern void ia64_sal_init(void);\r
-\r
-#endif /* _MACHINE_SAL_H_ */\r