Changeset 4872160 in mainline for boot/generic/include/align.h


Ignore:
Timestamp:
2010-05-04T10:44:55Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
568db0f
Parents:
bb252ca
Message:

new boot infrastructure

  • more code and metadata unification
  • import of up-to-date implementations from the kernel
  • the boot loaders should behave more similarly on all platforms
  • support for deflate compressed (LZ77) boot components
    • this again allows feasible boot images to be created on mips32
  • IA64 is still not booting
    • the broken forked GNU EFI library has been removed, a replacement of the functionality is on its way
File:
1 moved

Legend:

Unmodified
Added
Removed
  • boot/generic/include/align.h

    rbb252ca r4872160  
    11/*
    2  * Copyright (c) 2006 Jakub Jermar
     2 * Copyright (c) 2005 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup generic
    30  * @{
    31  */
    32 /** @file
     29/**
     30 * @file
     31 * @brief Macros for making values and addresses aligned.
    3332 */
    3433
     
    3635#define BOOT_ALIGN_H_
    3736
     37/** Align to the nearest lower address.
     38 *
     39 * @param s Address or size to be aligned.
     40 * @param a Size of alignment, must be power of 2.
     41 */
     42#define ALIGN_DOWN(s, a)  ((s) & ~((a) - 1))
     43
    3844/** Align to the nearest higher address.
    3945 *
    40  * @param addr Address or size to be aligned.
    41  * @param align Size of alignment, must be power of 2.
     46 * @param s Address or size to be aligned.
     47 * @param a Size of alignment, must be power of 2.
    4248 */
    43 #define ALIGN_UP(addr, align) (((addr) + ((align) - 1)) & ~((align) - 1))
     49#define ALIGN_UP(s, a)  (((s) + ((a) - 1)) & ~((a) - 1))
    4450
    4551#endif
Note: See TracChangeset for help on using the changeset viewer.