| 173 | } |
| 174 | |
| 175 | static int activate_me(void) |
| 176 | { |
| 177 | const uint32_t rcba = get_rcba_phys(); |
| 178 | if (debug) |
| 179 | printf("RCBA addr: 0x%08x\n", rcba); |
| 180 | if (rcba > 0) { |
| 181 | if (read_rcba32(FD2, &fd2)) { |
| 182 | printf("Error reading RCBA\n"); |
| 183 | return 1; |
| 184 | } |
| 185 | if (write_rcba32(FD2, fd2 & ~0x2)) { |
| 186 | printf("Error writing RCBA\n"); |
| 187 | return 1; |
| 188 | } |
| 189 | if (debug && (fd2 & 0x2)) |
| 190 | printf("MEI was hidden on PCI, now unlocked\n"); |
| 191 | else if (debug) |
| 192 | printf("MEI not hidden on PCI, checking if visible\n"); |
| 193 | } |
| 194 | |
| 195 | return 0; |
| 196 | } |
| 197 | |
| 198 | static void rehide_me(void) |
| 199 | { |
no test coverage detected