View | Details | Raw Unified | Return to bug 196650
Collapse All | Expand All

(-)sys/amd64/amd64/machdep.c (+16 lines)
Lines 1521-1526 Link Here
1521
SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0,
1521
SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0,
1522
    "System firmware boot method");
1522
    "System firmware boot method");
1523
1523
1524
#define	PAGES_PER_GB	(1024 * 1024 * 1024 / PAGE_SIZE)
1525
1524
/*
1526
/*
1525
 * Populate the (physmap) array with base/bound pairs describing the
1527
 * Populate the (physmap) array with base/bound pairs describing the
1526
 * available physical memory in the system, then test this memory and
1528
 * available physical memory in the system, then test this memory and
Lines 1541-1546 Link Here
1541
	struct bios_smap *smapbase;
1543
	struct bios_smap *smapbase;
1542
	struct efi_map_header *efihdr;
1544
	struct efi_map_header *efihdr;
1543
	quad_t dcons_addr, dcons_size;
1545
	quad_t dcons_addr, dcons_size;
1546
	int page_counter;
1544
1547
1545
	bzero(physmap, sizeof(physmap));
1548
	bzero(physmap, sizeof(physmap));
1546
	basemem = 0;
1549
	basemem = 0;
Lines 1651-1656 Link Here
1651
	 * physmap is in bytes, so when converting to page boundaries,
1654
	 * physmap is in bytes, so when converting to page boundaries,
1652
	 * round up the start address and round down the end address.
1655
	 * round up the start address and round down the end address.
1653
	 */
1656
	 */
1657
	page_counter = 0;
1658
	if (memtest != 0)
1659
		printf("Testing system memory");
1654
	for (i = 0; i <= physmap_idx; i += 2) {
1660
	for (i = 0; i <= physmap_idx; i += 2) {
1655
		vm_paddr_t end;
1661
		vm_paddr_t end;
1656
1662
Lines 1681-1686 Link Here
1681
				goto skip_memtest;
1687
				goto skip_memtest;
1682
1688
1683
			/*
1689
			/*
1690
			 * Print a "." every GB to show we're making
1691
			 * progress.
1692
			 */
1693
			page_counter++;
1694
			if ((page_counter % PAGES_PER_GB) == 0)
1695
				printf(".");
1696
1697
			/*
1684
			 * map page into kernel: valid, read/write,non-cacheable
1698
			 * map page into kernel: valid, read/write,non-cacheable
1685
			 */
1699
			 */
1686
			*pte = pa | PG_V | PG_RW | PG_NC_PWT | PG_NC_PCD;
1700
			*pte = pa | PG_V | PG_RW | PG_NC_PWT | PG_NC_PCD;
Lines 1767-1772 Link Here
1767
	}
1781
	}
1768
	*pte = 0;
1782
	*pte = 0;
1769
	invltlb();
1783
	invltlb();
1784
	if (memtest != 0)
1785
		printf("\n");
1770
1786
1771
	/*
1787
	/*
1772
	 * XXX
1788
	 * XXX

Return to bug 196650