]>
git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Wpce791/LpcSio.c
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
15 Abstract: Sio implementation
21 #include "LpcDriver.h"
22 #include <Library/S3BootScriptLib.h>
35 EFI_SIO_TABLE mSioTable
[] = {
37 // Init keyboard controller
39 { REG_LOGICAL_DEVICE
, SIO_KEYBOARD
},
40 { BASE_ADDRESS_HIGH
, 0x00 },
41 { BASE_ADDRESS_LOW
, 0x60 },
42 { BASE_ADDRESS_HIGH2
, 0x00 },
43 { BASE_ADDRESS_LOW2
, 0x64 },
44 { PRIMARY_INTERRUPT_SELECT
, 0x01 },
48 // Init Mouse controller
50 { REG_LOGICAL_DEVICE
, SIO_MOUSE
},
51 { BASE_ADDRESS_HIGH
, 0x00 },
52 { BASE_ADDRESS_LOW
, 0x60 },
53 { BASE_ADDRESS_HIGH2
, 0x00 },
54 { BASE_ADDRESS_LOW2
, 0x64 },
55 { PRIMARY_INTERRUPT_SELECT
, 0x0c },
58 { REG_LOGICAL_DEVICE
, SIO_COM
},
59 { BASE_ADDRESS_HIGH
, 0x03 },
60 { BASE_ADDRESS_LOW
, 0xf8 },
61 { PRIMARY_INTERRUPT_SELECT
, 0x04 },
68 LPCWPCE791SetDefault ()
72 for (Index
= 0; Index
< sizeof(mSioTable
)/sizeof(EFI_SIO_TABLE
); Index
++) {
73 WriteRegisterAndSaveToScript (mSioTable
[Index
].Register
, mSioTable
[Index
].Value
);
80 DisableLogicalDevice (
84 WriteRegisterAndSaveToScript (REG_LOGICAL_DEVICE
, DeviceId
);
85 WriteRegisterAndSaveToScript (ACTIVATE
, 0);
86 WriteRegisterAndSaveToScript (BASE_ADDRESS_HIGH
, 0);
87 WriteRegisterAndSaveToScript (BASE_ADDRESS_LOW
, 0);
98 LpcIoWrite8(CONFIG_PORT
, Index
);
99 LpcIoWrite8(DATA_PORT
, Data
);
105 WriteRegisterAndSaveToScript (
112 LpcIoWrite8(CONFIG_PORT
, Index
);
113 LpcIoWrite8(DATA_PORT
, Data
);
117 S3BootScriptSaveIoWrite (
118 EfiBootScriptWidthUint8
,