Annotation of qemu/roms/SLOF/board-qemu/slof/virtio.fs, revision 1.1

1.1     ! root        1: \ *****************************************************************************
        !             2: \ * Copyright (c) 2011 IBM Corporation
        !             3: \ * All rights reserved.
        !             4: \ * This program and the accompanying materials
        !             5: \ * are made available under the terms of the BSD License
        !             6: \ * which accompanies this distribution, and is available at
        !             7: \ * http://www.opensource.org/licenses/bsd-license.php
        !             8: \ *
        !             9: \ * Contributors:
        !            10: \ *     IBM Corporation - initial implementation
        !            11: \ ****************************************************************************/
        !            12: 
        !            13: \ This struct must match "struct virtio_device" in virtio.h!
        !            14: STRUCT
        !            15:    /n FIELD vd>base
        !            16:    /l FIELD vd>type
        !            17: CONSTANT /vd-len
        !            18: 
        !            19: 
        !            20: \ Initialize virtiodev structure for the current node
        !            21: : virtio-setup-vd  ( vdstruct -- )
        !            22:    >r
        !            23:    \ Does it have a "class-code" property? If yes, assume we're a PCI device
        !            24:    s" class-code" get-node get-property 0= IF
        !            25:       \ Set up for PCI device interface
        !            26:       2drop
        !            27:       s" 10 config-l@ translate-my-address 3 not AND" evaluate
        !            28:       ( io-base ) r@ vd>base !
        !            29:       0 r@ vd>type l!
        !            30:    ELSE
        !            31:       ." unsupported virtio interface!" cr
        !            32:       1 r@ vd>type l!
        !            33:    THEN
        !            34:    r> drop
        !            35: ;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.