1 /*++ 2 3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR> 4 5 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 9 The full text of the license may be found at 11 http://opensource.org/licenses/bsd-license.php. 13 15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 17 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 19 21 23 Module Name: 24 25 LpcSio.h 26 27 Abstract: 28 29 Lpc driver's sio interface 30 31 32 33 --*/ 34 35 #ifndef _LPC_SIO_H 36 #define _LPC_SIO_H 37 38 #include "Protocol/PciRootBridgeIo.h" 39 40 #define VARSIOINSTALLED L"VarSIOProcotolInstalled" 41 42 // 43 // Port address 44 // 45 #define CONFIG_PORT 0x04E 46 #define INDEX_PORT 0x04E 47 #define DATA_PORT INDEX_PORT + 1 48 49 // 50 // Logical Device 51 // 52 #define SIO_COM 0x3 53 #define SIO_MSWC 0x4 54 #define SIO_MOUSE 0x5 55 #define SIO_KEYBOARD 0x6 56 #define SIO_SHM 0xF 57 #define SIO_PM1 0x11 58 #define SIO_PM2 0x12 59 #define SIO_PM3 0x17 60 #define SIO_ESHM 0x1D 61 62 // 63 // Global register 64 // 65 #define REG_LOGICAL_DEVICE 0x07 66 #define REG_DEVICE_ID 0x20 67 #define SIO_CONFIG_1 0x21 68 #define REG_CHIP_REV 0x24 69 #define SIO_CONFIG_5 0x25 70 #define SIO_CONFIG_6 0x26 71 #define REG_DEVICE_REV 0x27 72 #define SIO_CONFIG_9 0x29 73 #define SIO_CONFIG_D 0x2D 74 75 #define ACTIVATE 0x30 76 #define BASE_ADDRESS_HIGH 0x60 77 #define BASE_ADDRESS_LOW 0x61 78 #define BASE_ADDRESS_HIGH2 0x62 79 #define BASE_ADDRESS_LOW2 0x63 80 #define PRIMARY_INTERRUPT_SELECT 0x70 81 #define DMA_CHANNEL_SELECT 0x74 82 83 EFI_STATUS 84 InitializeLpcSio ( 85 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *RootBridgeIo 86 ); 87 88 // 89 // Prototypes for the sio internal function 90 // 91 // 92 // Internal function 93 // 94 VOID 95 LPCWPCE791SetDefault ( 96 VOID 97 ); 98 99 VOID 100 WriteRegisterAndSaveToScript ( 101 IN UINT8 Index, 102 IN UINT8 Data 103 ); 104 105 VOID 106 FloppyWriteProtect ( 107 VOID 108 ); 109 110 VOID 111 DisableLogicalDevice ( 112 UINT8 DeviceId 113 ); 114 115 #endif 116