]>
git.proxmox.com Git - mirror_edk2.git/blob - QuarkSocPkg/QuarkNorthCluster/Include/Library/QNCAccessLib.h
2 Library functions for Setting QNC internal network port
4 Copyright (c) 2013-2015 Intel Corporation.
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __QNC_ACCESS_LIB_H__
17 #define __QNC_ACCESS_LIB_H__
19 #include <IntelQNCRegs.h>
21 #define MESSAGE_READ_DW(Port, Reg) \
22 (UINT32)((QUARK_OPCODE_READ << QNC_MCR_OP_OFFSET) | ((Port << QNC_MCR_PORT_OFFSET) & 0xFF0000) | ((Reg << QNC_MCR_REG_OFFSET) & 0xFF00) | 0xF0)
24 #define MESSAGE_WRITE_DW(Port, Reg) \
25 (UINT32)((QUARK_OPCODE_WRITE << QNC_MCR_OP_OFFSET) | ((Port << QNC_MCR_PORT_OFFSET) & 0xFF0000) | ((Reg << QNC_MCR_REG_OFFSET) & 0xFF00) | 0xF0)
27 #define ALT_MESSAGE_READ_DW(Port, Reg) \
28 (UINT32)((QUARK_ALT_OPCODE_READ << QNC_MCR_OP_OFFSET) | ((Port << QNC_MCR_PORT_OFFSET) & 0xFF0000) | ((Reg << QNC_MCR_REG_OFFSET) & 0xFF00) | 0xF0)
30 #define ALT_MESSAGE_WRITE_DW(Port, Reg) \
31 (UINT32)((QUARK_ALT_OPCODE_WRITE << QNC_MCR_OP_OFFSET) | ((Port << QNC_MCR_PORT_OFFSET) & 0xFF0000) | ((Reg << QNC_MCR_REG_OFFSET) & 0xFF00) | 0xF0)
33 #define MESSAGE_IO_READ_DW(Port, Reg) \
34 (UINT32)((QUARK_OPCODE_IO_READ << QNC_MCR_OP_OFFSET) | ((Port << QNC_MCR_PORT_OFFSET) & 0xFF0000) | ((Reg << QNC_MCR_REG_OFFSET) & 0xFF00) | 0xF0)
36 #define MESSAGE_IO_WRITE_DW(Port, Reg) \
37 (UINT32)((QUARK_OPCODE_IO_WRITE << QNC_MCR_OP_OFFSET) | ((Port << QNC_MCR_PORT_OFFSET) & 0xFF0000) | ((Reg << QNC_MCR_REG_OFFSET) & 0xFF00) | 0xF0)
39 #define MESSAGE_SHADOW_DW(Port, Reg) \
40 (UINT32)((QUARK_DRAM_BASE_ADDR_READY << QNC_MCR_OP_OFFSET) | ((Port << QNC_MCR_PORT_OFFSET) & 0xFF0000) | ((Reg << QNC_MCR_REG_OFFSET) & 0xFF00) | 0xF0)
44 Read required data from QNC internal message network
54 Write prepared data into QNC internal message network.
66 Read required data from QNC internal message network
76 Write prepared data into QNC internal message network.
88 Read required data from QNC internal message network
98 Write prepared data into QNC internal message network.
110 This is for the special consideration for QNC MMIO write, as required by FWG,
111 a reading must be performed after MMIO writing to ensure the expected write
112 is processed and data is flushed into chipset
119 QNC_MEM_IO_WIDTH Width
,
139 UINT32 ImrBaseOffset
,
163 QncGetPciExpressBaseAddress (