7 * API's to support different OS
9 * A detailed description, giving important information about this file.
10 * Omit the detailed description if none is needed. For other than the
11 * simplest files, there should be one.
13 * @xrefitem bom "File Content Label" "Release Content"
15 * @e sub-project: Memory
16 * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 02:16:51 -0700 (Wed, 22 Dec 2010) $
20 *****************************************************************************
22 * Copyright (C) 2012 Advanced Micro Devices, Inc.
23 * All rights reserved.
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions are met:
27 * * Redistributions of source code must retain the above copyright
28 * notice, this list of conditions and the following disclaimer.
29 * * Redistributions in binary form must reproduce the above copyright
30 * notice, this list of conditions and the following disclaimer in the
31 * documentation and/or other materials provided with the distribution.
32 * * Neither the name of Advanced Micro Devices, Inc. nor the names of
33 * its contributors may be used to endorse or promote products derived
34 * from this software without specific prior written permission.
36 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
37 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39 * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
40 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
41 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
42 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
44 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
45 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47 * ***************************************************************************
49 *===========================================================================
50 * AMD Revision History
57 ///< 64 bit data structure
58 ///< lo - Lower 32 bits
59 ///< hi - Upper 32 bits
60 typedef struct _S_UINT64 {
61 UINT32 lo; ///< Lower 32 bits
62 UINT32 hi; ///< Upper 32 bits
65 * SBDFO - Segment Bus Device Function Offset
66 * 31:28 Segment (4-bits)
68 * 19:15 Device (5-bits)
69 * 14:12 Function(3-bits)
70 * 11:00 Offset (12-bits)
74 //#define MAKE_SBDFO(seg,bus,dev,fun,off) ((((UINT32)(seg))<<28) | (((UINT32)(bus))<<20) | \
75 // (((UINT32)(dev))<<15) | (((UINT32)(fun))<<12) | ((UINT32)(off)))
76 //#define SBDFO_SEG(x) (((UINT32)(x)>>28) & 0x0F)
77 //#define SBDFO_BUS(x) (((UINT32)(x)>>20) & 0xFF)
78 //#define SBDFO_DEV(x) (((UINT32)(x)>>15) & 0x1F)
79 //#define SBDFO_FUN(x) (((UINT32)(x)>>12) & 0x07)
80 //#define SBDFO_OFF(x) (((UINT32)(x)) & 0xFFF)
81 //#define ILLEGAL_SBDFO 0xFFFFFFFF
84 #define GET_SIZE_OF(x) (sizeof (x) / sizeof (x[0]))
86 #endif /* _MPORT_H_ */