From owner-freebsd-questions@freebsd.org Mon Dec 24 03:24:12 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68B6C1354AAC for ; Mon, 24 Dec 2018 03:24:12 +0000 (UTC) (envelope-from scwsy00@gmail.com) Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F82E6CB78 for ; Mon, 24 Dec 2018 03:24:11 +0000 (UTC) (envelope-from scwsy00@gmail.com) Received: by mail-oi1-x241.google.com with SMTP id r62so9193550oie.1 for ; Sun, 23 Dec 2018 19:24:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=sNL0GJWiZt+YkbPM6Rhw9GhwD0n5S+9jlhEJBVkQw/g=; b=tAhTrOaLIz5gFltBEv9Vn8r3VGHHX8zE4vrD5X/iN8eJqnnbMMA0p+w1XjMkAi6/h+ HrAKRCY+4mtyEWQJ6oMPtYFh241SRLUpZI81ttMCs2SwVlaAfGiNbWMiHLUHzQyzchNK WJLGnuwX26tGg3H1OsjVEx0C5dERf7cnLM6ItxlpVBh3LHXN5zckAMD8PByKGOwOEIEP FKw+sXa070k2YSqql6vE9QjOfinnlv8CrTtQq1BkHacun0Bi9vuozwgn/ypf4WGuj/A3 tlqFGZh3kJjX0YwM93PJMr57PzPQGa7wpnI6/S+sdYHT1wtOLTHhpG5Bq55Pq2NMUdQt pdUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=sNL0GJWiZt+YkbPM6Rhw9GhwD0n5S+9jlhEJBVkQw/g=; b=k4QaDINt3+okjD5rpzP3IDrttzcT6AIRX+zxaxWr2Kj++7RRn4j1vd4f6yODe1nYpV 7+I6XDH5+fI01Y5KG7sRz8P6IJ1Yo0G6Fqsx0JRD5ftsybGraqTqe/MdbvE5jQA7FS6K iUi3KjUIhv20aHev3wq+/OR6MiNwwE79A7UqIhtp1q6qlTCmXxTF4VBRsCeDvcvbWdcT x6DiLLE40KQk0kpqzn1LQlzlrICVFp5wu47Spy0VCVYBYplHE0etVFvNTpr8+MgZ0iyJ 43ghNARLr2Abq5G0fKVFMD5N3q+tRIwoBEthdaitEBeilM6zMpS48luLZYu5jyj78gf2 I4pA== X-Gm-Message-State: AA+aEWbwK16IK10CFruUFl+8UjhXaxyCXO/zYa7YbE2LLRN6y9HVFV6w gX2wOvyxKeynTJRKVSQqNX7RKCRKBYBdk1rTVtdWSEvu X-Google-Smtp-Source: AFSGD/VsotxYomZiB5JmP1lsUlNzHrelhSteQrUDqpgeOYqC9rKMWgCuqcT+3JIYCmUXzf4PCmnC2MKKKLojhnLCJEg= X-Received: by 2002:aca:bc42:: with SMTP id m63mr6842337oif.323.1545621849565; Sun, 23 Dec 2018 19:24:09 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?B?5a6L6L6w5Lyf?= Date: Mon, 24 Dec 2018 11:23:40 +0800 Message-ID: Subject: How to access physical memory To: freebsd-questions@freebsd.org X-Rspamd-Queue-Id: 3F82E6CB78 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=tAhTrOaL; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of scwsy00@gmail.com designates 2607:f8b0:4864:20::241 as permitted sender) smtp.mailfrom=scwsy00@gmail.com X-Spamd-Result: default: False [-4.01 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[1.4.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.53)[ip: (0.77), ipnet: 2607:f8b0::/32(-1.85), asn: 15169(-1.47), country: US(-0.08)]; NEURAL_HAM_SHORT(-0.48)[-0.476,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2018 03:24:12 -0000 Hi I'm the new here . And I have some questions with pmap. [image: 1545542790461.png] See `*pml4` is the physical address of a page with some flag. And then updated the address to the Direct Map Space. Then We calculate the offset of the real pdp we need . How could it access to `*pdp`? it is a virtual addr in Direct Map Space. Why don't change the physical space directly since we have the physical page already.