From owner-freebsd-amd64@FreeBSD.ORG Thu Oct 30 15:49:05 2014 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F4BB4F7 for ; Thu, 30 Oct 2014 15:49:05 +0000 (UTC) Received: from mail-ie0-f181.google.com (mail-ie0-f181.google.com [209.85.223.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E45F3B9E for ; Thu, 30 Oct 2014 15:49:04 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id rp18so3799250iec.12 for ; Thu, 30 Oct 2014 08:48:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=m9fGHWisObTw4yIJb/40riT72YWrQtDosb9bO8/RhOg=; b=BF7Fy5qisIRWrzGqPMLbgGhtmTLCcP45FTlEc2VhUT6Qdb/9IaPeJ2GpYK8bYuNZTK i3l5GO2KOWw5rsbkq4eK0KM8SG7Y+vKnEHOvczYCX1ktCo1d6QAkYb3CObSZCLoleq8U e1Bn6yzF11O8UKZXdOiPlDOW72JI61CB2Y1sFoK88oW6aExWjLukmKZKb2lwlXv9MxX8 /iFmlc9rUi2q5bDqtdIM8SPjGk3miZ2g0mpK9FahBkgI+XWFsrCjF54j/AtkmLkFCWZh wNWLdezkr5/taG2/2Xn8zDZxCaebncD0JBR/04KSwk0tvzxe7jrT4U9+OUHSUUmxdjbf iHwA== X-Gm-Message-State: ALoCoQnmFfy7NQLL3efkrYSulMTBssjZ9KhUep6097LxFLm21pCl75T+TuNIkv+TLaHpx7UUHlqJ MIME-Version: 1.0 X-Received: by 10.42.8.70 with SMTP id h6mr2714844ich.85.1414684138053; Thu, 30 Oct 2014 08:48:58 -0700 (PDT) Received: by 10.107.34.202 with HTTP; Thu, 30 Oct 2014 08:48:57 -0700 (PDT) Date: Thu, 30 Oct 2014 21:18:57 +0530 Message-ID: Subject: Detecting and using nvram memory From: Sourish Mazumder To: freebsd-amd64@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2014 15:49:05 -0000 Hi, I have a nvram module in my system. I am able to detect the nvram memory address via the bios_smap. Now I want to be able to access this nvram memory for operations like memcpy(). What do I need to do for able to access this nvram memory? I went over the hammer_time() function defined in sys/amd64/amd64/machdep.c file. Here we call the getmemsize() function where we create the phys_avail[] array and call the PHYS_TO_DMAP to map the message buffers. Finally we call msgbufinit() function. Is anything more needed to be done for physical memory to be accessed? -- Sourish Mazumder