From nobody Thu Mar 10 10:44:17 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B5FD619F2023; Thu, 10 Mar 2022 10:44:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KDm013l0Mz4pZw; Thu, 10 Mar 2022 10:44:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646909057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KXfiNvZzi366xjuRHlxdqGbaY0gWiFa50vOAiTrnFnk=; b=UU/w0L+pXP72fMhVckS4BKKnX/5NyLGAdvB5c4CH5A03+K3mx5p8FJ0K/XrAxgMNINrR7v LK4W+So1KOuIIc3PrZJvisJG6QvpSlCzJHXdQCj/tDXlcrztoxK32ORLxZzitMCoEpdoFl t5L2KZRVMiyB5A+lGaq8iong8X6GeywkQNHLrfSHcTi+A0cjdwQIHkPoj8eo92U9spW6kX dQGFMpDMFOANF6hC/AETSjAJw06gwAEHYNvcxrzNL8FvTXkER3oSMWw/ABym5EtR2qYY2S AC3dVwQms3YSyfn3tsBPmYFs3RgSJYCGkcPq0He7Dt7m0h0FWfIUyL5SoCvg2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5EEF52364A; Thu, 10 Mar 2022 10:44:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22AAiHaq077510; Thu, 10 Mar 2022 10:44:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22AAiHOB077509; Thu, 10 Mar 2022 10:44:17 GMT (envelope-from git) Date: Thu, 10 Mar 2022 10:44:17 GMT Message-Id: <202203101044.22AAiHOB077509@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 9cf15aefb9d6 - main - Fix the spelling of EFI_PAGE_SIZE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cf15aefb9d6f97687ae4a497917be36ac125558 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646909057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KXfiNvZzi366xjuRHlxdqGbaY0gWiFa50vOAiTrnFnk=; b=I+Wt6s8tBPnDGnYYHnOUnAfTOPdI/HmXxdjJZ1ASEW6/DWeaqibNuVGuvn5+CHf7kbumWd LWsXZwfpuG0kSMhTf9uIZ69HSa6eSMrzr/Nzj1NwqgJZylLbonbfZUi3N4bQOoYNaRTf3z Wa85LMCFrHLw5cIFYnKbGNIFNuBj35hzyk9JOQy/1nKduH0p7S4Y1Ha+bkqcGJipksQQnC 2eBHlxavqEbEXClSeoHdjkK72GCkqcE9Z6Ay4M4tlpEsG/Ppf+ex2ohyn+SZ/rTRMdEwRC fdHQM3XfbzzgZnS+oXSi6M3QywJ58Zd8VpbIMxSpGQ5Etu8ddiJb2tG95sUUNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646909057; a=rsa-sha256; cv=none; b=CTFUgun26SSpnIOlEIZwgdwYj93sczSjaILE7WxMIJhiKjY7cMjpgUxqY4bH73XW1VjqtK lcWlrmg5obzkQZWXmVakNnOAW+eTYBDEikZprSoRyZXvSZye85lHGA7tskZ0mV2K4YGBtj 7AOpw/NalVSpFc/2me6WDr6ZTLRrysoUPmp8u/eJsHBS0gLSUINUhrTlq+XgG0eSP2SCs0 2zoin8nBWU0DBpHga90wbTzA+ar5aUua7a2CVufecgYcjq4EoADVe89pGGAUMThRrQa14h j3R6Iv0JC+DXcTRWKnzYyCQlKgMIpoS5AbYKtubUs3+IMjweMZ95hFjWVJZ28g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=9cf15aefb9d6f97687ae4a497917be36ac125558 commit 9cf15aefb9d6f97687ae4a497917be36ac125558 Author: Andrew Turner AuthorDate: 2022-03-09 12:59:01 +0000 Commit: Andrew Turner CommitDate: 2022-03-10 10:43:54 +0000 Fix the spelling of EFI_PAGE_SIZE We assume EFI_PAGE_SIZE is the same as PAGE_SIZE, however this may not be the case. Use the former when working with a list of pages from the UEFI firmware so the correct size is used. This will be needed on arm64 where PAGE_SIZE could be 16k or 64k in the future. The other architectures have been updated to be consistent. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34510 --- sys/amd64/amd64/machdep.c | 2 +- sys/arm/arm/machdep_boot.c | 2 +- sys/arm64/arm64/machdep.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 22a3eecbbb3d..b7810440a551 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -816,7 +816,7 @@ add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, continue; } - if (!add_physmap_entry(p->md_phys, (p->md_pages * PAGE_SIZE), + if (!add_physmap_entry(p->md_phys, p->md_pages * EFI_PAGE_SIZE, physmap, physmap_idx)) break; } diff --git a/sys/arm/arm/machdep_boot.c b/sys/arm/arm/machdep_boot.c index 332e9beb091e..ebdd761bfed3 100644 --- a/sys/arm/arm/machdep_boot.c +++ b/sys/arm/arm/machdep_boot.c @@ -490,7 +490,7 @@ arm_add_efi_map_entries(struct efi_map_header *efihdr, struct mem_region *mr, break; mr[j].mr_start = p->md_phys; - mr[j].mr_size = p->md_pages * PAGE_SIZE; + mr[j].mr_size = p->md_pages * EFI_PAGE_SIZE; memory_size += mr[j].mr_size; } diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 0e4aa657bb13..b673a38ee385 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -469,7 +469,7 @@ exclude_efi_map_entry(struct efi_md *p) */ break; default: - physmem_exclude_region(p->md_phys, p->md_pages * PAGE_SIZE, + physmem_exclude_region(p->md_phys, p->md_pages * EFI_PAGE_SIZE, EXFLAG_NOALLOC); } } @@ -501,7 +501,7 @@ add_efi_map_entry(struct efi_md *p) * We're allowed to use any entry with these types. */ physmem_hardware_region(p->md_phys, - p->md_pages * PAGE_SIZE); + p->md_pages * EFI_PAGE_SIZE); break; } }