Upgraded GRUB2 to 2.00 release.
[AROS.git] / arch / all-pc / boot / grub2-aros / include / grub / mips / loongson.h
blobe6f0241f2d53963454890e79923f89c755f0ec8c
1 /*
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2010 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_LOONGSON_CPU_HEADER
20 #define GRUB_LOONGSON_CPU_HEADER 1
22 #include <grub/cpu/mips.h>
24 #define GRUB_CPU_LOONGSON_FLASH_START 0xbfc00000
25 #define GRUB_CPU_LOONGSON_FLASH_TLB_REFILL 0xbfc00200
26 #define GRUB_CPU_LOONGSON_FLASH_CACHE_ERROR 0xbfc00300
27 #define GRUB_CPU_LOONGSON_FLASH_OTHER_EXCEPTION 0xbfc00380
29 #define GRUB_CPU_LOONGSON_DDR2_BASE 0xaffffe00
30 #define GRUB_CPU_LOONGSON_DDR2_REG1_HI_8BANKS 0x00000001
31 #define GRUB_CPU_LOONGSON_DDR2_REG_SIZE 0x8
32 #define GRUB_CPU_LOONGSON_DDR2_REG_STEP 0x10
34 #define GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG GRUB_CPU_REGISTER_WRAP($16)
35 #define GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG_ILINESIZE 0x10
36 #define GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG_DLINESIZE 0x8
37 #define GRUB_CPU_LOONGSON_COP0_CACHE_DSIZE_SHIFT 6
38 #define GRUB_CPU_LOONGSON_COP0_CACHE_ISIZE_SHIFT 9
39 #define GRUB_CPU_LOONGSON_COP0_CACHE_SIZE_MASK 0x7
40 #define GRUB_CPU_LOONGSON_COP0_CACHE_SIZE_OFFSET 12
42 #define GRUB_CPU_LOONGSON_COP0_I_INDEX_INVALIDATE 0
43 #define GRUB_CPU_LOONGSON_COP0_D_INDEX_TAG_STORE 9
44 #define GRUB_CPU_LOONGSON_COP0_S_INDEX_TAG_STORE 11
46 #define GRUB_CPU_LOONGSON_COP0_I_INDEX_BIT_OFFSET 5
47 #define GRUB_CPU_LOONGSON_COP0_D_INDEX_BIT_OFFSET 5
48 #define GRUB_CPU_LOONGSON_COP0_S_INDEX_BIT_OFFSET 5
50 #define GRUB_CPU_LOONGSON_CACHE_ACCELERATED 7
51 #define GRUB_CPU_LOONGSON_CACHE_UNCACHED 2
52 #define GRUB_CPU_LOONGSON_CACHE_CACHED 3
53 #define GRUB_CPU_LOONGSON_CACHE_TYPE_MASK 7
54 #define GRUB_CPU_LOONGSON_CACHE_LINE_SIZE_LOG_SMALL 4
55 #define GRUB_CPU_LOONGSON_CACHE_LINE_SIZE_LOG_BIG 5
56 #define GRUB_CPU_LOONGSON_CACHE_LINE_SIZE_SMALL 16
57 #define GRUB_CPU_LOONGSON_CACHE_LINE_SIZE_BIG 32
59 #define GRUB_CPU_LOONGSON_I_CACHE_LOG_WAYS 2
60 #define GRUB_CPU_LOONGSON_D_CACHE_LOG_WAYS 2
61 #define GRUB_CPU_LOONGSON_S_CACHE_LOG_WAYS 2
63 /* FIXME: determine dynamically. */
64 #define GRUB_CPU_LOONGSON_SECONDARY_CACHE_LOG_SIZE 19
66 #define GRUB_CPU_LOONGSON_COP0_BADVADDR GRUB_CPU_REGISTER_WRAP($8)
67 #define GRUB_CPU_LOONGSON_COP0_CAUSE GRUB_CPU_REGISTER_WRAP($13)
68 #define GRUB_CPU_LOONGSON_COP0_EPC GRUB_CPU_REGISTER_WRAP($14)
69 #define GRUB_CPU_LOONGSON_COP0_PRID GRUB_CPU_REGISTER_WRAP($15)
70 #define GRUB_CPU_LOONGSON_COP0_CACHE_TAGLO GRUB_CPU_REGISTER_WRAP($28)
71 #define GRUB_CPU_LOONGSON_COP0_CACHE_TAGHI GRUB_CPU_REGISTER_WRAP($29)
73 #define GRUB_CPU_LOONGSON_LIOCFG 0xbfe00108
74 #define GRUB_CPU_LOONGSON_ROM_DELAY_OFFSET 2
75 #define GRUB_CPU_LOONGSON_ROM_DELAY_MASK 0x1f
76 #define GRUB_CPU_LOONGSON_CORECFG 0xbfe00180
77 #define GRUB_CPU_LOONGSON_CORECFG_DISABLE_DDR2_SPACE 0x100
78 #define GRUB_CPU_LOONGSON_CORECFG_BUFFER_CPU 0x200
80 #define GRUB_CPU_LOONGSON_PCI_HIT1_SEL_LO 0xbfe00150
81 #define GRUB_CPU_LOONGSON_PCI_HIT1_SEL_HI 0xbfe00154
83 #define GRUB_CPU_LOONGSON_GPIOCFG 0xbfe00120
84 #define GRUB_CPU_YEELOONG_SHUTDOWN_GPIO 1
86 #endif