After reading your DMA question more carefully, I realise my last posting did not help. Please ignore it.
Clive Jenkins.
Petazzoni Thomas wrote:
Hi everybody,
This has not much to do with the OpenBIOS project, but with low level programming. Everyone here seems to know lot of things in this domain, that's why i'm asking to all of u those questions :
- Can we setup a VESA 2 (not VESA 3 !) configuration (select video
mode, and everything) without making a int 0x10 ? We're programming a protected mode OS, and switching to VM86 sucks. I know it's possible with VESA 3, but with VESA 2 ? If yes, do you have any docs about it ? Is the int 0x10 VESA code specific to each graphic card ?
- I've got a problem with DMA programming, here's my source :
const static DmaChannel dmainfo[] = { { 0x87, 0x00, 0x01 }, { 0x83, 0x02, 0x03 }, { 0x81, 0x04, 0x05 }, { 0x82, 0x06, 0x07 } };
void dma_transfer(int channel, long physical_address, unsigned int length, unsigned sh ort read) {
long page, offset;
if(channel >= 4) { printk("\nThis function does to manage with channel 4, 5, 6, 7"); return ; }
page = physical_address >> 16; offset = physical_address & 0xFFFF; length -= 1;
// DIsable IRQs outb(0xFF, 0x21); outb(0xFF, 0xA1);
// Masking channel (disable) outb(channel | 4, 0x0A);
// Reset Flip-Flop outb(0, 0xC0);
// Mode outb( (read ? 0x48 : 0x44) | channel, 0x0B);
// Page outb(page, dmainfo[channel].page);
// Offset outb(offset & 0xFF, dmainfo[channel].offset); outb((offset >> 8) & 0xFF, dmainfo[channel].offset);
// Length outb(length & 0xFF, dmainfo[channel].length); outb((length >> 8) & 0xFF, dmainfo[channel].length);
// Unmask outb(channel, 0x0A);
// Enabling IRQs outb(0, 0x21); outb(0, 0xA1);
}
I use it to transfer a sector from the floppy disk. Do you see anything wrong in this code ? The transfer is not made by the floppy, and i don't know why... I don't know if it's in the DMA programming, or in the floppy driver ..............
Help !
Thanks,
Thomas, from france
(If you speak french, you can join the KOS project : http://kos.enix.org)
-- PETAZZONI Thomas, coordinateur du projet KOS thomas.petazzoni@ifrance.com ICQ : 34937744 Home page : http://perso.worldonline.fr/petazzoni/thomas/ Home Page Projet KOS : http://kos.enix.org
To unsubscribe: send mail to majordomo@freiburg.linux.de with 'unsubscribe openbios' in the body of the message
- To unsubscribe: send mail to majordomo@freiburg.linux.de with 'unsubscribe openbios' in the body of the message