From: Tejun Heo <htejun@gmail.com>
To: Srihari Vijayaraghavan <sriharivijayaraghavan@yahoo.com.au>
Cc: linux-ide@vger.kernel.org, conke.hu@gmail.com
Subject: Re: ASUS M2A-VM - AMD690G - SB600 Non-Raid-5 SATA - problem
Date: Tue, 08 May 2007 10:39:14 +0200 [thread overview]
Message-ID: <46403732.3000507@gmail.com> (raw)
In-Reply-To: <47878.46146.qm@web52606.mail.re2.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 2718 bytes --]
Hello,
Srihari Vijayaraghavan wrote:
> Even now, when 4 GB of RAM is installed, by default, the SATA drives aren't
> recongnised in Linux, except when I pass mem=4095MB. If I pass mem=4095M, alas
> only 3.6 of RAM is detected under Linux!
Aha, there's the clue.
> Here's the relevant section from dmesg:
> BIOS-provided physical RAM map:
> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
> BIOS-e820: 000000000009f000 - 00000000000a0000 (reserved)
> BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
> BIOS-e820: 0000000000100000 - 00000000dfee0000 (usable)
> BIOS-e820: 00000000dfee0000 - 00000000dfee3000 (ACPI NVS)
> BIOS-e820: 00000000dfee3000 - 00000000dfef0000 (ACPI data)
> BIOS-e820: 00000000dfef0000 - 00000000dff00000 (reserved)
> BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
> BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
> BIOS-e820: 0000000100000000 - 0000000120000000 (usable)
> Entering add_active_range(0, 0, 159) 0 entries of 3200 used
> Entering add_active_range(0, 256, 917216) 1 entries of 3200 used
> end_pfn_map = 1048576
> ...
> Memory: 3570504k/3668864k available (2465k kernel code, 97972k reserved, 1445k
> data, 332k init)
> ...
>
> Surprisingly, this usable ~3.6 GB equals to the initial two e820 sections
> only. I believe, when mem= parameter is used, the third 'usable' section
> (between 0x100000000 - 0x120000000) isn't used at all by Linux.
Nothing to be surprised about. You're telling the kernel that the
highest address it can use is 4G - 1, that is, 0xffffffff, so the kernel
correctly ignores any memory above that address.
> I wonder if there is a trick involved in using mem= or memmap= needs to used
> also (if so, I don't know yet how to construct memmap= parameter).
No no, don't use memmap unless you're sure that the BIOS is completely
screwed up and the e820 map is bogus, which BTW isn't true in your case.
> To recap:
> System is very stable with the new case, power supply & fans
> SATA drives aren't by default detected when 4 GB of RAM is used
> SATA drives are detected by default when only 2 GB of RAM is physically
> installed (ie, with both pairs of 2 GB of DIMMs individually)
> SATA drives are detected when mem=4095M (the reported memory size in the
> BIOS) is used, but only ~3.6 GB of RAM is used (suspected that the final e820
> usable section, though detected, is not used).
>
> Thank you for your help so far. I really appreciated that.
It just seems sb600 claims that it can do DMA above 4G while it actually
can't. Can you test the attached patch?
Conke, can you check whether this is caused by the ahci controller
itself or the PCI bridge above it?
Thanks.
--
tejun
[-- Attachment #2: sb600-force-32bit.patch --]
[-- Type: text/x-patch, Size: 1405 bytes --]
---
drivers/ata/ahci.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Index: tree0/drivers/ata/ahci.c
===================================================================
--- tree0.orig/drivers/ata/ahci.c
+++ tree0/drivers/ata/ahci.c
@@ -170,6 +170,7 @@ enum {
AHCI_FLAG_IGN_IRQ_IF_ERR = (1 << 25), /* ignore IRQ_IF_ERR */
AHCI_FLAG_HONOR_PI = (1 << 26), /* honor PORTS_IMPL */
AHCI_FLAG_IGN_SERR_INTERNAL = (1 << 27), /* ignore SERR_INTERNAL */
+ AHCI_FLAG_32BIT_ONLY = (1 << 28), /* force 32bit */
};
struct ahci_cmd_hdr {
@@ -370,7 +371,8 @@ static const struct ata_port_info ahci_p
.flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
ATA_FLAG_SKIP_D2H_BSY |
- AHCI_FLAG_IGN_SERR_INTERNAL,
+ AHCI_FLAG_IGN_SERR_INTERNAL |
+ AHCI_FLAG_32BIT_ONLY,
.pio_mask = 0x1f, /* pio0-4 */
.udma_mask = 0x7f, /* udma0-6 ; FIXME */
.port_ops = &ahci_ops,
@@ -1579,6 +1581,12 @@ static int ahci_host_init(struct ata_pro
probe_ent->n_ports = cap_n_ports;
using_dac = hpriv->cap & HOST_CAP_64;
+ if (using_dac && (probe_ent->port_flags & AHCI_FLAG_32BIT_ONLY)) {
+ dev_printk(KERN_INFO, &pdev->dev,
+ "controller can't do 64bit DMA, forcing 32bit\n");
+ using_dac = 0;
+ }
+
if (using_dac &&
!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
next prev parent reply other threads:[~2007-05-08 8:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <754241.548.qm@web52606.mail.re2.yahoo.com>
2007-05-06 9:33 ` ASUS M2A-VM - AMD690G - SB600 Non-Raid-5 SATA - problem Tejun Heo
2007-05-07 20:37 ` Srihari Vijayaraghavan
2007-05-08 8:39 ` Tejun Heo [this message]
2007-05-08 9:35 ` Srihari Vijayaraghavan
2007-05-08 11:12 ` Tejun Heo
2007-05-08 11:16 ` Tejun Heo
2007-05-08 12:42 ` Srihari Vijayaraghavan
2007-05-08 12:39 ` Srihari Vijayaraghavan
2007-05-08 13:35 ` Tejun Heo
2007-05-08 15:00 ` Conke Hu
2007-05-08 15:03 ` Tejun Heo
2007-05-13 5:05 ` Srihari Vijayaraghavan
2007-05-14 9:10 ` Tejun Heo
2007-05-18 12:39 ` Srihari Vijayaraghavan
2007-05-18 12:46 ` Tejun Heo
2007-05-18 13:18 ` [PATCH] ahci: disable 64bit dma on sb600 Tejun Heo
2007-05-18 14:19 ` Srihari Vijayaraghavan
2007-05-18 14:23 ` Tejun Heo
2007-05-21 23:58 ` Jeff Garzik
2007-05-08 9:40 ASUS M2A-VM - AMD690G - SB600 Non-Raid-5 SATA - problem Srihari Vijayaraghavan
-- strict thread matches above, loose matches on Subject: below --
2007-05-02 12:32 Srihari Vijayaraghavan
2007-05-03 14:44 ` Tejun Heo
2007-05-04 1:48 ` Srihari Vijayaraghavan
2007-05-04 6:41 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46403732.3000507@gmail.com \
--to=htejun@gmail.com \
--cc=conke.hu@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=sriharivijayaraghavan@yahoo.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).