~ubuntu-branches/ubuntu/raring/ipxe/raring

« back to all changes in this revision

Viewing changes to src/include/ipxe/efi/Base.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-11-14 15:47:31 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20121114154731-jhuy5d1h2jw75qe9
Tags: 1.0.0+git-4.d6b0b76-0ubuntu1
* New upstream snapshot:
  - d/p/iscsi*.patch: Dropped - included in snapshot.
  - Refreshed all other patches.
* d/p/enable-https.patch: Enable HTTPS support (LP: #1025239).

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
  environment. There are a set of base libraries in the Mde Package that can
7
7
  be used to implement base modules.
8
8
 
9
 
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
 
9
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
10
10
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
11
11
This program and the accompanying materials
12
12
are licensed and made available under the terms and conditions of the BSD License
395
395
//  VA_END (VA_LIST Marker) - Clear Marker
396
396
//  VA_ARG (VA_LIST Marker, var arg size) - Use Marker to get an argument from
397
397
//    the ... list. You must know the size and pass it in this macro.
 
398
//  VA_COPY (VA_LIST Dest, VA_LIST Start) - Initialize Dest as a copy of Start.
398
399
//
399
400
//  example:
400
401
//
456
457
 
457
458
#define VA_END(Marker)                ((void)0)
458
459
 
 
460
// For some ARM RVCT compilers, __va_copy is not defined
 
461
#ifndef __va_copy
 
462
  #define __va_copy(dest, src) ((void)((dest) = (src)))
 
463
#endif
 
464
 
 
465
#define VA_COPY(Dest, Start)          __va_copy (Dest, Start)
 
466
 
459
467
#elif defined(__GNUC__) && !defined(NO_BUILTIN_VA_FUNCS)
460
468
//
461
469
// Use GCC built-in macros for variable argument lists.
473
481
 
474
482
#define VA_END(Marker)               __builtin_va_end (Marker)
475
483
 
 
484
#define VA_COPY(Dest, Start)         __builtin_va_copy (Dest, Start)
 
485
 
476
486
#else
477
487
///
478
488
/// Variable used to traverse the list of arguments. This type can vary by
528
538
**/
529
539
#define VA_END(Marker)      (Marker = (VA_LIST) 0)
530
540
 
 
541
/**
 
542
  Initializes a VA_LIST as a copy of an existing VA_LIST.
 
543
 
 
544
  This macro initializes Dest as a copy of Start, as if the VA_START macro had been applied to Dest
 
545
  followed by the same sequence of uses of the VA_ARG macro as had previously been used to reach
 
546
  the present state of Start.
 
547
 
 
548
  @param   Dest   VA_LIST used to traverse the list of arguments.
 
549
  @param   Start  VA_LIST used to traverse the list of arguments.
 
550
 
 
551
**/
 
552
#define VA_COPY(Dest, Start)  ((void)((Dest) = (Start)))
 
553
 
531
554
#endif
532
555
 
533
556
///
678
701
  @return  Minimum of two operands.
679
702
 
680
703
**/
681
 
 
682
704
#define MIN(a, b)                       \
683
705
  (((a) < (b)) ? (a) : (b))
684
706
 
 
707
/**
 
708
  Return the absolute value of a signed operand.
 
709
 
 
710
  This macro returns the absolute value of the signed operand specified by a.
 
711
 
 
712
  @param   a        The signed operand.
 
713
 
 
714
  @return  The absolute value of the signed operand.
 
715
 
 
716
**/
 
717
#define ABS(a)                          \
 
718
  (((a) < 0) ? (-(a)) : (a))
 
719
 
685
720
//
686
721
// Status codes common to all execution phases
687
722
//
884
919
///
885
920
#define RETURN_INVALID_LANGUAGE      ENCODE_ERROR (32)
886
921
 
 
922
///
 
923
/// The security status of the data is unknown or compromised
 
924
/// and the data must be updated or replaced to restore a valid
 
925
/// security status.
 
926
///
 
927
#define RETURN_COMPROMISED_DATA      ENCODE_ERROR (33)
887
928
 
888
929
///
889
930
/// The string contained one or more characters that
908
949
///
909
950
#define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4)
910
951
 
 
952
///
 
953
/// The data has not been updated within the timeframe set by
 
954
/// local policy for this type of data.
 
955
///
 
956
#define RETURN_WARN_STALE_DATA       ENCODE_WARNING (5)
 
957
 
911
958
/**
912
959
  Returns a 16-bit signature built from 2 ASCII characters.
913
960