Lines Matching defs:physmap
749 add_physmap_entry(uint64_t base, uint64_t length, vm_paddr_t *physmap,
785 if (base < physmap[i + 1]) {
786 if (base + length <= physmap[i]) {
798 if (insert_idx <= physmap_idx && base + length == physmap[insert_idx]) {
799 physmap[insert_idx] = base;
804 if (insert_idx > 0 && base == physmap[insert_idx - 1]) {
805 physmap[insert_idx - 1] += length;
822 physmap[i] = physmap[i - 2];
823 physmap[i + 1] = physmap[i - 1];
827 physmap[insert_idx] = base;
828 physmap[insert_idx + 1] = base + length;
833 add_smap_entry(struct bios_smap *smap, vm_paddr_t *physmap, int *physmap_idxp)
842 return (add_physmap_entry(smap->base, smap->length, physmap,
847 add_smap_entries(struct bios_smap *smapbase, vm_paddr_t *physmap,
863 if (!add_smap_entry(smap, physmap, physmap_idxp))
881 * Populate the (physmap) array with base/bound pairs describing the
898 vm_paddr_t physmap[PHYS_AVAIL_ENTRIES];
909 bzero(physmap, sizeof(physmap));
929 add_smap_entries(smapbase, physmap, &physmap_idx);
967 if (!add_smap_entry(smap, physmap, &physmap_idx))
978 if (physmap[i] == 0x00000000) {
979 basemem = physmap[i + 1] / 1024;
990 if (physmap[1] != 0)
1034 physmap[0] = 0;
1035 physmap[1] = basemem * 1024;
1037 physmap[physmap_idx] = 0x100000;
1038 physmap[physmap_idx + 1] = physmap[physmap_idx] + extmem * 1024;
1042 * Now, physmap contains a map of physical memory.
1047 alloc_ap_trampoline(physmap, &physmap_idx);
1059 Maxmem = atop(physmap[physmap_idx + 1]);
1072 if (has_smap && Maxmem > atop(physmap[physmap_idx + 1]))
1073 Maxmem = atop(physmap[physmap_idx + 1]);
1087 if (atop(physmap[physmap_idx + 1]) != Maxmem &&
1095 if (atop(physmap[physmap_idx + 1]) < Maxmem)
1096 physmap[physmap_idx + 1] = ptoa((vm_paddr_t)Maxmem);
1104 physmap[0] = PAGE_SIZE; /* mask off page 0 */
1107 phys_avail[pa_indx++] = physmap[0];
1108 phys_avail[pa_indx] = physmap[0];
1109 dump_avail[da_indx] = physmap[0];
1119 * physmap is in bytes, so when converting to page boundaries,
1126 if (physmap[i + 1] < end)
1127 end = trunc_page(physmap[i + 1]);
1128 for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) {