From owner-p4-projects@FreeBSD.ORG Thu Nov 2 08:45:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9ACCD16A417; Thu, 2 Nov 2006 08:45:07 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F59F16A412 for ; Thu, 2 Nov 2006 08:45:07 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25ACA43D49 for ; Thu, 2 Nov 2006 08:45:07 +0000 (GMT) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kA28j75H096454 for ; Thu, 2 Nov 2006 08:45:07 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kA28j1Ro096451 for perforce@freebsd.org; Thu, 2 Nov 2006 08:45:01 GMT (envelope-from piso@freebsd.org) Date: Thu, 2 Nov 2006 08:45:01 GMT Message-Id: <200611020845.kA28j1Ro096451@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 109019 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2006 08:45:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=109019 Change 109019 by piso@piso_newluxor on 2006/11/02 08:44:23 IFC@109017 Affected files ... .. //depot/projects/soc2005/libalias/sys/boot/common/Makefile.inc#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/common/bootstrap.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/common/devopen.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efi.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efi_nii.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efiapi.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/eficon.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efidebug.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efidef.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efidevp.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efierr.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efifs.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efilib.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efinet.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efipart.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efiprot.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efipxebc.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efiser.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/efistdarg.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/i386/efibind.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/i386/pe.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/ia64/efibind.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/include/ia64/pe.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/libefi/devicename.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/libefi/efiboot.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/efi/libefi/efifs.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/i386/libi386/bioscd.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/i386/libi386/biosdisk.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/i386/libi386/bootinfo32.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/i386/libi386/devicename.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/i386/libi386/libi386.h#3 integrate .. //depot/projects/soc2005/libalias/sys/boot/i386/loader/Makefile#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/i386/loader/main.c#3 integrate .. //depot/projects/soc2005/libalias/sys/boot/ia64/efi/main.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/ia64/ski/devicename.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/ia64/ski/libski.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/ia64/ski/main.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/ofw/common/main.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/ofw/libofw/libofw.h#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/pc98/libpc98/bioscd.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/pc98/libpc98/biosdisk.c#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/pc98/loader/Makefile#2 integrate .. //depot/projects/soc2005/libalias/sys/boot/pc98/loader/main.c#3 integrate .. //depot/projects/soc2005/libalias/sys/boot/sparc64/loader/main.c#3 integrate .. //depot/projects/soc2005/libalias/sys/cam/cam_ccb.h#2 integrate .. //depot/projects/soc2005/libalias/sys/cam/cam_xpt.c#4 integrate .. //depot/projects/soc2005/libalias/sys/cam/scsi/scsi_low.c#3 integrate .. //depot/projects/soc2005/libalias/sys/conf/NOTES#13 integrate .. //depot/projects/soc2005/libalias/sys/conf/files.sparc64#3 integrate .. //depot/projects/soc2005/libalias/sys/conf/options#10 integrate .. //depot/projects/soc2005/libalias/sys/conf/options.sparc64#2 integrate .. //depot/projects/soc2005/libalias/sys/dev/aac/aac_cam.c#4 integrate .. //depot/projects/soc2005/libalias/sys/dev/advansys/advansys.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/advansys/advlib.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/advansys/adwcam.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/aha/aha.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/ahb/ahb.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/aic/aic.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/aic7xxx/aic79xx_osm.c#2 integrate .. //depot/projects/soc2005/libalias/sys/dev/aic7xxx/aic79xx_osm.h#2 integrate .. //depot/projects/soc2005/libalias/sys/dev/aic7xxx/aic7xxx_osm.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/aic7xxx/aic7xxx_osm.h#2 integrate .. //depot/projects/soc2005/libalias/sys/dev/amd/amd.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/amr/amr_cam.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/arcmsr/arcmsr.c#4 integrate .. //depot/projects/soc2005/libalias/sys/dev/asr/asr.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/ata/atapi-cam.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/buslogic/bt.c#2 integrate .. //depot/projects/soc2005/libalias/sys/dev/ciss/ciss.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/dc/if_dc.c#4 integrate .. //depot/projects/soc2005/libalias/sys/dev/dpt/dpt_scsi.c#4 integrate .. //depot/projects/soc2005/libalias/sys/dev/esp/ncr53c9x.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/firewire/sbp.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/iir/iir.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/isp.c#5 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/isp_freebsd.c#7 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/isp_freebsd.h#5 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/isp_library.c#4 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/isp_library.h#2 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/isp_pci.c#7 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/isp_sbus.c#4 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/isp_stds.h#1 branch .. //depot/projects/soc2005/libalias/sys/dev/isp/isp_target.c#4 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/isp_target.h#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/isp_tpublic.h#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/ispmbox.h#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/ispreg.h#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/isp/ispvar.h#4 integrate .. //depot/projects/soc2005/libalias/sys/dev/ispfw/asm_2300.h#2 integrate .. //depot/projects/soc2005/libalias/sys/dev/mly/mly.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/mpt/mpt_cam.c#6 integrate .. //depot/projects/soc2005/libalias/sys/dev/sym/sym_hipd.c#2 integrate .. //depot/projects/soc2005/libalias/sys/dev/trm/trm.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/twa/tw_osl_cam.c#3 integrate .. //depot/projects/soc2005/libalias/sys/dev/uart/uart_kbd_sun.c#4 integrate .. //depot/projects/soc2005/libalias/sys/dev/uart/uart_kbd_sun.h#2 integrate .. //depot/projects/soc2005/libalias/sys/dev/usb/umass.c#5 integrate .. //depot/projects/soc2005/libalias/sys/geom/journal/g_journal.c#2 integrate .. //depot/projects/soc2005/libalias/sys/geom/mirror/g_mirror.c#6 integrate .. //depot/projects/soc2005/libalias/sys/geom/mirror/g_mirror.h#2 integrate .. //depot/projects/soc2005/libalias/sys/geom/mirror/g_mirror_ctl.c#3 integrate .. //depot/projects/soc2005/libalias/sys/geom/raid3/g_raid3.c#8 integrate .. //depot/projects/soc2005/libalias/sys/geom/raid3/g_raid3.h#2 integrate .. //depot/projects/soc2005/libalias/sys/geom/raid3/g_raid3_ctl.c#4 integrate .. //depot/projects/soc2005/libalias/sys/geom/stripe/g_stripe.c#3 integrate .. //depot/projects/soc2005/libalias/sys/net/bridgestp.c#6 integrate .. //depot/projects/soc2005/libalias/sys/pci/if_sis.c#4 integrate .. //depot/projects/soc2005/libalias/sys/pci/ncr.c#4 integrate .. //depot/projects/soc2005/libalias/sys/sparc64/conf/NOTES#5 integrate Differences ... ==== //depot/projects/soc2005/libalias/sys/boot/common/Makefile.inc#2 (text+ko) ==== @@ -1,6 +1,6 @@ -# $FreeBSD: src/sys/boot/common/Makefile.inc,v 1.22 2006/05/12 04:09:52 jhb Exp $ +# $FreeBSD: src/sys/boot/common/Makefile.inc,v 1.23 2006/11/02 00:26:44 marcel Exp $ -SRCS+= bcache.c boot.c commands.c console.c devopen.c interp.c +SRCS+= boot.c commands.c console.c devopen.c interp.c SRCS+= interp_backslash.c interp_parse.c ls.c misc.c SRCS+= module.c panic.c @@ -19,6 +19,10 @@ SRCS+= dev_net.c .endif +.if defined(HAVE_BCACHE) +SRCS+= bcache.c +.endif + # Machine-independant ISA PnP .if defined(HAVE_ISABUS) SRCS+= isapnp.c ==== //depot/projects/soc2005/libalias/sys/boot/common/bootstrap.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/common/bootstrap.h,v 1.42 2005/12/18 04:52:35 marcel Exp $ + * $FreeBSD: src/sys/boot/common/bootstrap.h,v 1.43 2006/11/02 01:23:17 marcel Exp $ */ #include @@ -43,6 +43,7 @@ #define DEVT_DISK 1 #define DEVT_NET 2 #define DEVT_CD 3 + int d_unit; }; /* Commands and return values; nonzero return sets command_errmsg != NULL */ ==== //depot/projects/soc2005/libalias/sys/boot/common/devopen.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/common/devopen.c,v 1.4 2003/08/25 23:30:41 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/devopen.c,v 1.5 2006/11/02 00:02:22 marcel Exp $"); #include #include @@ -35,20 +35,25 @@ int devopen(struct open_file *f, const char *fname, const char **file) { - struct devdesc *dev; - int result; + struct devdesc *dev; + int result; + + result = archsw.arch_getdev((void **)&dev, fname, file); + if (result) + return (result); - if ((result = archsw.arch_getdev((void *)&dev, fname, file)) == 0) { /* get the device */ - /* point to device-specific data so that device open can use it */ - f->f_devdata = dev; - if ((result = dev->d_dev->dv_open(f, dev)) == 0) { /* try to open it */ - /* reference the devsw entry from the open_file structure */ - f->f_dev = dev->d_dev; - } else { - free(dev); /* release the device descriptor */ - } + /* point to device-specific data so that device open can use it */ + f->f_devdata = dev; + result = dev->d_dev->dv_open(f, dev); + if (result != 0) { + f->f_devdata = NULL; + free(dev); + return (result); } - return(result); + + /* reference the devsw entry from the open_file structure */ + f->f_dev = dev->d_dev; + return (0); } int ==== //depot/projects/soc2005/libalias/sys/boot/efi/include/efi.h#2 (text+ko) ==== @@ -1,7 +1,14 @@ -/* $FreeBSD: src/sys/boot/efi/include/efi.h,v 1.3 2002/05/19 03:17:20 marcel Exp $ */ +/* $FreeBSD: src/sys/boot/efi/include/efi.h,v 1.4 2006/11/02 02:42:47 marcel Exp $ */ /*++ -Copyright (c) 1998 Intel Corporation +Copyright (c) 1999 - 2002 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. Module Name: @@ -17,19 +24,20 @@ --*/ -/* - * Build flags on input - * EFI32 - * EFI_DEBUG - Enable debugging code - * EFI_NT_EMULATOR - Building for running under NT - */ +// +// Build flags on input +// EFI32 +// EFI_DEBUG - Enable debugging code +// EFI_NT_EMULATOR - Building for running under NT +// + #ifndef _EFI_INCLUDE_ #define _EFI_INCLUDE_ #define EFI_FIRMWARE_VENDOR L"INTEL" -#define EFI_FIRMWARE_MAJOR_REVISION 12 -#define EFI_FIRMWARE_MINOR_REVISION 33 +#define EFI_FIRMWARE_MAJOR_REVISION 14 +#define EFI_FIRMWARE_MINOR_REVISION 62 #define EFI_FIRMWARE_REVISION ((EFI_FIRMWARE_MAJOR_REVISION <<16) | (EFI_FIRMWARE_MINOR_REVISION)) #include "efibind.h" @@ -43,7 +51,12 @@ #include "efinet.h" #include "efiapi.h" #include "efifs.h" -#include "efifpswa.h" #include "efierr.h" +#define EFI_STRINGIZE(a) #a +#define EFI_PROTOCOL_DEFINITION(a) EFI_STRINGIZE(Protocol/a/a.h) + +#define EFI_GUID_DEFINITION(a) EFI_STRINGIZE(Guid/a/a##.h) +#define EFI_GUID_STRING(guidpointer, shortstring, longstring) + #endif ==== //depot/projects/soc2005/libalias/sys/boot/efi/include/efi_nii.h#2 (text+ko) ==== @@ -1,9 +1,16 @@ -/* $FreeBSD: src/sys/boot/efi/include/efi_nii.h,v 1.2 2002/05/19 03:17:20 marcel Exp $ */ +/* $FreeBSD: src/sys/boot/efi/include/efi_nii.h,v 1.3 2006/11/02 02:42:47 marcel Exp $ */ #ifndef _EFI_NII_H #define _EFI_NII_H /*++ -Copyright (c) 2000 Intel Corporation +Copyright (c) 1999 - 2002 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. Module name: efi_nii.h @@ -20,8 +27,11 @@ #define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL \ { 0xE18541CD, 0xF755, 0x4f73, 0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29 } +#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_31 \ + { 0x1ACED566, 0x76ED, 0x4218, 0xBC, 0x81, 0x76, 0x7F, 0x1F, 0x97, 0x7A, 0x89 } #define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION 0x00010000 +#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION_31 0x00010001 typedef enum { EfiNetworkInterfaceUndi = 1 @@ -29,54 +39,48 @@ typedef struct { - /* Revision of the network interface identifier protocol interface. */ UINT64 Revision; + // Revision of the network interface identifier protocol interface. - /* - * Address of the first byte of the identifying structure for this - * network interface. This is set to zero if there is no structure. - * For PXE/UNDI this is the first byte of the !PXE structure. - */ UINT64 ID; + // Address of the first byte of the identifying structure for this + // network interface. This is set to zero if there is no structure. + // + // For PXE/UNDI this is the first byte of the !PXE structure. - /* - * Address of the UNrelocated driver/ROM image. This is set - * to zero if there is no driver/ROM image. - * For 16-bit UNDI, this is the first byte of the option ROM in - * upper memory. - * For 32/64-bit S/W UNDI, this is the first byte of the EFI ROM - * image. - * For H/W UNDI, this is set to zero. - */ UINT64 ImageAddr; + // Address of the UNrelocated driver/ROM image. This is set + // to zero if there is no driver/ROM image. + // + // For 16-bit UNDI, this is the first byte of the option ROM in + // upper memory. + // + // For 32/64-bit S/W UNDI, this is the first byte of the EFI ROM + // image. + // + // For H/W UNDI, this is set to zero. - /* - * Size of the UNrelocated driver/ROM image of this network interface. - * This is set to zero if there is no driver/ROM image. - */ UINT32 ImageSize; + // Size of the UNrelocated driver/ROM image of this network interface. + // This is set to zero if there is no driver/ROM image. - /* - * 4 char ASCII string to go in class identifier (option 60) in DHCP - * and Boot Server discover packets. - * For EfiNetworkInterfaceUndi this field is "UNDI". - * For EfiNetworkInterfaceSnp this field is "SNPN". - */ CHAR8 StringId[4]; + // 4 char ASCII string to go in class identifier (option 60) in DHCP + // and Boot Server discover packets. + // For EfiNetworkInterfaceUndi this field is "UNDI". + // For EfiNetworkInterfaceSnp this field is "SNPN". - /* - * Information to be placed into the PXE DHCP and Discover packets. - * This is the network interface type and version number that will - * be placed into DHCP option 94 (client network interface identifier). - */ UINT8 Type; UINT8 MajorVer; UINT8 MinorVer; - + // Information to be placed into the PXE DHCP and Discover packets. + // This is the network interface type and version number that will + // be placed into DHCP option 94 (client network interface identifier). BOOLEAN Ipv6Supported; - UINT8 IfNum; /* interface number to be used with pxeid structure */ + UINT8 IfNum; // interface number to be used with pxeid structure } EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE; extern EFI_GUID NetworkInterfaceIdentifierProtocol; +extern EFI_GUID NetworkInterfaceIdentifierProtocol_31; -#endif /* _EFI_NII_H */ +#endif // _EFI_NII_H ==== //depot/projects/soc2005/libalias/sys/boot/efi/include/efiapi.h#2 (text+ko) ==== @@ -1,10 +1,17 @@ -/* $FreeBSD: src/sys/boot/efi/include/efiapi.h,v 1.6 2003/12/10 19:08:09 jhb Exp $ */ +/* $FreeBSD: src/sys/boot/efi/include/efiapi.h,v 1.7 2006/11/02 02:42:47 marcel Exp $ */ #ifndef _EFI_API_H #define _EFI_API_H /*++ -Copyright (c) 1998 Intel Corporation +Copyright (c) 1999 - 2002 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. Module Name: @@ -21,22 +28,22 @@ --*/ -/* - * EFI Specification Revision - */ +// +// EFI Specification Revision +// #define EFI_SPECIFICATION_MAJOR_REVISION 1 -#define EFI_SPECIFICATION_MINOR_REVISION 02 +#define EFI_SPECIFICATION_MINOR_REVISION 10 -/* - * Declare forward referenced data structures - */ +// +// Declare forward referenced data structures +// INTERFACE_DECL(_EFI_SYSTEM_TABLE); -/* - * EFI Memory - */ +// +// EFI Memory +// typedef EFI_STATUS @@ -92,8 +99,8 @@ #define EFI_OPTIONAL_PTR 0x00000001 -#define EFI_INTERNAL_FNC 0x00000002 /* Pointer to internal runtime fnc */ -#define EFI_INTERNAL_PTR 0x00000004 /* Pointer to internal runtime data */ +#define EFI_INTERNAL_FNC 0x00000002 // Pointer to internal runtime fnc +#define EFI_INTERNAL_PTR 0x00000004 // Pointer to internal runtime data typedef @@ -104,9 +111,9 @@ ); -/* - * EFI Events - */ +// +// EFI Events +// @@ -181,9 +188,9 @@ IN EFI_EVENT Event ); -/* - * Task priority level - */ +// +// Task priority level +// #define TPL_APPLICATION 4 #define TPL_CALLBACK 8 @@ -203,19 +210,19 @@ ); -/* - * EFI platform variables - */ +// +// EFI platform varibles +// #define EFI_GLOBAL_VARIABLE \ { 0x8BE4DF61, 0x93CA, 0x11d2, 0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C } -/* Variable attributes */ +// Variable attributes #define EFI_VARIABLE_NON_VOLATILE 0x00000001 #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 -/* Variable size limitation */ +// Variable size limitation #define EFI_MAXIMUM_VARIABLE_SIZE 1024 typedef @@ -248,14 +255,14 @@ ); -/* - * EFI Time - */ +// +// EFI Time +// typedef struct { - UINT32 Resolution; /* 1e-6 parts per million */ - UINT32 Accuracy; /* hertz */ - BOOLEAN SetsToZero; /* Set clears sub-second time */ + UINT32 Resolution; // 1e-6 parts per million + UINT32 Accuracy; // hertz + BOOLEAN SetsToZero; // Set clears sub-second time } EFI_TIME_CAPABILITIES; @@ -288,12 +295,12 @@ ); -/* - * Image functions - */ +// +// Image functions +// -/* PE32+ Subsystem type for EFI images */ +// PE32+ Subsystem type for EFI images #if !defined(IMAGE_SUBSYSTEM_EFI_APPLICATION) #define IMAGE_SUBSYSTEM_EFI_APPLICATION 10 @@ -301,7 +308,7 @@ #define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12 #endif -/* PE32+ Machine type for EFI images */ +// PE32+ Machine type for EFI images #if !defined(EFI_IMAGE_MACHINE_IA32) #define EFI_IMAGE_MACHINE_IA32 0x014c @@ -311,7 +318,11 @@ #define EFI_IMAGE_MACHINE_IA64 0x0200 #endif -/* Image Entry prototype */ +#if !defined(EFI_IMAGE_MACHINE_EBC) +#define EFI_IMAGE_MACHINE_EBC 0x0EBC +#endif + +// Image Entry prototype typedef EFI_STATUS @@ -355,32 +366,32 @@ ); -/* Image handle */ +// Image handle #define LOADED_IMAGE_PROTOCOL \ { 0x5B1B31A1, 0x9562, 0x11d2, 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } -#define EFI_IMAGE_INFORMATION_REVISION 0x1000 +#define EFI_LOADED_IMAGE_INFORMATION_REVISION 0x1000 typedef struct { UINT32 Revision; EFI_HANDLE ParentHandle; struct _EFI_SYSTEM_TABLE *SystemTable; - /* Source location of image */ + // Source location of image EFI_HANDLE DeviceHandle; EFI_DEVICE_PATH *FilePath; VOID *Reserved; - /* Images load options */ + // Images load options UINT32 LoadOptionsSize; VOID *LoadOptions; - /* Location of where image was loaded */ + // Location of where image was loaded VOID *ImageBase; UINT64 ImageSize; EFI_MEMORY_TYPE ImageCodeType; EFI_MEMORY_TYPE ImageDataType; - /* If the driver image supports a dynamic unload request */ + // If the driver image supports a dynamic unload request EFI_IMAGE_UNLOAD Unload; } EFI_LOADED_IMAGE; @@ -393,9 +404,9 @@ IN UINTN MapKey ); -/* - * Misc - */ +// +// Misc +// typedef @@ -416,11 +427,12 @@ typedef enum { EfiResetCold, - EfiResetWarm + EfiResetWarm, + EfiResetShutdown } EFI_RESET_TYPE; typedef -EFI_STATUS +VOID (EFIAPI *EFI_RESET_SYSTEM) ( IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, @@ -440,13 +452,12 @@ OUT UINT32 *HighCount ); -/* - * Protocol handler functions - */ +// +// Protocol handler functions +// typedef enum { - EFI_NATIVE_INTERFACE, - EFI_PCODE_INTERFACE + EFI_NATIVE_INTERFACE } EFI_INTERFACE_TYPE; typedef @@ -525,179 +536,355 @@ typedef EFI_STATUS (EFIAPI *EFI_RESERVED_SERVICE) ( - VOID ); -/* - * Standard EFI table header - */ +typedef +EFI_STATUS +(EFIAPI *EFI_CONNECT_CONTROLLER) ( + IN EFI_HANDLE ControllerHandle, + IN EFI_HANDLE *DriverImageHandle OPTIONAL, + IN EFI_DEVICE_PATH *RemainingDevicePath OPTIONAL, + IN BOOLEAN Recursive + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_DISCONNECT_CONTROLLER)( + IN EFI_HANDLE ControllerHandle, + IN EFI_HANDLE DriverImageHandle, OPTIONAL + IN EFI_HANDLE ChildHandle OPTIONAL + ); + +#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001 +#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002 +#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004 +#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008 +#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010 +#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020 + +typedef +EFI_STATUS +(EFIAPI *EFI_OPEN_PROTOCOL) ( + IN EFI_HANDLE Handle, + IN EFI_GUID *Protocol, + OUT VOID **Interface, + IN EFI_HANDLE ImageHandle, + IN EFI_HANDLE ControllerHandle, OPTIONAL + IN UINT32 Attributes + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_CLOSE_PROTOCOL) ( + IN EFI_HANDLE Handle, + IN EFI_GUID *Protocol, + IN EFI_HANDLE ImageHandle, + IN EFI_HANDLE DeviceHandle + ); + +typedef struct { + EFI_HANDLE AgentHandle; + EFI_HANDLE ControllerHandle; + UINT32 Attributes; + UINT32 OpenCount; +} EFI_OPEN_PROTOCOL_INFORMATION_ENTRY; + +typedef +EFI_STATUS +(EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION) ( + IN EFI_HANDLE UserHandle, + IN EFI_GUID *Protocol, + IN EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer, + OUT UINTN *EntryCount + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_PROTOCOLS_PER_HANDLE) ( + IN EFI_HANDLE UserHandle, + OUT EFI_GUID ***ProtocolBuffer, + OUT UINTN *ProtocolBufferCount + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_LOCATE_HANDLE_BUFFER) ( + IN EFI_LOCATE_SEARCH_TYPE SearchType, + IN EFI_GUID *Protocol OPTIONAL, + IN VOID *SearchKey OPTIONAL, + IN OUT UINTN *NumberHandles, + OUT EFI_HANDLE **Buffer + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_LOCATE_PROTOCOL) ( + EFI_GUID *Protocol, + VOID *Registration, OPTIONAL + VOID **Interface + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) ( + IN OUT EFI_HANDLE *Handle, + ... + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) ( + IN EFI_HANDLE Handle, + ... + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_CALCULATE_CRC32) ( + IN VOID *Data, + IN UINTN DataSize, + OUT UINT32 *Crc32 + ); + +typedef +VOID +(EFIAPI *EFI_COPY_MEM) ( + IN VOID *Destination, + IN VOID *Source, + IN UINTN Length + ); + +typedef +VOID +(EFIAPI *EFI_SET_MEM) ( + IN VOID *Buffer, + IN UINTN Size, + IN UINT8 Value + ); + +// +// Standard EFI table header +// typedef struct _EFI_TABLE_HEARDER { - UINT64 Signature; - UINT32 Revision; - UINT32 HeaderSize; - UINT32 CRC32; - UINT32 Reserved; + UINT64 Signature; + UINT32 Revision; + UINT32 HeaderSize; + UINT32 CRC32; + UINT32 Reserved; } EFI_TABLE_HEADER; -/* - * EFI Runtime Serivces Table - */ +// +// EFI Runtime Serivces Table +// #define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552 -#define EFI_RUNTIME_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION) +#define EFI_RUNTIME_SERVICES_REVISION ((EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)) typedef struct { - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; - /* Time services */ + // + // Time services + // - EFI_GET_TIME GetTime; - EFI_SET_TIME SetTime; - EFI_GET_WAKEUP_TIME GetWakeupTime; - EFI_SET_WAKEUP_TIME SetWakeupTime; + EFI_GET_TIME GetTime; + EFI_SET_TIME SetTime; + EFI_GET_WAKEUP_TIME GetWakeupTime; + EFI_SET_WAKEUP_TIME SetWakeupTime; - /* Virtual memory services */ + // + // Virtual memory services + // - EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap; - EFI_CONVERT_POINTER ConvertPointer; + EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap; + EFI_CONVERT_POINTER ConvertPointer; - /* Variable serviers */ + // + // Variable serviers + // - EFI_GET_VARIABLE GetVariable; - EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName; - EFI_SET_VARIABLE SetVariable; + EFI_GET_VARIABLE GetVariable; + EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName; + EFI_SET_VARIABLE SetVariable; - /* Misc */ + // + // Misc + // - EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount; - EFI_RESET_SYSTEM ResetSystem; + EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount; + EFI_RESET_SYSTEM ResetSystem; } EFI_RUNTIME_SERVICES; -/* - * EFI Boot Services Table - */ +// +// EFI Boot Services Table +// #define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42 -#define EFI_BOOT_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION) +#define EFI_BOOT_SERVICES_REVISION ((EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)) + +typedef struct { + + EFI_TABLE_HEADER Hdr; + + // + // Task priority functions + // + + EFI_RAISE_TPL RaiseTPL; + EFI_RESTORE_TPL RestoreTPL; + + // + // Memory functions + // + + EFI_ALLOCATE_PAGES AllocatePages; + EFI_FREE_PAGES FreePages; + EFI_GET_MEMORY_MAP GetMemoryMap; + EFI_ALLOCATE_POOL AllocatePool; + EFI_FREE_POOL FreePool; -typedef struct _EFI_BOOT_SERVICES { + // + // Event & timer functions + // - EFI_TABLE_HEADER Hdr; + EFI_CREATE_EVENT CreateEvent; + EFI_SET_TIMER SetTimer; + EFI_WAIT_FOR_EVENT WaitForEvent; + EFI_SIGNAL_EVENT SignalEvent; + EFI_CLOSE_EVENT CloseEvent; + EFI_CHECK_EVENT CheckEvent; - /* Task priority functions */ + // + // Protocol handler functions + // - EFI_RAISE_TPL RaiseTPL; - EFI_RESTORE_TPL RestoreTPL; + EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface; + EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface; + EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface; + EFI_HANDLE_PROTOCOL HandleProtocol; + VOID *Reserved; + EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify; + EFI_LOCATE_HANDLE LocateHandle; + EFI_LOCATE_DEVICE_PATH LocateDevicePath; + EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable; - /* Memory functions */ + // + // Image functions + // - EFI_ALLOCATE_PAGES AllocatePages; - EFI_FREE_PAGES FreePages; - EFI_GET_MEMORY_MAP GetMemoryMap; - EFI_ALLOCATE_POOL AllocatePool; - EFI_FREE_POOL FreePool; + EFI_IMAGE_LOAD LoadImage; + EFI_IMAGE_START StartImage; + EFI_EXIT Exit; + EFI_IMAGE_UNLOAD UnloadImage; + EFI_EXIT_BOOT_SERVICES ExitBootServices; - /* Event & timer functions */ + // + // Misc functions + // - EFI_CREATE_EVENT CreateEvent; - EFI_SET_TIMER SetTimer; - EFI_WAIT_FOR_EVENT WaitForEvent; - EFI_SIGNAL_EVENT SignalEvent; - EFI_CLOSE_EVENT CloseEvent; - EFI_CHECK_EVENT CheckEvent; + EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount; + EFI_STALL Stall; + EFI_SET_WATCHDOG_TIMER SetWatchdogTimer; - /* Protocol handler functions */ + // + // DriverSupport Services + // + EFI_CONNECT_CONTROLLER ConnectController; + EFI_DISCONNECT_CONTROLLER DisconnectController; - EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface; - EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface; - EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface; - EFI_HANDLE_PROTOCOL HandleProtocol; - EFI_HANDLE_PROTOCOL PCHandleProtocol; - EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify; - EFI_LOCATE_HANDLE LocateHandle; - EFI_LOCATE_DEVICE_PATH LocateDevicePath; - EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable; + // + // Open and Close Protocol Services + // + EFI_OPEN_PROTOCOL OpenProtocol; + EFI_CLOSE_PROTOCOL CloseProtocol; + EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation; - /* Image functions */ + // + // Library Services to reduce size of drivers + // + EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle; + EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer; + EFI_LOCATE_PROTOCOL LocateProtocol; - EFI_IMAGE_LOAD LoadImage; - EFI_IMAGE_START StartImage; - EFI_EXIT Exit; - EFI_IMAGE_UNLOAD UnloadImage; - EFI_EXIT_BOOT_SERVICES ExitBootServices; + EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces; + EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces; >>> TRUNCATED FOR MAIL (1000 lines) <<<