From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 12:47:42 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B49A1065672; Tue, 24 Mar 2009 12:47:42 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id 1AF4C8FC18; Tue, 24 Mar 2009 12:47:41 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: by yw-out-2324.google.com with SMTP id 5so1542701ywh.13 for ; Tue, 24 Mar 2009 05:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=N/Zfh9kizyf+2+blcB/9WM4a1JzxXEHeAblX5Ro3Y7M=; b=SPcVvLxEP5ZShMPkXc45/HJZSBfmiYH5oVGAZqLYTD0kOeXoESQMsULzCl+Dsl7Anw 33atw0eoE9RK5uzI1Njoqyo0lQHfW4NqLVIgOAIJYFtaniDVWRxIIDpi1cren5ZxSb/s tTqb2gb3OoclNEiRjhFRyNzfPYvetG/y2Jq/w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=I7qGyH9SzvMVqppUWH84o31beCPGdFg4ATQiVKvm59MlGFs/8ZSSpYhux2FHt+A/cO 6msrU2PFDelHKmNrlY391Oq/wn3UVd8owUTLzv04YS1SdG8yZQdQQJdbW38UvpB2DqTE ZMbqRE9509Pt0UN+dsYsTvnms1/L3UWgrhOm0= MIME-Version: 1.0 In-Reply-To: <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> References: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> <164b4c9c0903240210v4d05770du1f02de26f42f6454@mail.gmail.com> <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> Date: Tue, 24 Mar 2009 13:47:26 +0100 Received: by 10.231.16.74 with SMTP id n10mr2108585iba.44.1237898861313; Tue, 24 Mar 2009 05:47:41 -0700 (PDT) Message-ID: <164b4c9c0903240547k4d05cb09id6e5d919ffd1f9ff@mail.gmail.com> From: Sylvestre Gallon To: Arnar Mar Sig Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Atmel at91sam9261-ek support. X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2009 12:47:43 -0000 On Tue, Mar 24, 2009 at 1:16 PM, Arnar Mar Sig wrote: > > On Mar 24, 2009, at 10:10 AM, Sylvestre Gallon wrote: > > > Code is in p4: > http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/avr32/src/sys/avr32/avr32&HIDEDEL=NO > > Note the driver dose not use KVA, instead it uses unmapped memory segment in > avr32, but that only works for 5 of the 6 chips select so it will be needed > later on. Thanks I will take a look on it :) > > > cpu_devs can be in hints, but i dont know about pmap_devmap. on avr32 all > devices registers can be addressed without mmu lookups. > It is not a problem for the pmap_devmap because all at91 have the same memory mapping : |----------------------------------------| 0x0000 0000 | Internal Memory Mapping | |----------------------------------------| 0x1000 0000 | EBI 0 | |----------------------------------------| 0x2000 0000 | EBI 1 | |----------------------------------------| 0x3000 0000 | EBI ... | |----------------------------------------| 0xX000 0000 | Undifined (Abort) | |----------------------------------------| 0xF000 0000 | Internal peripherals | |----------------------------------------| 0xFFFF FFFF So we can have the same devmap for all at91 : static const struct pmap_devmap at91_devmap[] = { /* * Map the on-board devices VA == PA so that we can access them * with the MMU on or off. */ { AT91_REGS_VA, AT91_REGS_PA, AT91_REGS_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, { AT91_MEMS_VA, AT91_MEMS_PA, AT91_MEMS_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, { 0, 0, 0, 0, 0, } }; -- Sylvestre Gallon (http://devsyl.blogspot.com) Fifth Grade Student @ Epitech & Researcher @ LSE R&D @ Rathaxes (http://www.rathaxes.org)