Search:

Type: Posts; User: jacob12

Search: Search took 0.01 seconds.

  1. Replies
    35
    Views
    12,684

    to pick up on our discussion about bit placement...

    to pick up on our discussion about bit placement and ports. I have learned that in the x86 machine the smallest bits associate with the smallest ports, so what we have is actually the opposite of...
  2. Replies
    35
    Views
    12,684

    How would those addresses work out then, would it...

    How would those addresses work out then, would it work like so:

    9800+0x00 to 9800+0x03

    9800 - 31:24
    9801 - 23:16
    9802 - 15:8
    9803 - 7:0

    9800+0x04 to 9800+0x07
  3. Replies
    35
    Views
    12,684

    EDIT: I take back what I thought. I agree with...

    EDIT: I take back what I thought. I agree with you. I think that if I access it the way you suggested that would be right. Because I looked at device manager and saw the IO range for the bar I am r/w...
  4. Replies
    35
    Views
    12,684

    here is the data sheet:...

    here is the data sheet: http://gkernel.sourceforge.net/specs/sii/3112A_SiI-DS-0095-B2.pdf.bz2

    here is what I tried that returned what was written:



    //let base = 9800
    unsigned char i;...
  5. Replies
    35
    Views
    12,684

    I think it must be aligned to a 32 bit boundary...

    I think it must be aligned to a 32 bit boundary because each new base address starts with 0x00 as an offset and this one has two 32 bit boundaries one at offset 0x00 and the other at 0x04, then like...
  6. Replies
    35
    Views
    12,684

    oh, your right, I am sure it must be aligned by...

    oh, your right, I am sure it must be aligned by doing ~3, just as I was doing with the pci config registers. I'll try though, brb.

    EDIT:

    I tried it and it returned the right value, but how...
  7. Replies
    35
    Views
    12,684

    to pick back up on our discussion about...

    to pick back up on our discussion about bitfields, suppose I have this dilema:

    I must use outb and inb to read from an IO address at 0x9804, this address contains four 8bit registers totaling...
  8. Replies
    6
    Views
    1,887

    What does the following actually suggest: ...

    What does the following actually suggest:



    What is the "processor address space" is that RAM? What does "relative to the base address" mean, is that Address+Offset?
  9. Replies
    6
    Views
    1,887

    See the Linux Reference says that I could access...

    See the Linux Reference says that I could access the device three ways:

    01. Memory Locations
    02. I/O Ports
    03. Config Registers

    I was trying the Config Registers method but I kept returning...
  10. Replies
    6
    Views
    1,887

    No, I mean the address of a space of memory...

    No, I mean the address of a space of memory belonging to a device on the PCI bus. From the PCI controller I was given the IO and Memory space addresses of a device I am coding for and I now need to...
  11. Replies
    6
    Views
    1,887

    How to Map a Memory Space

    So, I have the address of the memory address and I want to map it into my kernels memory space, so that I can access the memory for both reading and writing. I am not very good at doing this. I have...
  12. Replies
    35
    Views
    12,684

    I tried this: unsigned char* pBar5;...

    I tried this:



    unsigned char* pBar5;
    unsigned int* pTFR0;

    // Map the memory
    pBar5 = (unsigned char*)mapReg(BAR5, BAR5Sze);
  13. Replies
    35
    Views
    12,684

    I am not able to test this now, but if I: ...

    I am not able to test this now, but if I:



    unsigned char* pBar5;
    unsigned int* pTFR0;

    pBar5 = (unsigned char*)mapreg(BAR5, BAR5Sze); //map bar5

    pTFR0 = (unsigned...
  14. Replies
    35
    Views
    12,684

    still having trouble understanding this. I tried...

    still having trouble understanding this. I tried mapping the memory to a pointer, but I am sure I am using it wrong as it keeps causing a double-fault:



    unsigned char* pBar5;
    unsigned int*...
  15. Replies
    35
    Views
    12,684

    At any rate, I am still having issues, perhaps I...

    At any rate, I am still having issues, perhaps I am still doing it wrong:



    #define secPerTrk 0x3F //= 63
    #define maxHeadNm 0xFE //= 254
    #define intATACmd 0x91 //= initialize ata command
    ...
  16. Replies
    35
    Views
    12,684

    Not sure what your background is, but if you have...

    Not sure what your background is, but if you have never written a device driver before I can tell you from first hand experience that you definitely could. Have you ever written drivers or kernels...
  17. Replies
    35
    Views
    12,684

    sorry, could you please look at my edits above...

    sorry, could you please look at my edits above and just check if I understood you correctly? Thanks in advance.
  18. Replies
    35
    Views
    12,684

    Sorry man, I wrote that function, here it is: ...

    Sorry man, I wrote that function, here it is:



    int pci_read_config_dword (pci_t *pci, unsigned reg,
    unsigned long *val)
    {
    outl(PCI_CONFIG_ADDR, 0x80000000L |
    ((unsigned long)pci->bus...
  19. Replies
    35
    Views
    12,684

    I'm sorry, I'll just show you what I am after: ...

    I'm sorry, I'll just show you what I am after:

    So its BAR5+0x90 to get to the stuff below:



    I need to read and write bit field 23:16. Hope this helps clear it up.
  20. Replies
    35
    Views
    12,684

    No, I think you are right, can you show me an...

    No, I think you are right, can you show me an example?
  21. Replies
    35
    Views
    12,684

    I tried mapping the address to a pointer but gcc...

    I tried mapping the address to a pointer but gcc wouldn't allow me to use the bitwise shift operator on the pointer. I tried:



    //vars
    unsigned char* pBar5;
    unsigned int* tfreg0;

    //map it...
  22. Replies
    35
    Views
    12,684

    Device Register Access

    Hi. I am seriously confused as to how to access a memory address+offset and bit field. My attempt is below:



    #define secPerTrk 0x3F //= 63
    #define maxHeadNm 0xFE //= 254
    #define intATACmd...
Results 1 to 22 of 22