SCATTER_GATHER_LIST "physical" or logical?

Discussion in 'Windows Vista Drivers' started by BubbaGump, Oct 14, 2006.

  1. BubbaGump

    BubbaGump Guest

    Are the addresses generated from GetScatterGatherList in a
    SCATTER_GATHER_LIST physical or logical? That is, are they already
    bus addresses that can be passed to a device?

    (The old-style DMA part of the DDK docs referred to bus addresses as
    "logical" addresses, then when scatter/gather DMA was introduced I saw
    "physical" with no mention of a conversion routine for platforms where
    physical != logical)
    BubbaGump, Oct 14, 2006
    1. Advertisements

  2. BubbaGump

    Mark Roddy Guest

    Consider this a doc bug. I've never liked that particular confusion
    anyhow. The SGL addresses are the correct ones to feed directly to
    your hardware.

    Mark Roddy DDK MVP
    Windows Vista/2003/XP/2000 Consulting
    Device and Filesystem Drivers
    Hollis Technology Solutions 603-321-1032
    Mark Roddy, Oct 14, 2006
    1. Advertisements

  3. Are the addresses generated from GetScatterGatherList in a
    Maxim S. Shatskih, Oct 14, 2006
  4. BubbaGump

    theo Guest

    I personally think of the SGL to be physical because they are the
    physical addresses your hardware uses.
    Also on wikipedia it refers to logical addressing as synonymous with
    virtual addressing.
    theo, Oct 16, 2006
  5. I personally think of the SGL to be physical because they are the
    Physical address is what RAM uses. The busmaster hardware uses _logical_
    addresses - passed via possible bounce buffers or bridge address translators
    (like AGP GART).
    Wikipedia's terminology is different from Windows one.
    Maxim S. Shatskih, Oct 16, 2006
  6. BubbaGump

    theo Guest

    Wikipedia's terminology is different from Windows one.

    I guess it just needs to be made clearer in the MSDN documentation (it
    confused me).

    For example the snippet below is from MSDN scatter gather element
    documentation (it refers to physical addresses).
    Each element is of type SCATTER_GATHER_ELEMENT, defined as follows:

    typedef struct _SCATTER_GATHER_ELEMENT {
    ULONG Length;
    ULONG_PTR Reserved;

    Each entry in the Elements array consists of the length of a physically
    contiguous scatter/gather region and its starting physical address
    theo, Oct 16, 2006
  7. BubbaGump

    BubbaGump Guest

    I think the term "bus address" could make the term "logical address"
    more clear. If I understand right a "bus address" is an address
    accessible only by a device and maps to some a physical address, and a
    "logical address" is a bus address that due to some software
    abstraction may map to either the original physical address to which
    some user-mode virtual address refers or to the physical address of a
    bounce buffer:

    virtual -> physical <-> (optional bounce physical) <- bus

    (I'm still left wondering if this is the sort of "bus address" meant
    in "Capabilities Provided by SCSI Port" in the DDK)
    BubbaGump, Oct 16, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.