]>
git.proxmox.com Git - mirror_edk2.git/blob - QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/io.h
2 Declaration of IO handling routines.
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.
18 #include "core_types.h"
20 #include "general_definitions.h"
21 #include "gen5_iosf_sb_definitions.h"
23 // Instruction not present on Quark
26 #define DEAD_LOOP() for(;;);
29 // Define each of the IOSF_SB ports used by MRC
33 // Has to be 0 because of emulation static data
35 // Space_t EmuSpace[ SPACE_COUNT] = {0};
39 // Pseudo side-band ports for access abstraction
40 // See Wr32/Rd32 functions
45 // Real side-band ports
46 // See Wr32/Rd32 functions
48 #define HOST_BRIDGE 0x003
49 #define MEMORY_MANAGER 0x005
54 // End of IOSF_SB ports
58 #define EC_BASE 0xE0000000
60 #define PCIADDR(bus,dev,fn,reg) ( \
67 // Various offsets used in the building sideband commands.
68 #define SB_OPCODE_OFFSET 24
69 #define SB_PORT_OFFSET 16
70 #define SB_REG_OFFEST 8
73 #define SB_REG_READ_OPCODE 0x10
74 #define SB_REG_WRITE_OPCODE 0x11
76 #define SB_FUSE_REG_READ_OPCODE 0x06
77 #define SB_FUSE_REG_WRITE_OPCODE 0x07
79 #define SB_DDRIO_REG_READ_OPCODE 0x06
80 #define SB_DDRIO_REG_WRITE_OPCODE 0x07
82 #define SB_DRAM_CMND_OPCODE 0x68
83 #define SB_WAKE_CMND_OPCODE 0xCA
84 #define SB_SUSPEND_CMND_OPCODE 0xCC
86 // Register addresses for sideband command and data.
87 #define SB_PACKET_REG 0x00D0
88 #define SB_DATA_REG 0x00D4
89 #define SB_HADR_REG 0x00D8
91 // We always flag all 4 bytes in the register reads/writes as required.
92 #define SB_ALL_BYTES_ENABLED 0xF0
94 #define SB_COMMAND(Opcode, Port, Reg) \
95 ((Opcode << SB_OPCODE_OFFSET) | \
96 (Port << SB_PORT_OFFSET) | \
97 (Reg << SB_REG_OFFEST) | \
101 #define isbM32m WrMask32