srat.c (242b24828472137ec4411826b86e753d49bd2c39) | srat.c (5ab0f0c3f01579a2fc9f102e4a5956e1bcb233ef) |
---|---|
1/*- 2 * Copyright (c) 2010 Hudson River Trading LLC 3 * Written by: John H. Baldwin <jhb@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 215 unchanged lines hidden (view full) --- 224 ("Duplicate local APIC ID %u", x2apic->ApicId)); 225 cpus[x2apic->ApicId].domain = x2apic->ProximityDomain; 226 cpus[x2apic->ApicId].enabled = 1; 227 break; 228 case ACPI_SRAT_TYPE_MEMORY_AFFINITY: 229 mem = (ACPI_SRAT_MEM_AFFINITY *)entry; 230 if (bootverbose) 231 printf( | 1/*- 2 * Copyright (c) 2010 Hudson River Trading LLC 3 * Written by: John H. Baldwin <jhb@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 215 unchanged lines hidden (view full) --- 224 ("Duplicate local APIC ID %u", x2apic->ApicId)); 225 cpus[x2apic->ApicId].domain = x2apic->ProximityDomain; 226 cpus[x2apic->ApicId].enabled = 1; 227 break; 228 case ACPI_SRAT_TYPE_MEMORY_AFFINITY: 229 mem = (ACPI_SRAT_MEM_AFFINITY *)entry; 230 if (bootverbose) 231 printf( |
232 "SRAT: Found memory domain %d addr %jx len %jx: %s\n", | 232 "SRAT: Found memory domain %d addr 0x%jx len 0x%jx: %s\n", |
233 mem->ProximityDomain, (uintmax_t)mem->BaseAddress, 234 (uintmax_t)mem->Length, 235 (mem->Flags & ACPI_SRAT_MEM_ENABLED) ? 236 "enabled" : "disabled"); 237 if (!(mem->Flags & ACPI_SRAT_MEM_ENABLED)) 238 break; 239 if (!overlaps_phys_avail(mem->BaseAddress, 240 mem->BaseAddress + mem->Length)) { | 233 mem->ProximityDomain, (uintmax_t)mem->BaseAddress, 234 (uintmax_t)mem->Length, 235 (mem->Flags & ACPI_SRAT_MEM_ENABLED) ? 236 "enabled" : "disabled"); 237 if (!(mem->Flags & ACPI_SRAT_MEM_ENABLED)) 238 break; 239 if (!overlaps_phys_avail(mem->BaseAddress, 240 mem->BaseAddress + mem->Length)) { |
241 printf("SRAT: Ignoring memory at addr %jx\n", | 241 printf("SRAT: Ignoring memory at addr 0x%jx\n", |
242 (uintmax_t)mem->BaseAddress); 243 break; 244 } 245 if (num_mem == VM_PHYSSEG_MAX) { 246 printf("SRAT: Too many memory regions\n"); 247 *(int *)arg = ENXIO; 248 break; 249 } --- 80 unchanged lines hidden (view full) --- 330 phys_avail[j + 1] == 0) { 331 return (0); 332 } 333 address = phys_avail[j]; 334 } else 335 address = mem_info[i].end + 1; 336 } 337 } | 242 (uintmax_t)mem->BaseAddress); 243 break; 244 } 245 if (num_mem == VM_PHYSSEG_MAX) { 246 printf("SRAT: Too many memory regions\n"); 247 *(int *)arg = ENXIO; 248 break; 249 } --- 80 unchanged lines hidden (view full) --- 330 phys_avail[j + 1] == 0) { 331 return (0); 332 } 333 address = phys_avail[j]; 334 } else 335 address = mem_info[i].end + 1; 336 } 337 } |
338 printf("SRAT: No memory region found for %jx - %jx\n", | 338 printf("SRAT: No memory region found for 0x%jx - 0x%jx\n", |
339 (uintmax_t)phys_avail[j], (uintmax_t)phys_avail[j + 1]); 340 return (ENXIO); 341} 342 343/* 344 * Renumber the memory domains to be compact and zero-based if not 345 * already. Returns an error if there are too many domains. 346 */ --- 181 unchanged lines hidden --- | 339 (uintmax_t)phys_avail[j], (uintmax_t)phys_avail[j + 1]); 340 return (ENXIO); 341} 342 343/* 344 * Renumber the memory domains to be compact and zero-based if not 345 * already. Returns an error if there are too many domains. 346 */ --- 181 unchanged lines hidden --- |