To: | James Hogan <james.hogan@mips.com> |
---|---|
Subject: | Re: [P5600 && EVA memory caching question] PCI region |
From: | Yuri Frolov <crashing.kernel@gmail.com> |
Date: | Fri, 22 Dec 2017 12:37:14 +0300 |
Cc: | linux-mips@linux-mips.org, paul.burton@mips.com |
Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=gXPJslPtcAs4FZl7sp8Wjl0TbuuHbnjnArlw3MzizEc=; b=mPgghiFnsQgClekpe2jaPopL3K4MiHCAb7jzh4J7OU+n6xUBimSXjOKPJ1n0IZe7Sq wrl+b3kvFAVdpRTHwW9kaGxi7PI20yeabbJFe9cWPUW0vqybGzMsim7A09Lzn79bNOXN 9DyftOMmwwrWGLuLv/7o384duamDusOer17svEPXbd/7sNdQ3wCDEPSSJ0pfI0YH/Frw 6yNaDPR0w7yWo8xJdZJn8fz97Ksig9qNN6QQolBFUrn9g1CfFLxBpkV2RAC+HNPeCkwO HA5Bh9Av3MacfiTY3/PDHV4WJWUWa/j12z3hJRk/0iFpQHJPjP92GYlf+sNqb83hH+fI UETQ== |
In-reply-to: | <20171221134119.GE5027@jhogan-linux.mipstec.com> |
List-archive: | <http://www.linux-mips.org/archives/linux-mips/> |
List-help: | <mailto:ecartis@linux-mips.org?Subject=help> |
List-id: | linux-mips <linux-mips.eddie.linux-mips.org> |
List-owner: | <mailto:ralf@linux-mips.org> |
List-post: | <mailto:linux-mips@linux-mips.org> |
List-software: | Ecartis version 1.0.0 |
List-subscribe: | <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips> |
List-unsubscribe: | <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips> |
Original-recipient: | rfc822;linux-mips@linux-mips.org |
References: | <6132c323-32a7-1d38-b77c-a191be22faa4@gmail.com> <20171206114611.GM5027@jhogan-linux.mipstec.com> <330a5200-531f-fcfa-674a-c81fb3144e92@gmail.com> <20171214152138.GV5027@jhogan-linux.mipstec.com> <ca9adcbc-9777-46a0-ce0b-15e83e01fc72@gmail.com> <20171215232821.GA5027@jhogan-linux.mipstec.com> <b8706fae-aea8-99b5-f91d-37690eff6949@gmail.com> <20171221134119.GE5027@jhogan-linux.mipstec.com> |
Sender: | linux-mips-bounce@linux-mips.org |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
I'm looking at arch/mips/include/asm//mach-malta/kernel-entry-init.h and there is a definition for SegCtl2: /* SegCtl2 */ li t0, ((MIPS_SEGCFG_MUSUK << MIPS_SEGCFG_AM_SHIFT) | \ (6 << MIPS_SEGCFG_PA_SHIFT) | \ (1 << MIPS_SEGCFG_EU_SHIFT)) | \ (((MIPS_SEGCFG_MUSUK << MIPS_SEGCFG_AM_SHIFT) | \ (4 << MIPS_SEGCFG_PA_SHIFT) | \ (1 << MIPS_SEGCFG_EU_SHIFT)) << 16) it defines, that kernel logical addresses from the range 0x00000000 - 0x7fffffff are unmapped (no tlbs) and dictates, that in order to get a physical address for any logical addresses from 0x00000000 - 0x3fffffff range in kernel space, bits [31:29] of the logical address must be changed to 100, and (again in kernel space) for any logical addresses from 0x40000000 - 0x7fffffff range, bits [31:29] of the logical address must be changed to 110, right?yes, the Malta implementation is slightly ugly as it relies on a hardware physical memory alias of RAM starting at PA 0x80000000.What physical addresses will logical addresses 0x00000000 and 0x20000000 be translated in kernel space?.. logical 0x00000000 --> physical 0x80000000, and logical 0x20000000 --> .... 0x80000000 too?VA 0x20000000 -> PA 0xa0000000, since seg4 and seg5 are 1GB segments, so its only bits 30 and up that can be changed. Ah, I've got it now. I shoulda read the actual definition of SegCtl2, my bad. I presumed the definitions are the same forI seem to remember the bit corresponding to bit 29 isn't even writable in the SegCtl2 register. SegCtl0 - SegCtl2. Does that clarify things? Yes, absolutely. Thank you very much! -- yuri |
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | [PATCH 4.9 102/104] MIPS: math-emu: Fix final emulation phase for certain instructions, Greg Kroah-Hartman |
---|---|
Next by Date: | Re: [P5600 && EVA memory caching question] PCI region, Yuri Frolov |
Previous by Thread: | Re: [P5600 && EVA memory caching question] PCI region, James Hogan |
Next by Thread: | Re: [P5600 && EVA memory caching question] PCI region, Yuri Frolov |
Indexes: | [Date] [Thread] [Top] [All Lists] |