3 #define HT_INIT_CONTROL 0x6c
5 #define HTIC_ColdR_Detect (1<<4)
6 #define HTIC_BIOSR_Detect (1<<5)
7 #define HTIC_INIT_Detect (1<<6)
10 static int cpu_init_detected(void)
17 htic = pci_read_config32(PCI_DEV(0, 0x18, 0), HT_INIT_CONTROL);
19 print_debug("htic: ");
20 print_debug_hex32(htic);
23 if (!(htic & HTIC_ColdR_Detect)) {
24 print_debug("Cold Reset.\r\n");
26 if ((htic & HTIC_ColdR_Detect) && !(htic & HTIC_BIOSR_Detect)) {
27 print_debug("BIOS generated Reset.\r\n");
29 if (htic & HTIC_INIT_Detect) {
30 print_debug("Init event.\r\n");
33 cpu_init = (htic & HTIC_INIT_Detect);
37 static void distinguish_cpu_resets(unsigned node_id)
41 device = PCI_DEV(0, 0x18 + node_id, 0);
42 htic = pci_read_config32(device, HT_INIT_CONTROL);
43 htic |= HTIC_ColdR_Detect | HTIC_BIOSR_Detect | HTIC_INIT_Detect;
44 pci_write_config32(device, HT_INIT_CONTROL, htic);