[uClinux-dev] RE: How to use SRAM as driver buffer?
Vincent.Fang at freescale.com
Wed Aug 24 00:03:26 EDT 2005
I have done some modification to the uClinux kernel, and now I can use SRAM as driver buffer! :)
For my SCF5250 board, I use the first 8K of SRAM as the page frames for SRAM, and initialize these page structs (especially the virtual member with SRAM address). And also the "virt_to_page" and "MAP_NR" macro is modified by judging address range.
It just seems to be worked for my project. I don't know if there is any potential problem.
Let me know if someone need this patch, and if so I will post it.
BTW, I just copy some functions about kiobuf from mm to mmnommu, and it seems that the O_DIRECT works. Combined with SRAM buffer, I can read/write hard disk completely throught SRAM! Bye slow SDRAM~
Email: Vincent.Fang at freescale.com
From: uclinux-dev-bounces at uclinux.org [mailto:uclinux-dev-bounces at uclinux.org] On Behalf Of Fang Vincent-r65806
Sent: Tuesday, August 16, 2005 9:50 AM
To: uClinux-dev Mail List (uclinux-dev at uclinux.org)
Subject: [uClinux-dev] RE: How to use SRAM as driver buffer?
I think this problem goes to this:
Make uClinux support discontinues memory, or different regions in memory. One region is for default allocation, and the other is for user specific allocation. We need modify page frames and virtual address conversion, add a new malloc function. Is this a correct way?
From: Fang Vincent-r65806
Sent: Monday, August 15, 2005 3:50 PM
Subject: How to use SRAM as driver buffer?
I'm using SDRAM as IDE driver buffer. That is, in the read()/write() system calls, a buffer pointer located in SDRAM was used as the "buf" parameter. Due to performance, I need to use buffer in SRAM. It works for some driver like USB driver, when I pass a pointer in SDRAM (0x20000000 for example). But for IDE driver, file system is in the path. uClinux only initiated page frames for SDRAM, so uClinux can't find the page frame of address in SDRAM. At last the IDE driver got a wrong buffer_head, and can't fill the buffer in SRAM.
Is there any way to use SRAM just as SDRAM? Thanks for any advise.
uClinux-dev mailing list
uClinux-dev at uclinux.org
This message was resent by uclinux-dev at uclinux.org
More information about the uClinux-dev