From 9f7f5161cf2f6c1e29f4f11ff2a70454b223431a Mon Sep 17 00:00:00 2001 From: lpleahy Date: Tue, 20 Mar 2012 22:16:42 +0000 Subject: Update the license dates Use the BSD license Fix errors detected by GCC compiler in WebServer/ConfigurationTable.c Add libraries: CpuLib, DxeServicesTableLib and MtrrLib Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13115 6f19259b-4bc3-4df7-8a09-765794883524 --- AppPkg/Applications/Sockets/DataSink/DataSink.c | 2 +- AppPkg/Applications/Sockets/DataSink/DataSink.inf | 23 +- .../Applications/Sockets/DataSource/DataSource.c | 2 +- .../Applications/Sockets/DataSource/DataSource.inf | 23 +- .../Applications/Sockets/GetAddrInfo/GetAddrInfo.c | 2 +- .../Sockets/GetAddrInfo/GetAddrInfo.inf | 23 +- .../Sockets/GetHostByAddr/GetHostByAddr.c | 2 +- .../Sockets/GetHostByAddr/GetHostByAddr.inf | 23 +- .../Sockets/GetHostByDns/GetHostByDns.c | 2 +- .../Sockets/GetHostByDns/GetHostByDns.inf | 23 +- .../Sockets/GetHostByName/GetHostByName.c | 2 +- .../Sockets/GetHostByName/GetHostByName.inf | 23 +- .../Applications/Sockets/GetNameInfo/GetNameInfo.c | 2 +- .../Sockets/GetNameInfo/GetNameInfo.inf | 23 +- .../Sockets/GetNetByAddr/GetNetByAddr.c | 2 +- .../Sockets/GetNetByAddr/GetNetByAddr.inf | 23 +- .../Sockets/GetNetByName/GetNetByName.c | 2 +- .../Sockets/GetNetByName/GetNetByName.inf | 23 +- .../Sockets/GetServByName/GetServByName.c | 2 +- .../Sockets/GetServByName/GetServByName.inf | 23 +- .../Sockets/GetServByPort/GetServByPort.c | 2 +- .../Sockets/GetServByPort/GetServByPort.inf | 23 +- AppPkg/Applications/Sockets/OobRx/Main.c | 2 +- AppPkg/Applications/Sockets/OobRx/OobRx.c | 2 +- AppPkg/Applications/Sockets/OobRx/OobRx.h | 2 +- AppPkg/Applications/Sockets/OobRx/OobRx.inf | 23 +- AppPkg/Applications/Sockets/OobRx/Windows/main.c | 2 +- AppPkg/Applications/Sockets/OobTx/Main.c | 2 +- AppPkg/Applications/Sockets/OobTx/OobTx.c | 2 +- AppPkg/Applications/Sockets/OobTx/OobTx.h | 2 +- AppPkg/Applications/Sockets/OobTx/OobTx.inf | 23 +- AppPkg/Applications/Sockets/OobTx/Windows/main.c | 2 +- AppPkg/Applications/Sockets/RawIp4Rx/Main.c | 2 +- AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.c | 2 +- AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.h | 2 +- AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.inf | 23 +- .../Applications/Sockets/RawIp4Rx/Windows/main.c | 2 +- AppPkg/Applications/Sockets/RawIp4Tx/Main.c | 2 +- AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.c | 2 +- AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.h | 2 +- AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.inf | 23 +- .../Applications/Sockets/RawIp4Tx/Windows/main.c | 2 +- AppPkg/Applications/Sockets/RecvDgram/RecvDgram.c | 2 +- .../Applications/Sockets/RecvDgram/RecvDgram.inf | 23 +- .../Applications/Sockets/SetHostName/SetHostName.c | 2 +- .../Sockets/SetHostName/SetHostName.inf | 23 +- .../Applications/Sockets/SetSockOpt/SetSockOpt.c | 2 +- .../Applications/Sockets/SetSockOpt/SetSockOpt.inf | 23 +- AppPkg/Applications/Sockets/Sockets.inc | 5 + .../Applications/Sockets/TftpServer/TftpServer.inf | 23 +- AppPkg/Applications/Sockets/WebServer/ACPI.c | 861 ++++++++++++++++++--- .../Sockets/WebServer/BootServicesTable.c | 30 +- .../Sockets/WebServer/ConfigurationTable.c | 44 +- .../Applications/Sockets/WebServer/DhcpOptions.c | 32 +- .../Sockets/WebServer/DxeServicesTable.c | 30 +- AppPkg/Applications/Sockets/WebServer/Exit.c | 30 +- AppPkg/Applications/Sockets/WebServer/Firmware.c | 30 +- AppPkg/Applications/Sockets/WebServer/HTTP.c | 33 +- AppPkg/Applications/Sockets/WebServer/Handles.c | 30 +- AppPkg/Applications/Sockets/WebServer/Hello.c | 30 +- AppPkg/Applications/Sockets/WebServer/Index.c | 30 +- AppPkg/Applications/Sockets/WebServer/MemoryMap.c | 364 +++++++++ AppPkg/Applications/Sockets/WebServer/Mtrr.c | 825 ++++++++++++++++++++ AppPkg/Applications/Sockets/WebServer/PageList.c | 45 +- AppPkg/Applications/Sockets/WebServer/Ports.c | 30 +- AppPkg/Applications/Sockets/WebServer/Reboot.c | 32 +- .../Sockets/WebServer/RuntimeServicesTable.c | 30 +- .../Applications/Sockets/WebServer/SystemTable.c | 32 +- AppPkg/Applications/Sockets/WebServer/WebServer.c | 36 +- AppPkg/Applications/Sockets/WebServer/WebServer.h | 170 +++- .../Applications/Sockets/WebServer/WebServer.inf | 44 +- 71 files changed, 2510 insertions(+), 780 deletions(-) create mode 100644 AppPkg/Applications/Sockets/WebServer/MemoryMap.c create mode 100644 AppPkg/Applications/Sockets/WebServer/Mtrr.c diff --git a/AppPkg/Applications/Sockets/DataSink/DataSink.c b/AppPkg/Applications/Sockets/DataSink/DataSink.c index dcf4b59f3..f2c3b3b72 100644 --- a/AppPkg/Applications/Sockets/DataSink/DataSink.c +++ b/AppPkg/Applications/Sockets/DataSink/DataSink.c @@ -1,7 +1,7 @@ /** @file Data source for network testing. - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/DataSink/DataSink.inf b/AppPkg/Applications/Sockets/DataSink/DataSink.inf index 43a8e962f..9ad6fd93c 100644 --- a/AppPkg/Applications/Sockets/DataSink/DataSink.inf +++ b/AppPkg/Applications/Sockets/DataSink/DataSink.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # DataSink Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/DataSource/DataSource.c b/AppPkg/Applications/Sockets/DataSource/DataSource.c index 6ca3b587e..cf4caa2b4 100644 --- a/AppPkg/Applications/Sockets/DataSource/DataSource.c +++ b/AppPkg/Applications/Sockets/DataSource/DataSource.c @@ -1,7 +1,7 @@ /** @file Data source for network testing. - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/DataSource/DataSource.inf b/AppPkg/Applications/Sockets/DataSource/DataSource.inf index 8353041dd..d088177bc 100644 --- a/AppPkg/Applications/Sockets/DataSource/DataSource.inf +++ b/AppPkg/Applications/Sockets/DataSource/DataSource.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # DataSource Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/GetAddrInfo/GetAddrInfo.c b/AppPkg/Applications/Sockets/GetAddrInfo/GetAddrInfo.c index 3db71ba3d..27da91841 100644 --- a/AppPkg/Applications/Sockets/GetAddrInfo/GetAddrInfo.c +++ b/AppPkg/Applications/Sockets/GetAddrInfo/GetAddrInfo.c @@ -1,7 +1,7 @@ /** @file Test the getaddrinfo API - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/GetAddrInfo/GetAddrInfo.inf b/AppPkg/Applications/Sockets/GetAddrInfo/GetAddrInfo.inf index c0d5c2957..34267a860 100644 --- a/AppPkg/Applications/Sockets/GetAddrInfo/GetAddrInfo.inf +++ b/AppPkg/Applications/Sockets/GetAddrInfo/GetAddrInfo.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # GetAddrInfo Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.c b/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.c index bb5841588..2387a2c84 100644 --- a/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.c +++ b/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.c @@ -1,7 +1,7 @@ /** @file Translate the port number into a service name - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.inf b/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.inf index e2aee9e48..9ed1d37ad 100644 --- a/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.inf +++ b/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # GetHostByAddr Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.c b/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.c index a9aa183e4..83fa60c33 100644 --- a/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.c +++ b/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.c @@ -1,7 +1,7 @@ /** @file Translate the host name into an IP address - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.inf b/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.inf index a69e1ffcd..44d6fda75 100644 --- a/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.inf +++ b/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # GetHostByDns Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.c b/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.c index f81ca96af..1bddc614e 100644 --- a/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.c +++ b/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.c @@ -1,7 +1,7 @@ /** @file Translate the host name into an IP address - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.inf b/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.inf index 84dc8507b..f6d0aea46 100644 --- a/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.inf +++ b/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # GetHostByName Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/GetNameInfo/GetNameInfo.c b/AppPkg/Applications/Sockets/GetNameInfo/GetNameInfo.c index df5c2d631..d6fafde2a 100644 --- a/AppPkg/Applications/Sockets/GetNameInfo/GetNameInfo.c +++ b/AppPkg/Applications/Sockets/GetNameInfo/GetNameInfo.c @@ -1,7 +1,7 @@ /** @file Test the getnameinfo API - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/GetNameInfo/GetNameInfo.inf b/AppPkg/Applications/Sockets/GetNameInfo/GetNameInfo.inf index 0b9ceb59a..0aa35a5b6 100644 --- a/AppPkg/Applications/Sockets/GetNameInfo/GetNameInfo.inf +++ b/AppPkg/Applications/Sockets/GetNameInfo/GetNameInfo.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # GetNameInfo Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/GetNetByAddr/GetNetByAddr.c b/AppPkg/Applications/Sockets/GetNetByAddr/GetNetByAddr.c index ce07ceaa5..156aa2b2c 100644 --- a/AppPkg/Applications/Sockets/GetNetByAddr/GetNetByAddr.c +++ b/AppPkg/Applications/Sockets/GetNetByAddr/GetNetByAddr.c @@ -1,7 +1,7 @@ /** @file Translate the IPv4 address into a network name - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/GetNetByAddr/GetNetByAddr.inf b/AppPkg/Applications/Sockets/GetNetByAddr/GetNetByAddr.inf index 2bc1836f4..003b89fd9 100644 --- a/AppPkg/Applications/Sockets/GetNetByAddr/GetNetByAddr.inf +++ b/AppPkg/Applications/Sockets/GetNetByAddr/GetNetByAddr.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # GetNetByAddr Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.c b/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.c index a77fefce1..f4e0aca1a 100644 --- a/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.c +++ b/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.c @@ -1,7 +1,7 @@ /** @file Translate the network name into an IP address - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.inf b/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.inf index 8c706ba94..e5e741648 100644 --- a/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.inf +++ b/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # GetNetByName Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/GetServByName/GetServByName.c b/AppPkg/Applications/Sockets/GetServByName/GetServByName.c index f90bcf298..bd32d1d34 100644 --- a/AppPkg/Applications/Sockets/GetServByName/GetServByName.c +++ b/AppPkg/Applications/Sockets/GetServByName/GetServByName.c @@ -1,7 +1,7 @@ /** @file Translate the service name into a port number - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/GetServByName/GetServByName.inf b/AppPkg/Applications/Sockets/GetServByName/GetServByName.inf index 7af2f6c53..5c10b9014 100644 --- a/AppPkg/Applications/Sockets/GetServByName/GetServByName.inf +++ b/AppPkg/Applications/Sockets/GetServByName/GetServByName.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # GetServByName Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/GetServByPort/GetServByPort.c b/AppPkg/Applications/Sockets/GetServByPort/GetServByPort.c index 5be03618f..1b8dcd32e 100644 --- a/AppPkg/Applications/Sockets/GetServByPort/GetServByPort.c +++ b/AppPkg/Applications/Sockets/GetServByPort/GetServByPort.c @@ -1,7 +1,7 @@ /** @file Translate the port number into a service name - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/GetServByPort/GetServByPort.inf b/AppPkg/Applications/Sockets/GetServByPort/GetServByPort.inf index ef902c4a3..a6b5b61ab 100644 --- a/AppPkg/Applications/Sockets/GetServByPort/GetServByPort.inf +++ b/AppPkg/Applications/Sockets/GetServByPort/GetServByPort.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # GetServByPort Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/OobRx/Main.c b/AppPkg/Applications/Sockets/OobRx/Main.c index 0cdecdfaf..b4a37e081 100644 --- a/AppPkg/Applications/Sockets/OobRx/Main.c +++ b/AppPkg/Applications/Sockets/OobRx/Main.c @@ -1,7 +1,7 @@ /** @file Out-of-band receive test application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/OobRx/OobRx.c b/AppPkg/Applications/Sockets/OobRx/OobRx.c index 7e6b8f7ed..40d056d1f 100644 --- a/AppPkg/Applications/Sockets/OobRx/OobRx.c +++ b/AppPkg/Applications/Sockets/OobRx/OobRx.c @@ -1,7 +1,7 @@ /** @file Windows version of the OOB Receive application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/OobRx/OobRx.h b/AppPkg/Applications/Sockets/OobRx/OobRx.h index cd31ddc2d..0920029fd 100644 --- a/AppPkg/Applications/Sockets/OobRx/OobRx.h +++ b/AppPkg/Applications/Sockets/OobRx/OobRx.h @@ -1,7 +1,7 @@ /** @file Definitions for the OOB Receive application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/OobRx/OobRx.inf b/AppPkg/Applications/Sockets/OobRx/OobRx.inf index fd137dd23..17a493568 100644 --- a/AppPkg/Applications/Sockets/OobRx/OobRx.inf +++ b/AppPkg/Applications/Sockets/OobRx/OobRx.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # OobRx Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/OobRx/Windows/main.c b/AppPkg/Applications/Sockets/OobRx/Windows/main.c index 7d2c644fc..afae5dab5 100644 --- a/AppPkg/Applications/Sockets/OobRx/Windows/main.c +++ b/AppPkg/Applications/Sockets/OobRx/Windows/main.c @@ -1,7 +1,7 @@ /** @file Windows version of the OOB Receive application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/OobTx/Main.c b/AppPkg/Applications/Sockets/OobTx/Main.c index ac7c8b014..5b6ab02b9 100644 --- a/AppPkg/Applications/Sockets/OobTx/Main.c +++ b/AppPkg/Applications/Sockets/OobTx/Main.c @@ -1,7 +1,7 @@ /** @file Out-of-band transmit test application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/OobTx/OobTx.c b/AppPkg/Applications/Sockets/OobTx/OobTx.c index d52cbb70c..545e5f46a 100644 --- a/AppPkg/Applications/Sockets/OobTx/OobTx.c +++ b/AppPkg/Applications/Sockets/OobTx/OobTx.c @@ -1,7 +1,7 @@ /** @file Windows version of the OOB Transmit application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/OobTx/OobTx.h b/AppPkg/Applications/Sockets/OobTx/OobTx.h index ab8f39aa2..e042a133f 100644 --- a/AppPkg/Applications/Sockets/OobTx/OobTx.h +++ b/AppPkg/Applications/Sockets/OobTx/OobTx.h @@ -1,7 +1,7 @@ /** @file Definitions for the OOB Transmit application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/OobTx/OobTx.inf b/AppPkg/Applications/Sockets/OobTx/OobTx.inf index 7f7c091b0..f12e389eb 100644 --- a/AppPkg/Applications/Sockets/OobTx/OobTx.inf +++ b/AppPkg/Applications/Sockets/OobTx/OobTx.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # OobTx Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/OobTx/Windows/main.c b/AppPkg/Applications/Sockets/OobTx/Windows/main.c index cf149c402..dd0f3a21d 100644 --- a/AppPkg/Applications/Sockets/OobTx/Windows/main.c +++ b/AppPkg/Applications/Sockets/OobTx/Windows/main.c @@ -1,7 +1,7 @@ /** @file Windows version of the OOB Transmit application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/RawIp4Rx/Main.c b/AppPkg/Applications/Sockets/RawIp4Rx/Main.c index 21d482746..0857b2369 100644 --- a/AppPkg/Applications/Sockets/RawIp4Rx/Main.c +++ b/AppPkg/Applications/Sockets/RawIp4Rx/Main.c @@ -1,7 +1,7 @@ /** @file Raw IP4 receive test application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.c b/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.c index 9b6725fcd..bce4578f2 100644 --- a/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.c +++ b/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.c @@ -1,7 +1,7 @@ /** @file Raw IP4 receive application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.h b/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.h index 177222fc1..ae8daac32 100644 --- a/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.h +++ b/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.h @@ -1,7 +1,7 @@ /** @file Definitions for the raw IP4 receive application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.inf b/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.inf index b543f294e..232f050a1 100644 --- a/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.inf +++ b/AppPkg/Applications/Sockets/RawIp4Rx/RawIp4Rx.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # RawIp4 Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/RawIp4Rx/Windows/main.c b/AppPkg/Applications/Sockets/RawIp4Rx/Windows/main.c index d198db9ff..530c2d6e5 100644 --- a/AppPkg/Applications/Sockets/RawIp4Rx/Windows/main.c +++ b/AppPkg/Applications/Sockets/RawIp4Rx/Windows/main.c @@ -1,7 +1,7 @@ /** @file Windows version of the raw IP4 receive application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/RawIp4Tx/Main.c b/AppPkg/Applications/Sockets/RawIp4Tx/Main.c index cec5cd7d6..451193a05 100644 --- a/AppPkg/Applications/Sockets/RawIp4Tx/Main.c +++ b/AppPkg/Applications/Sockets/RawIp4Tx/Main.c @@ -1,7 +1,7 @@ /** @file Raw IP4 transmit test application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.c b/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.c index aea946c27..f6efbe136 100644 --- a/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.c +++ b/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.c @@ -1,7 +1,7 @@ /** @file Raw IP4 transmit application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.h b/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.h index 820ff58f0..2fe2839ca 100644 --- a/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.h +++ b/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.h @@ -1,7 +1,7 @@ /** @file Definitions for the raw IP4 transmit application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.inf b/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.inf index 8852f148c..32d518269 100644 --- a/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.inf +++ b/AppPkg/Applications/Sockets/RawIp4Tx/RawIp4Tx.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # RawIp4Tx Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/RawIp4Tx/Windows/main.c b/AppPkg/Applications/Sockets/RawIp4Tx/Windows/main.c index 23946ac76..441a951f6 100644 --- a/AppPkg/Applications/Sockets/RawIp4Tx/Windows/main.c +++ b/AppPkg/Applications/Sockets/RawIp4Tx/Windows/main.c @@ -1,7 +1,7 @@ /** @file Windows version of the raw IP4 transmit application - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/RecvDgram/RecvDgram.c b/AppPkg/Applications/Sockets/RecvDgram/RecvDgram.c index 695db938b..84670050d 100644 --- a/AppPkg/Applications/Sockets/RecvDgram/RecvDgram.c +++ b/AppPkg/Applications/Sockets/RecvDgram/RecvDgram.c @@ -1,7 +1,7 @@ /** @file Receive a datagram - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/RecvDgram/RecvDgram.inf b/AppPkg/Applications/Sockets/RecvDgram/RecvDgram.inf index 6e51317a7..89e907c14 100644 --- a/AppPkg/Applications/Sockets/RecvDgram/RecvDgram.inf +++ b/AppPkg/Applications/Sockets/RecvDgram/RecvDgram.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # Receive Datagram Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/SetHostName/SetHostName.c b/AppPkg/Applications/Sockets/SetHostName/SetHostName.c index 2986b66ba..2c8001e20 100644 --- a/AppPkg/Applications/Sockets/SetHostName/SetHostName.c +++ b/AppPkg/Applications/Sockets/SetHostName/SetHostName.c @@ -1,7 +1,7 @@ /** @file Set the host name - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/SetHostName/SetHostName.inf b/AppPkg/Applications/Sockets/SetHostName/SetHostName.inf index 539a315e4..97b63822b 100644 --- a/AppPkg/Applications/Sockets/SetHostName/SetHostName.inf +++ b/AppPkg/Applications/Sockets/SetHostName/SetHostName.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # SetHostName Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/SetSockOpt/SetSockOpt.c b/AppPkg/Applications/Sockets/SetSockOpt/SetSockOpt.c index 0df143a51..bba8f4b85 100644 --- a/AppPkg/Applications/Sockets/SetSockOpt/SetSockOpt.c +++ b/AppPkg/Applications/Sockets/SetSockOpt/SetSockOpt.c @@ -1,7 +1,7 @@ /** @file Set the socket options - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/AppPkg/Applications/Sockets/SetSockOpt/SetSockOpt.inf b/AppPkg/Applications/Sockets/SetSockOpt/SetSockOpt.inf index 4de513380..8f6ab004e 100644 --- a/AppPkg/Applications/Sockets/SetSockOpt/SetSockOpt.inf +++ b/AppPkg/Applications/Sockets/SetSockOpt/SetSockOpt.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # SetHostName Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/Sockets.inc b/AppPkg/Applications/Sockets/Sockets.inc index 4aa882203..4ad109fad 100644 --- a/AppPkg/Applications/Sockets/Sockets.inc +++ b/AppPkg/Applications/Sockets/Sockets.inc @@ -23,6 +23,11 @@ AppPkg/Applications/Sockets/SetHostName/SetHostName.inf AppPkg/Applications/Sockets/SetSockOpt/SetSockOpt.inf AppPkg/Applications/Sockets/WebServer/WebServer.inf { + + CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf + DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf + MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf + gAppPkgTokenSpaceGuid.WebServer_HttpPort|80 } diff --git a/AppPkg/Applications/Sockets/TftpServer/TftpServer.inf b/AppPkg/Applications/Sockets/TftpServer/TftpServer.inf index d7cbfaa30..f069494b3 100644 --- a/AppPkg/Applications/Sockets/TftpServer/TftpServer.inf +++ b/AppPkg/Applications/Sockets/TftpServer/TftpServer.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # TFTP Server Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/AppPkg/Applications/Sockets/WebServer/ACPI.c b/AppPkg/Applications/Sockets/WebServer/ACPI.c index 7387439f5..e086a2d58 100644 --- a/AppPkg/Applications/Sockets/WebServer/ACPI.c +++ b/AppPkg/Applications/Sockets/WebServer/ACPI.c @@ -1,25 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. - ---*/ - -/** @file - Display the runtime services table +/** + @file + Display the ACPI tables + + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -138,6 +128,11 @@ typedef struct { } ACPI_RSDT; +typedef struct { + UINT32 Signature; // 0 + UINT32 Length; // 4 +} ACPI_UNKNOWN; + #pragma pack() @@ -149,8 +144,15 @@ typedef struct { CONST TABLE_SIGNATURE mTableId[] = { + { APIC_SIGNATURE, "APIC", PAGE_ACPI_APIC }, + { BGRT_SIGNATURE, "BGRT", PAGE_ACPI_BGRT }, { DSDT_SIGNATURE, "DSDT", PAGE_ACPI_DSDT }, - { FADT_SIGNATURE, "FADT", PAGE_ACPI_FADT } + { FADT_SIGNATURE, "FADT", PAGE_ACPI_FADT }, + { HPET_SIGNATURE, "HPET", PAGE_ACPI_HPET }, + { MCFG_SIGNATURE, "MCFG", PAGE_ACPI_MCFG }, + { SSDT_SIGNATURE, "SSDT", PAGE_ACPI_SSDT }, + { TCPA_SIGNATURE, "TCPA", PAGE_ACPI_TCPA }, + { UEFI_SIGNATURE, "UEFI", PAGE_ACPI_UEFI } }; @@ -815,6 +817,188 @@ SignatureLookup ( } +/** + Respond with the APIC table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiApicPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ) +{ + CONST ACPI_UNKNOWN * pApic; + EFI_STATUS Status; + + DBG_ENTER ( ); + + // + // Send the APIC page + // + for ( ; ; ) { + // + // Locate the APIC + // + pApic = (ACPI_UNKNOWN *)LocateTable ( APIC_SIGNATURE ); + if ( NULL == pApic ) { + Status = EFI_NOT_FOUND; + break; + } + + // + // Send the page and table header + // + Status = TableHeader ( SocketFD, pPort, L"APIC Table", pApic ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the header + // + Status = RowAnsiArray ( SocketFD, + pPort, + "Signature", + sizeof ( pApic->Signature ), + (CHAR8 *)&pApic->Signature ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowDecimalValue ( SocketFD, + pPort, + "Length", + pApic->Length ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the data from the table + // + Status = RowDump ( SocketFD, + pPort, + "Data", + pApic->Length - sizeof ( *pApic ) + 1, + (UINT8 *)( pApic + 1 )); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Build the table trailer + // + Status = TableTrailer ( SocketFD, + pPort, + pbDone ); + break; + } + + // + // Return the operation status + // + DBG_EXIT_STATUS ( Status ); + return Status; +} + + +/** + Respond with the BGRT table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiBgrtPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ) +{ + CONST ACPI_UNKNOWN * pBgrt; + EFI_STATUS Status; + + DBG_ENTER ( ); + + // + // Send the BGRT page + // + for ( ; ; ) { + // + // Locate the BGRT + // + pBgrt = (ACPI_UNKNOWN *)LocateTable ( BGRT_SIGNATURE ); + if ( NULL == pBgrt ) { + Status = EFI_NOT_FOUND; + break; + } + + // + // Send the page and table header + // + Status = TableHeader ( SocketFD, pPort, L"BGRT Table", pBgrt ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the header + // + Status = RowAnsiArray ( SocketFD, + pPort, + "Signature", + sizeof ( pBgrt->Signature ), + (CHAR8 *)&pBgrt->Signature ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowDecimalValue ( SocketFD, + pPort, + "Length", + pBgrt->Length ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the data from the table + // + Status = RowDump ( SocketFD, + pPort, + "Data", + pBgrt->Length - sizeof ( *pBgrt ) + 1, + (UINT8 *)( pBgrt + 1 )); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Build the table trailer + // + Status = TableTrailer ( SocketFD, + pPort, + pbDone ); + break; + } + + // + // Return the operation status + // + DBG_EXIT_STATUS ( Status ); + return Status; +} + + /** Respond with the ACPI DSDT table @@ -1514,7 +1698,7 @@ AcpiFadtPage ( /** - Respond with the ACPI RSDP 1.0b table + Respond with the HPET table @param [in] SocketFD The socket's file descriptor to add to the list. @param [in] pPort The WSDT_PORT structure address @@ -1524,77 +1708,65 @@ AcpiFadtPage ( **/ EFI_STATUS -AcpiRsdp10Page ( +AcpiHpetPage ( IN int SocketFD, IN WSDT_PORT * pPort, OUT BOOLEAN * pbDone ) { - CONST EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER * pRsdp10b; + CONST ACPI_UNKNOWN * pHpet; EFI_STATUS Status; DBG_ENTER ( ); // - // Send the RSDP page + // Send the HPET page // for ( ; ; ) { // - // Locate the RSDP + // Locate the HPET // - Status = EfiGetSystemConfigurationTable ( &gEfiAcpi10TableGuid, (VOID **) &pRsdp10b ); - if ( EFI_ERROR ( Status )) { + pHpet = (ACPI_UNKNOWN *)LocateTable ( HPET_SIGNATURE ); + if ( NULL == pHpet ) { + Status = EFI_NOT_FOUND; break; } // // Send the page and table header // - Status = TableHeader ( SocketFD, pPort, L"RSDP - ACPI 1.0b Root System Description Pointer", pRsdp10b ); + Status = TableHeader ( SocketFD, pPort, L"HPET Table", pHpet ); if ( EFI_ERROR ( Status )) { break; } // - // Display the RSDP + // Display the header // Status = RowAnsiArray ( SocketFD, pPort, "Signature", - sizeof ( pRsdp10b->Signature ), - (CHAR8 *)&pRsdp10b->Signature ); - if ( EFI_ERROR ( Status )) { - break; - } - Status = RowHexValue ( SocketFD, - pPort, - "Checksum", - pRsdp10b->Checksum, - NULL ); - if ( EFI_ERROR ( Status )) { - break; - } - Status = RowAnsiArray ( SocketFD, - pPort, - "OemId", - sizeof ( pRsdp10b->OemId ), - (CONST CHAR8 *)&pRsdp10b->OemId[ 0 ]); + sizeof ( pHpet->Signature ), + (CHAR8 *)&pHpet->Signature ); if ( EFI_ERROR ( Status )) { break; } - Status = RowHexValue ( SocketFD, - pPort, - "Reserved", - pRsdp10b->Reserved, - NULL ); + Status = RowDecimalValue ( SocketFD, + pPort, + "Length", + pHpet->Length ); if ( EFI_ERROR ( Status )) { break; } - Status = RowPointer ( SocketFD, - pPort, - "RsdtAddress", - (VOID *)(UINTN)pRsdp10b->RsdtAddress, - PAGE_ACPI_RSDT ); + + // + // Display the data from the table + // + Status = RowDump ( SocketFD, + pPort, + "Data", + pHpet->Length - sizeof ( *pHpet ) + 1, + (UINT8 *)( pHpet + 1 )); if ( EFI_ERROR ( Status )) { break; } @@ -1617,7 +1789,7 @@ AcpiRsdp10Page ( /** - Respond with the ACPI RSDP 3.0 table + Respond with the MCFG table @param [in] SocketFD The socket's file descriptor to add to the list. @param [in] pPort The WSDT_PORT structure address @@ -1627,92 +1799,286 @@ AcpiRsdp10Page ( **/ EFI_STATUS -AcpiRsdp30Page ( +AcpiMcfgPage ( IN int SocketFD, IN WSDT_PORT * pPort, OUT BOOLEAN * pbDone ) { - CONST EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER * pRsdp30; + CONST ACPI_UNKNOWN * pMcfg; EFI_STATUS Status; DBG_ENTER ( ); // - // Send the RSDP page + // Send the MCFG page // for ( ; ; ) { // - // Locate the RSDP + // Locate the MCFG // - Status = EfiGetSystemConfigurationTable ( &gEfiAcpiTableGuid, (VOID **) &pRsdp30 ); - if ( EFI_ERROR ( Status )) { + pMcfg = (ACPI_UNKNOWN *)LocateTable ( MCFG_SIGNATURE ); + if ( NULL == pMcfg ) { + Status = EFI_NOT_FOUND; break; } // // Send the page and table header // - Status = TableHeader ( SocketFD, pPort, L"RSDP - ACPI 3.0 Root System Description Pointer", pRsdp30 ); + Status = TableHeader ( SocketFD, pPort, L"MCFG Table", pMcfg ); if ( EFI_ERROR ( Status )) { break; } // - // Display the RSDP + // Display the header // Status = RowAnsiArray ( SocketFD, pPort, "Signature", - sizeof ( pRsdp30->Signature ), - (CHAR8 *)&pRsdp30->Signature ); - if ( EFI_ERROR ( Status )) { - break; - } - Status = RowHexValue ( SocketFD, - pPort, - "Checksum", - pRsdp30->Checksum, - NULL ); - if ( EFI_ERROR ( Status )) { - break; - } - Status = RowAnsiArray ( SocketFD, - pPort, - "OemId", - sizeof ( pRsdp30->OemId ), - (CONST CHAR8 *)&pRsdp30->OemId[ 0 ]); - if ( EFI_ERROR ( Status )) { - break; - } - Status = RowHexValue ( SocketFD, - pPort, - "Revision", - pRsdp30->Revision, - NULL ); - if ( EFI_ERROR ( Status )) { - break; - } - Status = RowPointer ( SocketFD, - pPort, - "RsdtAddress", - (VOID *)(UINTN)pRsdp30->RsdtAddress, - PAGE_ACPI_RSDT ); + sizeof ( pMcfg->Signature ), + (CHAR8 *)&pMcfg->Signature ); if ( EFI_ERROR ( Status )) { break; } Status = RowDecimalValue ( SocketFD, pPort, "Length", - pRsdp30->Length ); - if ( EFI_ERROR ( Status )) { - break; - } - Status = RowPointer ( SocketFD, - pPort, - "XsdtAddress", - (VOID *)(UINTN)pRsdp30->XsdtAddress, - NULL ); + pMcfg->Length ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the data from the table + // + Status = RowDump ( SocketFD, + pPort, + "Data", + pMcfg->Length - sizeof ( *pMcfg ) + 1, + (UINT8 *)( pMcfg + 1 )); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Build the table trailer + // + Status = TableTrailer ( SocketFD, + pPort, + pbDone ); + break; + } + + // + // Return the operation status + // + DBG_EXIT_STATUS ( Status ); + return Status; +} + + +/** + Respond with the ACPI RSDP 1.0b table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiRsdp10Page ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ) +{ + CONST EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER * pRsdp10b; + EFI_STATUS Status; + + DBG_ENTER ( ); + + // + // Send the RSDP page + // + for ( ; ; ) { + // + // Locate the RSDP + // + Status = EfiGetSystemConfigurationTable ( &gEfiAcpi10TableGuid, (VOID **) &pRsdp10b ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Send the page and table header + // + Status = TableHeader ( SocketFD, pPort, L"RSDP - ACPI 1.0b Root System Description Pointer", pRsdp10b ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the RSDP + // + Status = RowAnsiArray ( SocketFD, + pPort, + "Signature", + sizeof ( pRsdp10b->Signature ), + (CHAR8 *)&pRsdp10b->Signature ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowHexValue ( SocketFD, + pPort, + "Checksum", + pRsdp10b->Checksum, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowAnsiArray ( SocketFD, + pPort, + "OemId", + sizeof ( pRsdp10b->OemId ), + (CONST CHAR8 *)&pRsdp10b->OemId[ 0 ]); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowHexValue ( SocketFD, + pPort, + "Reserved", + pRsdp10b->Reserved, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "RsdtAddress", + (VOID *)(UINTN)pRsdp10b->RsdtAddress, + PAGE_ACPI_RSDT ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Build the table trailer + // + Status = TableTrailer ( SocketFD, + pPort, + pbDone ); + break; + } + + // + // Return the operation status + // + DBG_EXIT_STATUS ( Status ); + return Status; +} + + +/** + Respond with the ACPI RSDP 3.0 table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiRsdp30Page ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ) +{ + CONST EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER * pRsdp30; + EFI_STATUS Status; + + DBG_ENTER ( ); + + // + // Send the RSDP page + // + for ( ; ; ) { + // + // Locate the RSDP + // + Status = EfiGetSystemConfigurationTable ( &gEfiAcpiTableGuid, (VOID **) &pRsdp30 ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Send the page and table header + // + Status = TableHeader ( SocketFD, pPort, L"RSDP - ACPI 3.0 Root System Description Pointer", pRsdp30 ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the RSDP + // + Status = RowAnsiArray ( SocketFD, + pPort, + "Signature", + sizeof ( pRsdp30->Signature ), + (CHAR8 *)&pRsdp30->Signature ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowHexValue ( SocketFD, + pPort, + "Checksum", + pRsdp30->Checksum, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowAnsiArray ( SocketFD, + pPort, + "OemId", + sizeof ( pRsdp30->OemId ), + (CONST CHAR8 *)&pRsdp30->OemId[ 0 ]); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowHexValue ( SocketFD, + pPort, + "Revision", + pRsdp30->Revision, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "RsdtAddress", + (VOID *)(UINTN)pRsdp30->RsdtAddress, + PAGE_ACPI_RSDT ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowDecimalValue ( SocketFD, + pPort, + "Length", + pRsdp30->Length ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "XsdtAddress", + (VOID *)(UINTN)pRsdp30->XsdtAddress, + NULL ); if ( EFI_ERROR ( Status )) { break; } @@ -1918,3 +2284,274 @@ AcpiRsdtPage ( } +/** + Respond with the SSDT table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiSsdtPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ) +{ + CONST ACPI_UNKNOWN * pSsdt; + EFI_STATUS Status; + + DBG_ENTER ( ); + + // + // Send the SSDT page + // + for ( ; ; ) { + // + // Locate the SSDT + // + pSsdt = (ACPI_UNKNOWN *)LocateTable ( SSDT_SIGNATURE ); + if ( NULL == pSsdt ) { + Status = EFI_NOT_FOUND; + break; + } + + // + // Send the page and table header + // + Status = TableHeader ( SocketFD, pPort, L"SSDT Table", pSsdt ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the header + // + Status = RowAnsiArray ( SocketFD, + pPort, + "Signature", + sizeof ( pSsdt->Signature ), + (CHAR8 *)&pSsdt->Signature ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowDecimalValue ( SocketFD, + pPort, + "Length", + pSsdt->Length ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the data from the table + // + Status = RowDump ( SocketFD, + pPort, + "Data", + pSsdt->Length - sizeof ( *pSsdt ) + 1, + (UINT8 *)( pSsdt + 1 )); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Build the table trailer + // + Status = TableTrailer ( SocketFD, + pPort, + pbDone ); + break; + } + + // + // Return the operation status + // + DBG_EXIT_STATUS ( Status ); + return Status; +} + + +/** + Respond with the TCPA table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiTcpaPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ) +{ + CONST ACPI_UNKNOWN * pTcpa; + EFI_STATUS Status; + + DBG_ENTER ( ); + + // + // Send the TCPA page + // + for ( ; ; ) { + // + // Locate the TCPA + // + pTcpa = (ACPI_UNKNOWN *)LocateTable ( TCPA_SIGNATURE ); + if ( NULL == pTcpa ) { + Status = EFI_NOT_FOUND; + break; + } + + // + // Send the page and table header + // + Status = TableHeader ( SocketFD, pPort, L"TCPA Table", pTcpa ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the header + // + Status = RowAnsiArray ( SocketFD, + pPort, + "Signature", + sizeof ( pTcpa->Signature ), + (CHAR8 *)&pTcpa->Signature ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowDecimalValue ( SocketFD, + pPort, + "Length", + pTcpa->Length ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the data from the table + // + Status = RowDump ( SocketFD, + pPort, + "Data", + pTcpa->Length - sizeof ( *pTcpa ) + 1, + (UINT8 *)( pTcpa + 1 )); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Build the table trailer + // + Status = TableTrailer ( SocketFD, + pPort, + pbDone ); + break; + } + + // + // Return the operation status + // + DBG_EXIT_STATUS ( Status ); + return Status; +} + + +/** + Respond with the UEFI table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiUefiPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ) +{ + CONST ACPI_UNKNOWN * pUefi; + EFI_STATUS Status; + + DBG_ENTER ( ); + + // + // Send the UEFI page + // + for ( ; ; ) { + // + // Locate the UEFI + // + pUefi = (ACPI_UNKNOWN *)LocateTable ( UEFI_SIGNATURE ); + if ( NULL == pUefi ) { + Status = EFI_NOT_FOUND; + break; + } + + // + // Send the page and table header + // + Status = TableHeader ( SocketFD, pPort, L"UEFI Table", pUefi ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the header + // + Status = RowAnsiArray ( SocketFD, + pPort, + "Signature", + sizeof ( pUefi->Signature ), + (CHAR8 *)&pUefi->Signature ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowDecimalValue ( SocketFD, + pPort, + "Length", + pUefi->Length ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the data from the table + // + Status = RowDump ( SocketFD, + pPort, + "Data", + pUefi->Length - sizeof ( *pUefi ) + 1, + (UINT8 *)( pUefi + 1 )); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Build the table trailer + // + Status = TableTrailer ( SocketFD, + pPort, + pbDone ); + break; + } + + // + // Return the operation status + // + DBG_EXIT_STATUS ( Status ); + return Status; +} diff --git a/AppPkg/Applications/Sockets/WebServer/BootServicesTable.c b/AppPkg/Applications/Sockets/WebServer/BootServicesTable.c index ab0164976..4fc132470 100644 --- a/AppPkg/Applications/Sockets/WebServer/BootServicesTable.c +++ b/AppPkg/Applications/Sockets/WebServer/BootServicesTable.c @@ -1,25 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. +/** + @file + Display the boot services table ---*/ + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php -/** @file - Display the boot services table + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/AppPkg/Applications/Sockets/WebServer/ConfigurationTable.c b/AppPkg/Applications/Sockets/WebServer/ConfigurationTable.c index 9208a46b5..f6303dfed 100644 --- a/AppPkg/Applications/Sockets/WebServer/ConfigurationTable.c +++ b/AppPkg/Applications/Sockets/WebServer/ConfigurationTable.c @@ -1,35 +1,25 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. - ---*/ - -/** @file +/** + @file Display the configuration table + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + **/ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include typedef struct { diff --git a/AppPkg/Applications/Sockets/WebServer/DhcpOptions.c b/AppPkg/Applications/Sockets/WebServer/DhcpOptions.c index 0a2e6cfde..e3e77f354 100644 --- a/AppPkg/Applications/Sockets/WebServer/DhcpOptions.c +++ b/AppPkg/Applications/Sockets/WebServer/DhcpOptions.c @@ -1,26 +1,16 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. - ---*/ - -/** @file +/** + @file Display the DHCP options + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + **/ #include diff --git a/AppPkg/Applications/Sockets/WebServer/DxeServicesTable.c b/AppPkg/Applications/Sockets/WebServer/DxeServicesTable.c index bfe90cd90..d46ce7096 100644 --- a/AppPkg/Applications/Sockets/WebServer/DxeServicesTable.c +++ b/AppPkg/Applications/Sockets/WebServer/DxeServicesTable.c @@ -1,25 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. +/** + @file + Display the DXE services table ---*/ + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php -/** @file - Display the DXE services table + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/AppPkg/Applications/Sockets/WebServer/Exit.c b/AppPkg/Applications/Sockets/WebServer/Exit.c index cad4b006b..5ff09d315 100644 --- a/AppPkg/Applications/Sockets/WebServer/Exit.c +++ b/AppPkg/Applications/Sockets/WebServer/Exit.c @@ -1,25 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. +/** + @file + Exit response page ---*/ + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php -/** @file - Exit response page + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/AppPkg/Applications/Sockets/WebServer/Firmware.c b/AppPkg/Applications/Sockets/WebServer/Firmware.c index 4d5aad6d8..a29da5e01 100644 --- a/AppPkg/Applications/Sockets/WebServer/Firmware.c +++ b/AppPkg/Applications/Sockets/WebServer/Firmware.c @@ -1,25 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. +/** + @file + Display the firmware ---*/ + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php -/** @file - Display the firmware + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/AppPkg/Applications/Sockets/WebServer/HTTP.c b/AppPkg/Applications/Sockets/WebServer/HTTP.c index 5237ac1a4..fae1dd926 100644 --- a/AppPkg/Applications/Sockets/WebServer/HTTP.c +++ b/AppPkg/Applications/Sockets/WebServer/HTTP.c @@ -1,30 +1,21 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. - ---*/ - -/** @file +/** + @file HTTP processing for the web server. + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + **/ #include + /** Get a UTF-8 character from the buffer diff --git a/AppPkg/Applications/Sockets/WebServer/Handles.c b/AppPkg/Applications/Sockets/WebServer/Handles.c index f39620aa4..19a55ddbc 100644 --- a/AppPkg/Applications/Sockets/WebServer/Handles.c +++ b/AppPkg/Applications/Sockets/WebServer/Handles.c @@ -1,25 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. +/** + @file + Display the handles in the system ---*/ + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php -/** @file - Display the handles in the system + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/AppPkg/Applications/Sockets/WebServer/Hello.c b/AppPkg/Applications/Sockets/WebServer/Hello.c index 5f65133f4..3d1f97953 100644 --- a/AppPkg/Applications/Sockets/WebServer/Hello.c +++ b/AppPkg/Applications/Sockets/WebServer/Hello.c @@ -1,25 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. +/** + @file + Hello World response page ---*/ + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php -/** @file - Hello World response page + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/AppPkg/Applications/Sockets/WebServer/Index.c b/AppPkg/Applications/Sockets/WebServer/Index.c index 688d19728..64c1ffcb5 100644 --- a/AppPkg/Applications/Sockets/WebServer/Index.c +++ b/AppPkg/Applications/Sockets/WebServer/Index.c @@ -1,25 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. +/** + @file + Generate the list of known pages. ---*/ + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php -/** @file - Generate the list of known pages. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/AppPkg/Applications/Sockets/WebServer/MemoryMap.c b/AppPkg/Applications/Sockets/WebServer/MemoryMap.c new file mode 100644 index 000000000..71a5b1d8c --- /dev/null +++ b/AppPkg/Applications/Sockets/WebServer/MemoryMap.c @@ -0,0 +1,364 @@ +/** + @file + Display the memory map + + Copyright (c) 2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include +#include +#include + + +CONST char * mpMemoryType[ ] = { + "Non-existent", + "Reserved", + "System Memory", + "Memory Mapped I/O" +}; + + +/** + Page to display the memory map + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +MemoryMapPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ) +{ + UINT64 Attributes; + BOOLEAN bSomethingDisplayed; + UINTN Count; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR * pMemoryEnd; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR * pMemoryDescriptor; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR * pMemoryDescriptorStart; + EFI_STATUS Status; + + DBG_ENTER ( ); + + // + // Send the memory map page + // + pMemoryDescriptorStart = NULL; + for ( ; ; ) { + // + // Send the page header + // + Status = HttpPageHeader ( SocketFD, pPort, L"Memory Map" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Start the table + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "

Memory Map

\r\n" + "\r\n" + " \r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Get the memory map + // + Status = gDS->GetMemorySpaceMap ( &Count, + &pMemoryDescriptor ); + if ( !EFI_ERROR ( Status )) { + pMemoryDescriptorStart = pMemoryDescriptor; + pMemoryEnd = &pMemoryDescriptor[ Count ]; + while ( pMemoryEnd > pMemoryDescriptor ) { + // + // Display the type + // + Status = HttpSendAnsiString ( SocketFD, pPort, "" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Set the next memory descriptor + // + pMemoryDescriptor += 1; + } + } + + // + // Finish the table + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "
TypeStartEndAttributes
" ); + if ( EFI_ERROR ( Status )) { + break; + } + if ( DIM ( mpMemoryType ) > pMemoryDescriptor->GcdMemoryType ) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + mpMemoryType[ pMemoryDescriptor->GcdMemoryType ]); + } + else { + Status = HttpSendValue ( SocketFD, + pPort, + pMemoryDescriptor->GcdMemoryType ); + } + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the start address + // + Status = HttpSendAnsiString ( SocketFD, pPort, "0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + pMemoryDescriptor->BaseAddress ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the end address + // + Status = HttpSendAnsiString ( SocketFD, pPort, "0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + pMemoryDescriptor->BaseAddress + + pMemoryDescriptor->Length + - 1 ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the attributes + // + Status = HttpSendAnsiString ( SocketFD, pPort, "0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + pMemoryDescriptor->Attributes ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Decode the attributes + // + Status = HttpSendAnsiString ( SocketFD, pPort, "" ); + if ( EFI_ERROR ( Status )) { + break; + } + bSomethingDisplayed = FALSE; + Attributes = pMemoryDescriptor->Attributes; + + if ( 0 != ( Attributes & EFI_MEMORY_RUNTIME )) { + bSomethingDisplayed = TRUE; + Status = HttpSendAnsiString ( SocketFD, + pPort, + "Runtime" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + + if ( 0 != ( Attributes & EFI_MEMORY_XP )) { + if ( bSomethingDisplayed ) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + ", " ); + if ( EFI_ERROR ( Status )) { + break; + } + } + bSomethingDisplayed = TRUE; + Status = HttpSendAnsiString ( SocketFD, + pPort, + "No Execute" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + + if ( 0 != ( Attributes & EFI_MEMORY_RP )) { + if ( bSomethingDisplayed ) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + ", " ); + if ( EFI_ERROR ( Status )) { + break; + } + } + bSomethingDisplayed = TRUE; + Status = HttpSendAnsiString ( SocketFD, + pPort, + "No Read" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + + if ( 0 != ( Attributes & EFI_MEMORY_WP )) { + if ( bSomethingDisplayed ) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + ", " ); + if ( EFI_ERROR ( Status )) { + break; + } + } + bSomethingDisplayed = TRUE; + Status = HttpSendAnsiString ( SocketFD, + pPort, + "No Write" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + + if ( 0 != ( Attributes & EFI_MEMORY_UCE )) { + if ( bSomethingDisplayed ) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + ", " ); + if ( EFI_ERROR ( Status )) { + break; + } + } + bSomethingDisplayed = TRUE; + Status = HttpSendAnsiString ( SocketFD, + pPort, + "UCE" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + + + if ( 0 != ( Attributes & EFI_MEMORY_WB )) { + if ( bSomethingDisplayed ) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + ", " ); + if ( EFI_ERROR ( Status )) { + break; + } + } + bSomethingDisplayed = TRUE; + Status = HttpSendAnsiString ( SocketFD, + pPort, + "Write Back" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + + if ( 0 != ( Attributes & EFI_MEMORY_WT )) { + if ( bSomethingDisplayed ) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + ", " ); + if ( EFI_ERROR ( Status )) { + break; + } + } + bSomethingDisplayed = TRUE; + Status = HttpSendAnsiString ( SocketFD, + pPort, + "Write Through" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + + if ( 0 != ( Attributes & EFI_MEMORY_WC )) { + if ( bSomethingDisplayed ) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + ", " ); + if ( EFI_ERROR ( Status )) { + break; + } + } + bSomethingDisplayed = TRUE; + Status = HttpSendAnsiString ( SocketFD, + pPort, + "Write Combining" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + + if ( 0 != ( Attributes & EFI_MEMORY_UC )) { + if ( bSomethingDisplayed ) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + ", " ); + if ( EFI_ERROR ( Status )) { + break; + } + } + bSomethingDisplayed = TRUE; + Status = HttpSendAnsiString ( SocketFD, + pPort, + "Uncached" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + + // + // Finish the row + // + Status = HttpSendAnsiString ( SocketFD, pPort, "
\r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Send the page trailer + // + Status = HttpPageTrailer ( SocketFD, pPort, pbDone ); + break; + } + + // + // Release the memory descriptors + // + if ( NULL != pMemoryDescriptorStart ) { + FreePool ( pMemoryDescriptorStart ); + } + + // + // Return the operation status + // + DBG_EXIT_STATUS ( Status ); + return Status; +} diff --git a/AppPkg/Applications/Sockets/WebServer/Mtrr.c b/AppPkg/Applications/Sockets/WebServer/Mtrr.c new file mode 100644 index 000000000..92f90b0ae --- /dev/null +++ b/AppPkg/Applications/Sockets/WebServer/Mtrr.c @@ -0,0 +1,825 @@ +/** + @file + Display the memory type range registers + + Copyright (c) 2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include +#include + +#define VARIABLE_MTRR_VALID 0x800 + +CONST char * mMemoryType [ ] = { + "Uncached", + "Write Combining", + "Reserved", + "Reserved", + "Write Through", + "Write Protected", + "Writeback" +}; + + +/** + Display a fixed MTRR row + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [in] Start Start address for the region + @param [in] End End address for the region + @param [in] Type Memory type + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +MtrrDisplayFixedRow ( + IN int SocketFD, + IN WSDT_PORT * pPort, + IN UINT64 Start, + IN UINT64 End, + IN UINT64 Type + ) +{ + EFI_STATUS Status; + + // + // Use break instead of goto + // + for ( ; ; ) { + // + // Start the row + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + " 0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Start + // + Status = HttpSendHexValue ( SocketFD, + pPort, + Start ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // End + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + End - 1 ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Type + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "" ); + if ( EFI_ERROR ( Status )) { + break; + } + Type &= 0xff; + Status = HttpSendAnsiString ( SocketFD, + pPort, + ( DIM ( mMemoryType ) > Type ) + ? mMemoryType [ Type ] + : "Reserved" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // End of row + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "\r\n" ); + break; + } + + // + // Return the final status + // + return Status; +} + + +/** + Display the memory type registers + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +MemoryTypeRegistersPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ) +{ + UINT64 Addr; + BOOLEAN bValid; + UINT64 Capabilities; + UINTN Count; + UINT64 DefType; + UINTN Index; + UINT64 Mask; + UINT64 MaxMtrrs; + CONST UINT64 mFixedAddresses [( 8 * MTRR_NUMBER_OF_FIXED_MTRR ) + 1 ] = { + 0ULL, + 0x10000ULL, + 0x20000ULL, + 0x30000ULL, + 0x40000ULL, + 0x50000ULL, + 0x60000ULL, + 0x70000ULL, + + 0x80000ULL, + 0x84000ULL, + 0x88000ULL, + 0x8c000ULL, + 0x90000ULL, + 0x94000ULL, + 0x98000ULL, + 0x9c000ULL, + + 0xa0000ULL, + 0xa4000ULL, + 0xa8000ULL, + 0xac000ULL, + 0xb0000ULL, + 0xb4000ULL, + 0xb8000ULL, + 0xbc000ULL, + + 0xc0000ULL, + 0xc1000ULL, + 0xc2000ULL, + 0xc3000ULL, + 0xc4000ULL, + 0xc5000ULL, + 0xc6000ULL, + 0xc7000ULL, + + 0xc8000ULL, + 0xc9000ULL, + 0xca000ULL, + 0xcb000ULL, + 0xcc000ULL, + 0xcd000ULL, + 0xce000ULL, + 0xcf000ULL, + + 0xd0000ULL, + 0xd1000ULL, + 0xd2000ULL, + 0xd3000ULL, + 0xd4000ULL, + 0xd5000ULL, + 0xd6000ULL, + 0xd7000ULL, + + 0xd8000ULL, + 0xd9000ULL, + 0xda000ULL, + 0xdb000ULL, + 0xdc000ULL, + 0xdd000ULL, + 0xde000ULL, + 0xdf000ULL, + + 0xe0000ULL, + 0xe1000ULL, + 0xe2000ULL, + 0xe3000ULL, + 0xe4000ULL, + 0xe5000ULL, + 0xe6000ULL, + 0xe7000ULL, + + 0xe8000ULL, + 0xe9000ULL, + 0xea000ULL, + 0xeb000ULL, + 0xec000ULL, + 0xed000ULL, + 0xee000ULL, + 0xef000ULL, + + 0xf0000ULL, + 0xf1000ULL, + 0xf2000ULL, + 0xf3000ULL, + 0xf4000ULL, + 0xf5000ULL, + 0xf6000ULL, + 0xf7000ULL, + + 0xf8000ULL, + 0xf9000ULL, + 0xfa000ULL, + 0xfb000ULL, + 0xfc000ULL, + 0xfd000ULL, + 0xfe000ULL, + 0xff000ULL, + + 0x100000ULL + }; + MTRR_SETTINGS Mtrr; + CONST UINT64 * pMemEnd; + CONST UINT64 * pMemStart; + UINT64 PreviousType; + UINT64 ShiftCount; + EFI_STATUS Status; + UINT64 Type; + INT64 Value; + + DBG_ENTER ( ); + + // + // Send the Memory Type Registers page + // + for ( ; ; ) { + // + // Send the page header + // + Status = HttpPageHeader ( SocketFD, pPort, L"Memory Type Range Registers" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Send the header + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "

Memory Type Range Registers

\r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Determine if MTRRs are supported + // + if ( !IsMtrrSupported ( )) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + "

Memory Type Range Registers are not supported!\r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + else { + // + // Get the capabilities + // + Capabilities = AsmReadMsr64 ( MTRR_LIB_IA32_MTRR_CAP ); + DefType = AsmReadMsr64 ( MTRR_LIB_IA32_MTRR_DEF_TYPE ); + + // + // Display the capabilities + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "

Capabilities: " ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + Capabilities ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendAnsiString ( SocketFD, + pPort, + "
\r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the default type + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "Def Type: " ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + DefType ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendAnsiString ( SocketFD, + pPort, + ", MTRRs " ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendAnsiString ( SocketFD, + pPort, + ( 0 != ( DefType & MTRR_LIB_CACHE_MTRR_ENABLED )) + ? "Enabled" + : "Disabled" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendAnsiString ( SocketFD, + pPort, + ", Fixed MTRRs " ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendAnsiString ( SocketFD, + pPort, + ( 0 != ( DefType & MTRR_LIB_CACHE_FIXED_MTRR_ENABLED )) + ? "Enabled" + : "Disabled" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendAnsiString ( SocketFD, + pPort, + ", " ); + if ( EFI_ERROR ( Status )) { + break; + } + Type = DefType & 0xff; + Status = HttpSendAnsiString ( SocketFD, + pPort, + ( DIM ( mMemoryType ) > Type ) + ? mMemoryType [ Type ] + : "Reserved" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendAnsiString ( SocketFD, + pPort, + "

\r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Determine if MTRRs are enabled + // + if ( 0 == ( DefType & MTRR_LIB_CACHE_MTRR_ENABLED )) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + "

All memory is uncached!

\r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + else { + // + // Get the MTRRs + // + MtrrGetAllMtrrs ( &Mtrr ); + + // + // Determine if the fixed MTRRs are supported + // + if (( 0 != ( Capabilities & 0x100 )) + && ( 0 != ( DefType & MTRR_LIB_CACHE_FIXED_MTRR_ENABLED ))) { + + // + // Beginning of table + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "

Fixed MTRRs

\r\n" + "\r\n" + " \r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the fixed MTRRs + // + pMemStart = &mFixedAddresses[ 0 ]; + for ( Count = 0; DIM ( Mtrr.Fixed.Mtrr ) > Count; Count++ ) { + // + // Start the row + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + " \r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + if ( EFI_ERROR ( Status )) { + break; + } + + // + // End of table + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "
IndexValueStartEnd
" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Index + // + Status = HttpSendValue ( SocketFD, + pPort, + Count ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Value + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + Mtrr.Fixed.Mtrr[ Count ]); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Start + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + *pMemStart ); + if ( EFI_ERROR ( Status )) { + break; + } + pMemStart += 8; + + // + // Value + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + *pMemStart - 1 ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // End of row + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "
\r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Beginning of table + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "\r\n" + " \r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Decode the fixed MTRRs + // + PreviousType = Mtrr.Fixed.Mtrr[ 0 ] & 0xff; + pMemStart = &mFixedAddresses[ 0 ]; + pMemEnd = pMemStart; + for ( Count = 0; DIM ( Mtrr.Fixed.Mtrr ) > Count; Count++ ) { + // + // Get the memory types + // + Type = Mtrr.Fixed.Mtrr[ Count ]; + + // + // Walk the memory range + // + for ( Index = 0; 8 > Index; Index++ ) { + // + // Determine if this is the same memory type + // + if ( PreviousType != ( Type & 0xff )) { + // + // Display the row + // + Status = MtrrDisplayFixedRow ( SocketFD, + pPort, + *pMemStart, + *pMemEnd, + PreviousType ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Start the next range of addresses + // + pMemStart = pMemEnd; + PreviousType = Type & 0xff; + } + + // + // Set the next memory range and type + // + Type >>= 8; + pMemEnd += 1; + } + if ( EFI_ERROR ( Status )) { + break; + } + } + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the final row + // + Status = MtrrDisplayFixedRow ( SocketFD, + pPort, + *pMemStart, + *pMemEnd, + PreviousType ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // End of table + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "
StartEndType
\r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + + // + // Determine if the variable MTRRs are supported + // + MaxMtrrs = Capabilities & MTRR_LIB_IA32_MTRR_CAP_VCNT_MASK; + if ( 0 < MaxMtrrs ) { + // + // Beginning of table + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "

Variable MTRRs

\r\n" + "\r\n" + " \r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Display the variable MTRRs + // + for ( Count = 0; MaxMtrrs > Count; Count++ ) { + // + // Start the row + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + " \r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + if ( EFI_ERROR ( Status )) { + break; + } + + // + // End of table + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "
IndexBaseMaskStartEnd
" ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Index + // + Status = HttpSendValue ( SocketFD, + pPort, + Count ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Base + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + Mtrr.Variables.Mtrr[ Count ].Base ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Mask + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + Mtrr.Variables.Mtrr[ Count ].Mask ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Determine if the entry is valid + // + bValid = ( Mtrr.Variables.Mtrr[ Count ].Mask & VARIABLE_MTRR_VALID ) ? TRUE : FALSE; + + // + // Start + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "" ); + if ( EFI_ERROR ( Status )) { + break; + } + Addr = Mtrr.Variables.Mtrr[ Count ].Base & 0xfffffffffffff000ULL; + if ( bValid ) { + Status = HttpSendAnsiString ( SocketFD, + pPort, + "0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + Addr ); + } + else { + Status = HttpSendAnsiString ( SocketFD, + pPort, + "Invalid" ); + } + if ( EFI_ERROR ( Status )) { + break; + } + + // + // End + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "" ); + if ( EFI_ERROR ( Status )) { + break; + } + if ( bValid ) { + // + // Determine the end address + // + Mask = Mtrr.Variables.Mtrr[ Count ].Mask; + Value = Mask; + ShiftCount = 0; + while ( 0 < Value ) { + Value <<= 1; + ShiftCount += 1; + } + Value = 1; + Value <<= 64 - ShiftCount; + Value -= 1; + Value = ~Value; + Value |= Mask; + Value &= ~VARIABLE_MTRR_VALID; + Value = ~Value; + + Status = HttpSendAnsiString ( SocketFD, + pPort, + "0x" ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = HttpSendHexValue ( SocketFD, + pPort, + Addr + Value ); + } + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Type + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "" ); + if ( EFI_ERROR ( Status )) { + break; + } + if ( bValid ) { + Type = Mtrr.Variables.Mtrr[ Count ].Base & 0xFF; + Status = HttpSendAnsiString ( SocketFD, + pPort, + ( DIM ( mMemoryType ) > Type ) + ? mMemoryType [ Type ] + : "Reserved" ); + } + if ( EFI_ERROR ( Status )) { + break; + } + + // + // End of row + // + Status = HttpSendAnsiString ( SocketFD, + pPort, + "
\r\n" ); + if ( EFI_ERROR ( Status )) { + break; + } + } + } + } + + // + // Send the page trailer + // + Status = HttpPageTrailer ( SocketFD, pPort, pbDone ); + break; + } + + // + // Return the operation status + // + DBG_EXIT_STATUS ( Status ); + return Status; +} diff --git a/AppPkg/Applications/Sockets/WebServer/PageList.c b/AppPkg/Applications/Sockets/WebServer/PageList.c index 98927e8e1..1e271e566 100644 --- a/AppPkg/Applications/Sockets/WebServer/PageList.c +++ b/AppPkg/Applications/Sockets/WebServer/PageList.c @@ -1,26 +1,16 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. - ---*/ - -/** @file +/** + @file List of pages to display + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + **/ #include @@ -42,6 +32,8 @@ CONST DT_PAGE mPageList[] = { { PAGE_BOOT_SERVICES_TABLE, BootServicesTablePage, L"Boot Services Table" }, ///< Format boot services table { PAGE_CONFIGURATION_TABLE, ConfigurationTablePage, L"Configuration Table" }, ///< Format configuration table { L"/DhcpOptions", DhcpOptionsPage, L"DHCP Options" }, ///< Display the DHCP options + { PAGE_ACPI_APIC, AcpiApicPage, L"APIC" }, ///< Format APIC + { PAGE_ACPI_BGRT, AcpiBgrtPage, L"BGRT" }, ///< Format BGRT { PAGE_ACPI_DSDT, AcpiDsdtPage, L"DSDT - Differentiated System Description Table" }, ///< Format DSDT { PAGE_DXE_SERVICES_TABLE, DxeServicesTablePage, L"DXE Services Table" }, ///< Format DXE services table { L"/Exit", ExitPage, L"Exit the web server" }, ///< Exit the web server application @@ -49,13 +41,22 @@ CONST DT_PAGE mPageList[] = { { L"/Firmware", FirmwarePage, L"Firmware" }, ///< Firmware status { L"/Handles", HandlePage, L"Display handles and associated protocol GUIDs" }, ///< Handle database page { L"/Hello", HelloPage, L"Hello World" }, ///< Hello world page + { PAGE_ACPI_HPET, AcpiHpetPage, L"HPET" }, ///< Format HPET + { PAGE_ACPI_MCFG, AcpiMcfgPage, L"MCFG" }, ///< Format MCFG + { L"/MemoryMap", MemoryMapPage, L"Memory Map" }, ///< Memory list +#if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64) + { L"/MTRRs", MemoryTypeRegistersPage, L"Memory Type Range Registers" }, ///< Memory type range register table +#endif // Intel { L"/Ports", PortsPage, L"Display web-server ports" },///< Web-server ports page { L"/Reboot", RebootPage, L"Reboot the sytem" }, ///< Reboot page { PAGE_ACPI_RSDP_10B, AcpiRsdp10Page, L"RSDP 1.0b - ACPI Root System Description Pointer" }, ///< Format RSDP 1.0b table { PAGE_ACPI_RSDP_30, AcpiRsdp30Page, L"RSDP 3.0 - ACPI Root System Description Pointer" }, ///< Format RSDP 3.0 table { PAGE_ACPI_RSDT, AcpiRsdtPage, L"RSDT - ACPI Root System Description Table" }, ///< Format RSDT { PAGE_RUNTIME_SERVICES_TABLE, RuntimeSservicesTablePage, L"Runtime Services Table" },///< Format runtime services table - { L"/SystemTable", SystemTablePage, L"System Table" } ///< Format system table + { PAGE_ACPI_SSDT, AcpiSsdtPage, L"SSDT" }, ///< Format SSDT + { L"/SystemTable", SystemTablePage, L"System Table" },///< Format system table + { PAGE_ACPI_TCPA, AcpiTcpaPage, L"TCPA" }, ///< Format TCPA + { PAGE_ACPI_UEFI, AcpiUefiPage, L"UEFI" } ///< Format UEFI }; CONST UINTN mPageCount = DIM ( mPageList ); diff --git a/AppPkg/Applications/Sockets/WebServer/Ports.c b/AppPkg/Applications/Sockets/WebServer/Ports.c index e9190bf68..f9b6680af 100644 --- a/AppPkg/Applications/Sockets/WebServer/Ports.c +++ b/AppPkg/Applications/Sockets/WebServer/Ports.c @@ -1,25 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. +/** + @file + Ports response page ---*/ + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php -/** @file - Ports response page + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/AppPkg/Applications/Sockets/WebServer/Reboot.c b/AppPkg/Applications/Sockets/WebServer/Reboot.c index 51c72d67e..2fc8fecf6 100644 --- a/AppPkg/Applications/Sockets/WebServer/Reboot.c +++ b/AppPkg/Applications/Sockets/WebServer/Reboot.c @@ -1,25 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. +/** + @file + Reboot the system ---*/ + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php -/** @file - Reboot the system + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -49,7 +39,7 @@ RebootPage ( DBG_ENTER ( ); // - // Send the Hello World page + // Send the Reboot page // for ( ; ; ) { // diff --git a/AppPkg/Applications/Sockets/WebServer/RuntimeServicesTable.c b/AppPkg/Applications/Sockets/WebServer/RuntimeServicesTable.c index 778d3bbba..d5fed0c7c 100644 --- a/AppPkg/Applications/Sockets/WebServer/RuntimeServicesTable.c +++ b/AppPkg/Applications/Sockets/WebServer/RuntimeServicesTable.c @@ -1,25 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. +/** + @file + Display the runtime services table ---*/ + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php -/** @file - Display the runtime services table + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/AppPkg/Applications/Sockets/WebServer/SystemTable.c b/AppPkg/Applications/Sockets/WebServer/SystemTable.c index 916c4b92b..83f60308b 100644 --- a/AppPkg/Applications/Sockets/WebServer/SystemTable.c +++ b/AppPkg/Applications/Sockets/WebServer/SystemTable.c @@ -1,26 +1,16 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. - ---*/ - -/** @file +/** + @file Display the system table + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + **/ #include diff --git a/AppPkg/Applications/Sockets/WebServer/WebServer.c b/AppPkg/Applications/Sockets/WebServer/WebServer.c index 00f8633ef..f8a2d3ad4 100644 --- a/AppPkg/Applications/Sockets/WebServer/WebServer.c +++ b/AppPkg/Applications/Sockets/WebServer/WebServer.c @@ -1,27 +1,15 @@ -/*++ - This file contains an 'Intel UEFI Application' and is - licensed for Intel CPUs and chipsets under the terms of your - license agreement with Intel or your vendor. This file may - be modified by the user, subject to additional terms of the - license agreement ---*/ -/*++ - -Copyright (c) 2011 Intel Corporation. All rights reserved -This software and associated documentation (if any) is furnished -under a license and may only be used or copied in accordance -with the terms of the license. Except as permitted by such -license, no part of this software or documentation may be -reproduced, stored in a retrieval system, or transmitted in any -form or by any means without the express written consent of -Intel Corporation. - ---*/ - -/** @file - This is a simple shell application - - This should be executed with "/Param2 Val1" and "/Param1" as the 2 command line options! +/** + @file + Web server application + + Copyright (c) 2011-2012, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/AppPkg/Applications/Sockets/WebServer/WebServer.h b/AppPkg/Applications/Sockets/WebServer/WebServer.h index 48839f345..16c30c8d6 100644 --- a/AppPkg/Applications/Sockets/WebServer/WebServer.h +++ b/AppPkg/Applications/Sockets/WebServer/WebServer.h @@ -1,7 +1,7 @@ /** @file Definitions for the web server. - Copyright (c) 2011, Intel Corporation + Copyright (c) 2011-2012, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -43,11 +44,18 @@ // Pages //------------------------------------------------------------------------------ +#define PAGE_ACPI_APIC L"/APIC" +#define PAGE_ACPI_BGRT L"/BGRT" #define PAGE_ACPI_DSDT L"/DSDT" #define PAGE_ACPI_FADT L"/FADT" +#define PAGE_ACPI_HPET L"/HPET" +#define PAGE_ACPI_MCFG L"/MCFG" #define PAGE_ACPI_RSDP_10B L"/RSDP1.0b" #define PAGE_ACPI_RSDP_30 L"/RSDP3.0" #define PAGE_ACPI_RSDT L"/RSDT" +#define PAGE_ACPI_SSDT L"/SSDT" +#define PAGE_ACPI_TCPA L"/TCPA" +#define PAGE_ACPI_UEFI L"/UEFI" #define PAGE_BOOT_SERVICES_TABLE L"/BootServicesTable" #define PAGE_CONFIGURATION_TABLE L"/ConfigurationTable" #define PAGE_DXE_SERVICES_TABLE L"/DxeServicesTable" @@ -57,8 +65,15 @@ // Signatures //------------------------------------------------------------------------------ +#define APIC_SIGNATURE 0x43495041 +#define BGRT_SIGNATURE 0x54524742 #define DSDT_SIGNATURE 0x54445344 #define FADT_SIGNATURE 0x50434146 +#define HPET_SIGNATURE 0x54455048 +#define MCFG_SIGNATURE 0x4746434d +#define SSDT_SIGNATURE 0x54445353 +#define TCPA_SIGNATURE 0x41504354 +#define UEFI_SIGNATURE 0x49464555 //------------------------------------------------------------------------------ // Macros @@ -227,6 +242,40 @@ extern CONST UINTN mPageCount; ///< Number of pages // Web Pages //------------------------------------------------------------------------------ +/** + Respond with the APIC table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiApicPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ); + +/** + Respond with the BGRT table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiBgrtPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ); + /** Respond with the ACPI DSDT table @@ -261,6 +310,40 @@ AcpiFadtPage ( OUT BOOLEAN * pbDone ); +/** + Respond with the HPET table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiHpetPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ); + +/** + Respond with the MCFG table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiMcfgPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ); + /** Respond with the ACPI RSDP 1.0b table @@ -312,6 +395,57 @@ AcpiRsdtPage ( OUT BOOLEAN * pbDone ); +/** + Respond with the SSDT table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiSsdtPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ); + +/** + Respond with the TCPA table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiTcpaPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ); + +/** + Respond with the UEFI table + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +AcpiUefiPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ); + /** Respond with the boot services table @@ -465,6 +599,40 @@ IndexPage ( OUT BOOLEAN * pbDone ); +/** + Page to display the memory map + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +MemoryMapPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ); + +/** + Display the memory type registers + + @param [in] SocketFD The socket's file descriptor to add to the list. + @param [in] pPort The WSDT_PORT structure address + @param [out] pbDone Address to receive the request completion status + + @retval EFI_SUCCESS The request was successfully processed + +**/ +EFI_STATUS +MemoryTypeRegistersPage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ); + /** Respond with the Ports page diff --git a/AppPkg/Applications/Sockets/WebServer/WebServer.inf b/AppPkg/Applications/Sockets/WebServer/WebServer.inf index c25000729..3650aef96 100644 --- a/AppPkg/Applications/Sockets/WebServer/WebServer.inf +++ b/AppPkg/Applications/Sockets/WebServer/WebServer.inf @@ -1,21 +1,14 @@ -#/** @file +## @file # Web Server Application # -# This file contains an 'Intel Peripheral Driver' and is -# licensed for Intel CPUs and chipsets under the terms of your -# license agreement with Intel or your vendor. This file may -# be modified by the user, subject to additional terms of the -# license agreement +# Copyright (c) 2011-2012, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # -# -# Copyright (c) 2011 Intel Corporation. All rights reserved -# This software and associated documentation (if any) is furnished -# under a license and may only be used or copied in accordance -# with the terms of the license. Except as permitted by such -# license, no part of this software or documentation may be -# reproduced, stored in a retrieval system, or transmitted in any -# form or by any means without the express written consent of -# Intel Corporation. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## @@ -46,6 +39,7 @@ Hello.c HTTP.c Index.c + MemoryMap.c PageList.c Ports.c Reboot.c @@ -53,6 +47,12 @@ SystemTable.c WebServer.c +[Sources.IA32] + Mtrr.c + +[Sources.X64] + Mtrr.c + [Pcd] gAppPkgTokenSpaceGuid.WebServer_HttpPort @@ -64,12 +64,19 @@ ShellPkg/ShellPkg.dec StdLib/StdLib.dec +[Packages.IA32] + UefiCpuPkg/UefiCpuPkg.dec + +[Packages.X64] + UefiCpuPkg/UefiCpuPkg.dec + [LibraryClasses] BaseMemoryLib BsdSocketLib DebugLib DevShell + DxeServicesTableLib EfiSocketLib LibC ShellLib @@ -79,6 +86,13 @@ UefiRuntimeServicesTableLib # UseSocketDxe +[LibraryClasses.IA32] + MtrrLib + +[LibraryClasses.X64] + MtrrLib + + [Guids] gEfiAcpi10TableGuid gEfiAcpiTableGuid -- cgit v1.2.3