Changeset babcb148 in mainline for arch/ia32/src/smp/mp.c
- Timestamp:
- 2005-04-27T21:19:42Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 10a2e22
- Parents:
- 434f700
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/smp/mp.c
r434f700 rbabcb148 129 129 void mp_init(void) 130 130 { 131 __address addr, frame; 132 int cnt, n; 133 134 135 /* 136 * EBDA can be undefined. In that case addr would be 0. 137 */ 138 addr = ebda; 139 if (addr) { 140 cnt = 1024; 141 while (addr = __u32_search(addr,cnt,FS_SIGNATURE)) { 142 if (mp_fs_check((__u8 *) addr)) 131 __u8 *addr[2] = { NULL, (__u8 *) 0xf0000 }; 132 int i, j, length[2] = { 1024, 64*1024 }; 133 134 135 /* 136 * Find MP Floating Pointer Structure 137 * 1a. search first 1K of EBDA 138 * 1b. if EBDA is undefined, search last 1K of base memory 139 * 2. search 64K starting at 0xf0000 140 */ 141 142 addr[0] = (__u8 *) (ebda ? ebda : 639 * 1024); 143 for (i = 0; i < 2; i++) { 144 for (j = 0; j < length[i]; j += 16) { 145 if (*((__u32 *) &addr[i][j]) == FS_SIGNATURE && mp_fs_check(&addr[i][j])) { 146 fs = (struct __mpfs *) &addr[i][j]; 143 147 goto fs_found; 144 addr++; 145 cnt--; 146 } 147 } 148 else { 149 /* 150 * Second place where the MP Floating Pointer Structure may live is the last 151 * kilobyte of base memory. 152 */ 153 addr = 639*1024; 154 cnt = 1024; 155 while (addr = __u32_search(addr,cnt,FS_SIGNATURE)) { 156 if (mp_fs_check((__u8 *) addr)) 157 goto fs_found; 158 addr++; 159 cnt--; 160 } 161 } 162 163 /* 164 * As the last resort, MP Floating Pointer Structure is searched in the BIOS 165 * ROM. 166 */ 167 addr = 0xf0000; 168 cnt = 64*1024; 169 while (addr = __u32_search(addr,cnt,FS_SIGNATURE)) { 170 if (mp_fs_check((__u8 *) addr)) 171 goto fs_found; 172 addr++; 173 cnt--; 148 } 149 } 174 150 } 175 151 … … 177 153 178 154 fs_found: 179 printf("%L: MP Floating Pointer Structure\n", addr); 180 181 fs = (struct __mpfs *) addr; 155 printf("%L: MP Floating Pointer Structure\n", fs); 156 182 157 frame_not_free((__address) fs); 183 158 184 159 if (fs->config_type == 0 && fs->configuration_table) { 185 160 if (fs->mpfib2 >> 7) {
Note:
See TracChangeset
for help on using the changeset viewer.