ReadAudioTool.c
/*
* ReadAudioTool.c
*
* Created on: 2017年9月30日
* Author:
*/
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/SerialPortLib.h>
#include <Library/IoLib.h>
#define R_HDA_STATESTS 0x0E // Wake Status
#define R_PCH_HDA_HDBARL 0x10 // HDA CTL Memory BAR Lower
#define IC 0x60
#define IR 0x64
#define ICS 0x68
#define SSIDCMD 0x001F2000
#define ICBEn 0x01
#ifndef PCI_EXPRESS_BASE_ADDRESS
#define PCI_EXPRESS_BASE_ADDRESS 0xE0000000
#endif
#define MmPciAddress( Segment, Bus, Device, Function, Register ) \
( (UINTN)PCI_EXPRESS_BASE_ADDRESS + \
(UINTN)(Bus << 20) + \
(UINTN)(Device << 15) + \
(UINTN)(Function << 12) + \
(UINTN)(Register) \
)
INTN
EFIAPI
ShellAppMain (
IN UINTN Argc,
IN CHAR16 **Argv
)
{
UINTN