From: Wolfgang Denk Date: Tue, 01 Sep 2009 15:47:32 +0200 Subject: [U-Boot] [PATCH] atngw100: Use virtual address in CONFIG_ENV_ADDR In-Reply-To: <20090901152305.68e8d339@hskinnemoen-d830> References: <1251448970-15252-1-git-send-email-haavard.skinnemoen@atmel.com> <20090828115610.A0A63833DBD2@gemini.denx.de> <20090828141405.6a48e9b3@hskinnemoen-d830> <20090828154955.7eb781fa@hskinnemoen-d830> <20090830173640.2af9ce3c@siona> <20090830181101.23C3A833DBD2@gemini.denx.de> <20090830224218.10f14dc4@siona> <20090831115718.B5E91834A950@gemini.denx.de> <20090831155327.62b58f8f@hskinnemoen-d830> <20090831174610.D5FF3834A950@gemini.denx.de> <20090901105752.5bb77fc0@hskinnemoen-d830> <20090901094705.02BCB834A950@gemini.denx.de> <20090901123829.55fcb24e@hskinnemoen-d830> <20090901110555.A185F834A950@gemini.denx.de> <20090901134257.59961e79@hskinnemoen-d830> <20090901130443.EF801834A950@gemini.denx.de> <20090901152305.68e8d339@hskinnemoen-d830> Message-ID: <20090901134732.90E75834A950@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Haavard Skinnemoen, In message <20090901152305.68e8d339@hskinnemoen-d830> you wrote: > > > On a 32 bit system with 36 bit physical addresses you cannot use a > > physical address when running the "md" command, for example. > > Yes you can, if you teach the "md" command to map it at a virtual > address first. Again, map_physmem() makes this possible without > changing the external interface in any way. Well, that was the part of me saying before: "as long as it doesn't hurt others". We don't want to add that complexity to U-Boot as noone needs it. The only few systems that seem to have problems are yours with their exotic memory mappping. > > > As far as I understand, the only difference for such systems is that > > > keeping 64-bit physical addresses around are a bit more costly than > > > passing around 32-bit virtual pointers. But presumably those systems > > > have enough memory to make it a non-issue... > > > > That's not true. There are 32 bit systems with bigger physical > > address spaces. > > Which part of what I said isn't true? The part about some systems might > require 64-bit variables to store a physical address or that such > variables take more storage than a 32-bit virtual address? Well, that the have enough memory not to case about size, for example. [Keep in mind that this also effects the U-Boot image size in NOR flash.] > > We do not want to implement a full-fledged OS with virtual memory and > > on-demand paging and all that stuff in U-Boot. > > Then why are you forcing me to implement it for AVR32?!? I'm not. I'm suggesting to implement a plain stupid 1:1 mapping and a function to turn on and off data cache (at least on the flash area). > > The advantage is that other drivers with similar needs can use it as > > well. > > But they can use map_physmem() today! It allows you to specify exactly > what caching properties you need. The fact that it _may_ return a > virtual address which is different from the physical one just allows > more flexibility in how the architecture chooses to implement it! You make assumptions on how other architectures work that may or may not be true. > > On other architectures it is not possible to map the same memory area > > multiple times with different attributes. > > So what? They can just return the physical address unchanged. It's not > _mandatory_ to remap anything... So how would these benefit from using data cache when reading from flash? This works for you only because you are then reading from a different address range. > > It would be a good idea to clean up this board support, remove the > > proprietary flash driver and use the CFI driver instead. Patches are > > welcome. > > You must be joking. Replacing a working driver with a broken one? Why > the hell would anyone do that? Fix the issues on the way? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Houston, Tranquillity Base here. The Eagle has landed. -- Neil Armstrong