1278277Sgonzo/**
2278277Sgonzo * Copyright (c) 2010-2012 Broadcom. All rights reserved.
3278277Sgonzo *
4278277Sgonzo * Redistribution and use in source and binary forms, with or without
5278277Sgonzo * modification, are permitted provided that the following conditions
6278277Sgonzo * are met:
7278277Sgonzo * 1. Redistributions of source code must retain the above copyright
8278277Sgonzo *    notice, this list of conditions, and the following disclaimer,
9278277Sgonzo *    without modification.
10278277Sgonzo * 2. Redistributions in binary form must reproduce the above copyright
11278277Sgonzo *    notice, this list of conditions and the following disclaimer in the
12278277Sgonzo *    documentation and/or other materials provided with the distribution.
13278277Sgonzo * 3. The names of the above-listed copyright holders may not be used
14278277Sgonzo *    to endorse or promote products derived from this software without
15278277Sgonzo *    specific prior written permission.
16278277Sgonzo *
17278277Sgonzo * ALTERNATIVELY, this software may be distributed under the terms of the
18278277Sgonzo * GNU General Public License ("GPL") version 2, as published by the Free
19278277Sgonzo * Software Foundation.
20278277Sgonzo *
21278277Sgonzo * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
22278277Sgonzo * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23278277Sgonzo * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24278277Sgonzo * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25278277Sgonzo * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26278277Sgonzo * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27278277Sgonzo * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28278277Sgonzo * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29278277Sgonzo * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30278277Sgonzo * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31278277Sgonzo * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32278277Sgonzo */
33278277Sgonzo
34278277Sgonzo#ifndef VCHIQ_PAGELIST_H
35278277Sgonzo#define VCHIQ_PAGELIST_H
36278277Sgonzo
37278277Sgonzo#ifndef PAGE_SIZE
38278277Sgonzo#define PAGE_SIZE 4096
39278277Sgonzo#endif
40278277Sgonzo#define PAGELIST_WRITE 0
41278277Sgonzo#define PAGELIST_READ 1
42278277Sgonzo#define PAGELIST_READ_WITH_FRAGMENTS 2
43278277Sgonzo
44278277Sgonzotypedef struct pagelist_struct {
45278277Sgonzo	unsigned long length;
46278277Sgonzo	unsigned short type;
47278277Sgonzo	unsigned short offset;
48278277Sgonzo	unsigned long addrs[1];	/* N.B. 12 LSBs hold the number of following
49278277Sgonzo				   pages at consecutive addresses. */
50278277Sgonzo} PAGELIST_T;
51278277Sgonzo
52278277Sgonzo#endif /* VCHIQ_PAGELIST_H */
53