| 1 | /* |
| 2 | * ========== Copyright Header Begin ========================================== |
| 3 | * |
| 4 | * OpenSPARC T2 Processor File: l1warm.h |
| 5 | * Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved |
| 6 | * 4150 Network Circle, Santa Clara, California 95054, U.S.A. |
| 7 | * |
| 8 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by |
| 12 | * the Free Software Foundation; version 2 of the License. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU General Public License |
| 20 | * along with this program; if not, write to the Free Software |
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 22 | * |
| 23 | * For the avoidance of doubt, and except that if any non-GPL license |
| 24 | * choice is available it will apply instead, Sun elects to use only |
| 25 | * the General Public License version 2 (GPLv2) at this time for any |
| 26 | * software where a choice of GPL license versions is made |
| 27 | * available with the language indicating that GPLv2 or any later version |
| 28 | * may be used, or where a choice of which version of the GPL is applied is |
| 29 | * otherwise unspecified. |
| 30 | * |
| 31 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
| 32 | * CA 95054 USA or visit www.sun.com if you need additional information or |
| 33 | * have any questions. |
| 34 | * |
| 35 | * |
| 36 | * ========== Copyright Header End ============================================ |
| 37 | */ |
| 38 | #ifndef _L1WARM_H_ |
| 39 | #define _L1WARM_H_ |
| 40 | #include "global.h" |
| 41 | #include "list.h" |
| 42 | #define BANK 4 |
| 43 | #define BANK_NUM 8 |
| 44 | #define ROW_NUM 4 |
| 45 | #define COL_NUM 4 |
| 46 | #define ICACHE_ARG 193 |
| 47 | #define DCACHE_ARG 1 |
| 48 | /*---------------------------------------------------------------------------- |
| 49 | dcache==> |
| 50 | tag[39:110] |
| 51 | index[10:4] |
| 52 | offset[3:0] |
| 53 | |
| 54 | icache=> |
| 55 | tag[39:11] |
| 56 | index[10:5] |
| 57 | offset[4:0] |
| 58 | ----------------------------------------------------------------------------*/ |
| 59 | |
| 60 | #define DCACHE_NUM 8 |
| 61 | static struct l1warm_variables l1warm_vars; |
| 62 | |
| 63 | //routines |
| 64 | long long l1warm_get_long(int loc); |
| 65 | int l1warm_which_cache(); |
| 66 | int l1warm_which_way(KeyType addr); |
| 67 | int l1warm_howmany_cpu(); |
| 68 | void l1warm_core(int num); |
| 69 | int l1warm_even_parity(int data, int num); |
| 70 | int l1warm_even_parityLong(long long data, int num); |
| 71 | void l1warm_slam_idirectory(KeyType addr); |
| 72 | void l1warm_slam_ddirectory(KeyType addr); |
| 73 | void l1warm_slam_tag(int word, int size); |
| 74 | void l1warm_slam_dataLong(long long word, int size); |
| 75 | void l1warm_slam_data(char* word, int size); |
| 76 | long long l1warm_make_icache_data(int word); |
| 77 | int l1warm_predecoder(int inst); |
| 78 | int l1warm_get_word(char*data, int num); |
| 79 | void l1warm_slam_dcache(KeyType addr,char* data, int num); |
| 80 | void l1warm_slam_icache(KeyType addr,char* data, int num); |
| 81 | void l1warm_find_location(int idx, int* vld); |
| 82 | int l1warm_copy(char* buf, char* cbuf, int idx); |
| 83 | long long l1warm_getEight(char *buf); |
| 84 | void l1warm_slam_l1idata(KeyType addr, char* data, int num); |
| 85 | void l1warm_slam_l1ddata(KeyType addr, char* data, int num); |
| 86 | void l1warm_slam_ionly(KeyType addr, char* data); |
| 87 | void l1warm_slam_donly(KeyType addr, char* data); |
| 88 | int l1warm_islam(KeyType addr, char* data); |
| 89 | int l1warm_dslam(KeyType addr, char* data); |
| 90 | |
| 91 | void l1warm_init(); |
| 92 | void l1warm_option(); |
| 93 | void l1warm_set(); |
| 94 | void l1warm_set_cpu(); |
| 95 | int l1warm_slam(KeyType addr, char* data, int l2way); |
| 96 | void l1warm_store_parityValidAddr(); |
| 97 | void l1warm_clean_valid(); |
| 98 | void l1warm_clean_dir(); |
| 99 | void l1warm_clean_dirvld(); |
| 100 | void l1warm_get_Mode(KeyType* addr); |
| 101 | |
| 102 | #endif |