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
10 \ * IBM Corporation - initial implementation
11 \ ****************************************************************************/
13 \ This struct must match "struct virtio_device" in virtio.h!
20 \ Initialize virtiodev structure for the current node
21 : virtio-setup-vd ( vdstruct -- )
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
27 s" 10 config-l@ translate-my-address 3 not AND" evaluate
28 ( io-base ) r@ vd>base !
31 ." unsupported virtio interface!" cr