Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3857 → Rev 3858

/branches/g5/boot/generic/align.h
File deleted
/branches/g5/boot/generic/printf.c
File deleted
/branches/g5/boot/generic/gentypes.h
File deleted
/branches/g5/boot/generic/string.c
File deleted
/branches/g5/boot/generic/genarch
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:special
## -1 +0,0 ##
-*
\ No newline at end of property
Index: g5/boot/generic/printf.h
===================================================================
--- g5/boot/generic/printf.h (revision 3857)
+++ g5/boot/generic/printf.h (nonexistent)
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2006 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup generic
- * @{
- */
-/** @file
- */
-
-#ifndef BOOT_PRINTF_H_
-#define BOOT_PRINTF_H_
-
-#define INT8 1
-#define INT16 2
-#define INT32 4
-#define INT64 8
-
-extern void puts(const char *str);
-extern void printf(const char *fmt, ...);
-
-extern void write(const char *str, const int len);
-
-#endif
-
-/** @}
- */
Index: g5/boot/generic/stdarg.h
===================================================================
--- g5/boot/generic/stdarg.h (revision 3857)
+++ g5/boot/generic/stdarg.h (nonexistent)
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2006 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup generic
- * @{
- */
-/** @file
- */
-
-#ifndef STDARG_H__
-#define STDARG_H__
-
-typedef __builtin_va_list va_list;
-
-#define va_start(ap, last) __builtin_va_start(ap, last)
-#define va_arg(ap, type) __builtin_va_arg(ap, type)
-#define va_end(ap) __builtin_va_end(ap)
-
-#endif
-
-/** @}
- */
Index: g5/boot/generic/string.h
===================================================================
--- g5/boot/generic/string.h (revision 3857)
+++ g5/boot/generic/string.h (nonexistent)
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup generic
- * @{
- */
-/** @file
- */
-
-#ifndef BOOT_STRING_H_
-#define BOOT_STRING_H_
-
-#include <types.h>
-
-extern size_t strlen(const char *str);
-extern int strcmp(const char *src, const char *dst);
-extern int strncmp(const char *src, const char *dst, size_t len);
-extern void strncpy(char *dest, const char *src, size_t len);
-extern unative_t atoi(const char *text);
-
-#endif
-
-/** @}
- */
Index: g5/boot/arch/ia32/grub/menu.lst
===================================================================
--- g5/boot/arch/ia32/grub/menu.lst (revision 3857)
+++ g5/boot/arch/ia32/grub/menu.lst (nonexistent)
@@ -1,19 +0,0 @@
-default 0
-timeout 10
-
-title=HelenOS
-root (cd)
-kernel /boot/kernel.bin
-module /boot/ns
-module /boot/init
-module /boot/pci
-module /boot/fb
-module /boot/kbd
-module /boot/console
-module /boot/vfs
-module /boot/tmpfs
-module /boot/fat
-module /boot/devmap
-module /boot/tetris
-module /boot/tester
-module /boot/klog
Index: g5/boot/arch/ia32/grub/stage2_eltorito
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: g5/boot/arch/ia32/grub/stage2_eltorito
===================================================================
--- g5/boot/arch/ia32/grub/stage2_eltorito (revision 3857)
+++ g5/boot/arch/ia32/grub/stage2_eltorito (nonexistent)
/g5/boot/arch/ia32/grub/stage2_eltorito
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: g5/boot/arch/ia32/grub/COPYING
===================================================================
--- g5/boot/arch/ia32/grub/COPYING (revision 3857)
+++ g5/boot/arch/ia32/grub/COPYING (nonexistent)
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
Index: g5/boot/arch/ia32/grub/README
===================================================================
--- g5/boot/arch/ia32/grub/README (revision 3857)
+++ g5/boot/arch/ia32/grub/README (nonexistent)
@@ -1,5 +0,0 @@
-For licensing terms of GRUB boot loader see the file COPYING contained
-in this directory. Full version of GRUB, including its source code,
-can be downloaded from GRUB's project page:
-
-http://www.gnu.org/software/grub/
Index: g5/boot/arch/ia32/Makefile.inc
===================================================================
--- g5/boot/arch/ia32/Makefile.inc (revision 3857)
+++ g5/boot/arch/ia32/Makefile.inc (nonexistent)
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-TASKS = \
- $(USPACEDIR)/srv/ns/ns \
- $(USPACEDIR)/srv/pci/pci \
- $(USPACEDIR)/srv/fb/fb \
- $(USPACEDIR)/srv/kbd/kbd \
- $(USPACEDIR)/srv/console/console \
- $(USPACEDIR)/srv/vfs/vfs \
- $(USPACEDIR)/srv/fs/tmpfs/tmpfs \
- $(USPACEDIR)/srv/fs/fat/fat \
- $(USPACEDIR)/srv/devmap/devmap \
- $(USPACEDIR)/app/init/init \
- $(USPACEDIR)/app/tetris/tetris \
- $(USPACEDIR)/app/tester/tester \
- $(USPACEDIR)/app/klog/klog
-
-build: $(BASE)/image.iso
-
-$(BASE)/image.iso: arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/grub/menu.lst $(KERNELDIR)/kernel.bin $(TASKS)
- mkdir -p arch/$(ARCH)/iso/boot/grub
- cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/
- cp arch/$(ARCH)/grub/menu.lst arch/$(ARCH)/iso/boot/grub/
- cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/
- for task in $(TASKS) ; do \
- cp $$task arch/$(ARCH)/iso/boot/ ; \
- done
- mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/
-
-clean:
- -rm -fr arch/$(ARCH)/iso
- -rm -f $(BASE)/image.iso
Index: g5/boot/arch/sparc64/Makefile.inc
===================================================================
--- g5/boot/arch/sparc64/Makefile.inc (revision 3857)
+++ g5/boot/arch/sparc64/Makefile.inc (nonexistent)
@@ -1,50 +0,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-TMP=distroot
-
-build: $(BASE)/image.iso
-
-$(BASE)/image.iso: depend arch/$(ARCH)/loader/image.boot
- mkdir -p $(TMP)/boot
- mkdir -p $(TMP)/HelenOS
- cat arch/$(ARCH)/silo/silo.tar.gz | (cd $(TMP)/boot; tar xvfz -)
- cp arch/$(ARCH)/silo/README arch/$(ARCH)/silo/COPYING arch/$(ARCH)/silo/silo.conf $(TMP)/boot
- cp arch/$(ARCH)/loader/image.boot $(TMP)/HelenOS/image.boot
- mkisofs -f -G $(TMP)/boot/isofs.b -B ... -r -o $(BASE)/image.iso $(TMP)/
-
-depend:
- -rm arch/$(ARCH)/loader/image.boot
-
-arch/$(ARCH)/loader/image.boot:
- $(MAKE) -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)"
-
-clean: generic_clean
- $(MAKE) -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
- -rm -fr $(TMP)
- -rm -f $(BASE)/image.iso
Index: g5/boot/arch/sparc64/loader/register.h
===================================================================
--- g5/boot/arch/sparc64/loader/register.h (revision 3857)
+++ g5/boot/arch/sparc64/loader/register.h (nonexistent)
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BOOT_sparc64_REGISTER_H_
-#define BOOT_sparc64_REGISTER_H_
-
-#define PSTATE_IE_BIT 2
-#define PSTATE_PRIV_BIT 4
-#define PSTATE_AM_BIT 8
-
-#define ASI_UPA_CONFIG 0x4a
-#define UPA_CONFIG_MID_SHIFT 17
-#define UPA_CONFIG_MID_MASK 0x1f
-
-#endif
Index: g5/boot/arch/sparc64/loader/ofwarch.c
===================================================================
--- g5/boot/arch/sparc64/loader/ofwarch.c (revision 3857)
+++ g5/boot/arch/sparc64/loader/ofwarch.c (nonexistent)
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- * @brief Architecture dependent parts of OpenFirmware interface.
- */
-
-#include <ofwarch.h>
-#include <ofw.h>
-#include <printf.h>
-#include <string.h>
-#include <register.h>
-#include "main.h"
-#include "asm.h"
-
-void write(const char *str, const int len)
-{
- int i;
-
- for (i = 0; i < len; i++) {
- if (str[i] == '\n')
- ofw_write("\r", 1);
- ofw_write(&str[i], 1);
- }
-}
-
-int ofw_translate_failed(ofw_arg_t flag)
-{
- return flag != -1;
-}
-
-int ofw_cpu(void)
-{
- char type_name[BUF_SIZE];
-
- phandle node;
- node = ofw_get_child_node(ofw_root);
- if (node == 0 || node == -1) {
- printf("Could not find any child nodes of the root node.\n");
- return 0;
- }
-
- uint64_t current_mid;
-
- asm volatile ("ldxa [%1] %2, %0\n" : "=r" (current_mid) : "r" (0), "i" (ASI_UPA_CONFIG));
- current_mid >>= UPA_CONFIG_MID_SHIFT;
- current_mid &= UPA_CONFIG_MID_MASK;
-
- int cpus;
-
- for (cpus = 0; node != 0 && node != -1; node = ofw_get_peer_node(node), cpus++) {
- if (ofw_get_property(node, "device_type", type_name, sizeof(type_name)) > 0) {
- if (strcmp(type_name, "cpu") == 0) {
- uint32_t mid;
-
- if (ofw_get_property(node, "upa-portid", &mid, sizeof(mid)) <= 0)
- continue;
-
- if (current_mid != mid) {
- /*
- * Start secondary processor.
- */
- (void) ofw_call("SUNW,start-cpu", 3, 1, NULL, node,
- KERNEL_VIRTUAL_ADDRESS,
- bootinfo.physmem_start | AP_PROCESSOR);
- }
- }
- }
- }
-
- return cpus;
-}
-
-/** Get physical memory starting address.
- *
- * @param start Pointer to variable where the physical memory starting
- * address will be stored.
- *
- * @return Non-zero on succes, zero on failure.
- */
-int ofw_get_physmem_start(uintptr_t *start)
-{
- uint32_t memreg[4];
-
- if (ofw_get_property(ofw_memory, "reg", &memreg, sizeof(memreg)) <= 0)
- return 0;
-
- *start = (((uint64_t) memreg[0]) << 32) | memreg[1];
- return 1;
-}
-
Index: g5/boot/arch/sparc64/loader/types.h
===================================================================
--- g5/boot/arch/sparc64/loader/types.h (revision 3857)
+++ g5/boot/arch/sparc64/loader/types.h (nonexistent)
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2006 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BOOT_sparc64_TYPES_H_
-#define BOOT_sparc64_TYPES_H_
-
-#include <gentypes.h>
-
-typedef signed char int8_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long uint64_t;
-
-typedef uint64_t uintptr_t;
-typedef uint64_t unative_t;
-
-#endif
Index: g5/boot/arch/sparc64/loader/main.h
===================================================================
--- g5/boot/arch/sparc64/loader/main.h (revision 3857)
+++ g5/boot/arch/sparc64/loader/main.h (nonexistent)
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BOOT_sparc64_MAIN_H_
-#define BOOT_sparc64_MAIN_H_
-
-#include <ofw.h>
-#include <ofw_tree.h>
-#include <balloc.h>
-#include <types.h>
-
-#define KERNEL_VIRTUAL_ADDRESS 0x400000
-
-#define TASKMAP_MAX_RECORDS 32
-
-#define BSP_PROCESSOR 1
-#define AP_PROCESSOR 0
-
-typedef struct {
- void *addr;
- uint32_t size;
-} task_t;
-
-typedef struct {
- uint32_t count;
- task_t tasks[TASKMAP_MAX_RECORDS];
-} taskmap_t;
-
-typedef struct {
- uintptr_t physmem_start;
- taskmap_t taskmap;
- memmap_t memmap;
- ballocs_t ballocs;
- ofw_tree_node_t *ofw_root;
-} bootinfo_t;
-
-extern bootinfo_t bootinfo;
-
-extern void start(void);
-extern void bootstrap(void);
-
-#endif
Index: g5/boot/arch/sparc64/loader/stack.h
===================================================================
--- g5/boot/arch/sparc64/loader/stack.h (revision 3857)
+++ g5/boot/arch/sparc64/loader/stack.h (nonexistent)
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BOOT_sparc64_STACK_H_
-#define BOOT_sparc64_STACK_H_
-
-#define STACK_ALIGNMENT 16
-#define STACK_BIAS 2047
-#define STACK_WINDOW_SAVE_AREA_SIZE (16*8)
-
-#endif
Index: g5/boot/arch/sparc64/loader/Makefile
===================================================================
--- g5/boot/arch/sparc64/loader/Makefile (revision 3857)
+++ g5/boot/arch/sparc64/loader/Makefile (nonexistent)
@@ -1,118 +0,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-include ../../../../version
-include ../../../Makefile.config
-
-## Toolchain configuration
-#
-
-TARGET = sparc64-linux-gnu
-TOOLCHAIN_DIR = /usr/local/sparc64/bin
-
-ifeq ($(COMPILER),gcc_native)
- CC = gcc
- AS = as
- LD = ld
- OBJCOPY = objcopy
- OBJDUMP = objdump
-endif
-
-ifeq ($(COMPILER),gcc_cross)
- CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc
- AS = $(TOOLCHAIN_DIR)/$(TARGET)-as
- LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
- OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
- OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
-endif
-
-CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -I../../../genarch -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=ultrasparc -m64
-
-ifdef REVISION
- CFLAGS += "-DREVISION=\"$(REVISION)\""
-endif
-
-ifdef TIMESTAMP
- CFLAGS += "-DTIMESTAMP=\"$(TIMESTAMP)\""
-endif
-
-SOURCES = \
- main.c \
- ../../../generic/printf.c \
- ../../../generic/string.c \
- ../../../genarch/balloc.c \
- ../../../genarch/ofw.c \
- ../../../genarch/ofw_tree.c \
- ofwarch.c \
- asm.S \
- boot.S
-
-COMPONENTS = \
- $(KERNELDIR)/kernel.bin \
- $(USPACEDIR)/srv/ns/ns \
- $(USPACEDIR)/srv/fb/fb \
- $(USPACEDIR)/srv/kbd/kbd \
- $(USPACEDIR)/srv/console/console \
- $(USPACEDIR)/srv/vfs/vfs \
- $(USPACEDIR)/srv/fs/tmpfs/tmpfs \
- $(USPACEDIR)/srv/fs/fat/fat \
- $(USPACEDIR)/srv/devmap/devmap \
- $(USPACEDIR)/app/init/init \
- $(USPACEDIR)/app/tetris/tetris \
- $(USPACEDIR)/app/tester/tester \
- $(USPACEDIR)/app/klog/klog
-
-OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS))))
-
-.PHONY: all clean depend
-
-all: image.boot disasm
-
--include Makefile.depend
-
-image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS)
- $(LD) -Map image.map -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) -o $@
-
-depend:
- -makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
-
-clean:
- -rm -f _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot boot.disasm Makefile.depend
-
-_components.h _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS)
- ./pack $(IMAGE) $(OBJCOPY) $(COMPONENTS)
-
-%.o: %.S
- $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
-
-%.o: %.c
- $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
-
-disasm: image.boot
- $(OBJDUMP) -d image.boot > boot.disasm
Index: g5/boot/arch/sparc64/loader/pack
===================================================================
--- g5/boot/arch/sparc64/loader/pack (revision 3857)
+++ g5/boot/arch/sparc64/loader/pack (nonexistent)
@@ -1,113 +0,0 @@
-#! /bin/sh
-
-#
-# Copyright (C) 2006 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-[ "$#" -lt 1 ] && exit 1
-
-OBJCOPY="$1"
-LINK="_link.ld"
-HEADER="_components.h"
-
-shift
-
-echo 'OUTPUT_FORMAT("elf64-sparc")
-ENTRY(start)
-
-SECTIONS {
- .boot 0x4000: AT (0x4000) {
- *(BOOTSTRAP);
- *(.text);
- *(.rodata);
- *(.rodata.*);
- *(.data); /* initialized data */
- *(.sdata);
- *(.sdata2);
- *(.sbss);
- *(.bss); /* uninitialized static variables */
- *(COMMON);' > "$LINK"
-
-echo '#ifndef ___COMPONENTS_H__
-#define ___COMPONENTS_H__
-
-typedef struct {
- char *name;
-
- void *start;
- void *end;
- unsigned int size;
-} component_t;' > "$HEADER"
-
-COUNT="0"
-DATA=""
-
-for TASK in "$@" ; do
- BASENAME="`basename "$TASK" | sed 's/^\(.*\)\.[^.]*$/\1/'`"
- OBJECT="${BASENAME}.o"
- SYMBOL="`echo "_binary_$TASK" | tr "./" "__"`"
- MACRO="`echo "$BASENAME" | tr [:lower:] [:upper:]`"
- echo "$TASK -> $OBJECT"
-
- echo "
- *(.${BASENAME}_image);" >> "$LINK"
-
- echo "
-extern int ${SYMBOL}_start;
-extern int ${SYMBOL}_end;
-
-#define ${MACRO}_START ((void *) &${SYMBOL}_start)
-#define ${MACRO}_END ((void *) &${SYMBOL}_end)
-#define ${MACRO}_SIZE ((unsigned long) ${MACRO}_END - (unsigned long) ${MACRO}_START)" >> "$HEADER"
-
- "$OBJCOPY" -I binary -O elf64-sparc -B sparc --rename-section ".data=.${BASENAME}_image" "$TASK" "$OBJECT"
-
- DATA="${DATA}
- components[$COUNT].name = \"${BASENAME}\";
- components[$COUNT].start = ${MACRO}_START;
- components[$COUNT].end = ${MACRO}_END;
- components[$COUNT].size = ${MACRO}_SIZE;";
- COUNT="`expr "$COUNT" + 1`"
-done
-
-echo ' }
- /DISCARD/ : {
- *(.comment);
- *(.note*);
- }
-}' >> "$LINK"
-
-echo "
-#define COMPONENTS $COUNT
-
-static void init_components(component_t components[])
-{
-$DATA
-}
-
-#endif
-" >> "$HEADER"
/g5/boot/arch/sparc64/loader/pack
Property changes:
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: g5/boot/arch/sparc64/loader/ofwarch.h
===================================================================
--- g5/boot/arch/sparc64/loader/ofwarch.h (revision 3857)
+++ g5/boot/arch/sparc64/loader/ofwarch.h (nonexistent)
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BOOT_sparc64_OFWARCH_H_
-#define BOOT_sparc64_OFWARCH_H_
-
-#include "main.h"
-#include "types.h"
-
-#define OFW_ADDRESS_CELLS 2
-#define OFW_SIZE_CELLS 2
-
-extern int ofw_cpu(void);
-extern int ofw_get_physmem_start(uintptr_t *start);
-
-#endif
Index: g5/boot/arch/sparc64/loader/asm.S
===================================================================
--- g5/boot/arch/sparc64/loader/asm.S (revision 3857)
+++ g5/boot/arch/sparc64/loader/asm.S (nonexistent)
@@ -1,124 +0,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# Copyright (c) 2006 Jakub Jermar
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <stack.h>
-#include <register.h>
-
-.text
-
-.global halt
-.global memcpy
-.global jump_to_kernel
-
-halt:
- b halt
- nop
-
-memcpy:
- .register %g2, #scratch
- .register %g3, #scratch
- add %o1, 7, %g1
- and %g1, -8, %g1
- cmp %o1, %g1
- be,pn %xcc, 3f
- add %o0, 7, %g1
- mov 0, %g3
-0:
- brz,pn %o2, 2f
- mov 0, %g2
-1:
- ldub [%g3 + %o1], %g1
- add %g2, 1, %g2
- cmp %o2, %g2
- stb %g1, [%g3 + %o0]
- bne,pt %xcc, 1b
- mov %g2, %g3
-2:
- jmp %o7 + 8 ! exit point
- mov %o1, %o0
-3:
- and %g1, -8, %g1
- cmp %o0, %g1
- bne,pt %xcc, 0b
- mov 0, %g3
- srlx %o2, 3, %g4
- brz,pn %g4, 5f
- mov 0, %g5
-4:
- sllx %g3, 3, %g2
- add %g5, 1, %g3
- ldx [%o1 + %g2], %g1
- mov %g3, %g5
- cmp %g4, %g3
- bne,pt %xcc, 4b
- stx %g1, [%o0 + %g2]
-5:
- and %o2, 7, %o2
- brz,pn %o2, 2b
- sllx %g4, 3, %g1
- mov 0, %g2
- add %g1, %o0, %o0
- add %g1, %o1, %g4
- mov 0, %g3
-6:
- ldub [%g2 + %g4], %g1
- stb %g1, [%g2 + %o0]
- add %g3, 1, %g2
- cmp %o2, %g2
- bne,pt %xcc, 6b
- mov %g2, %g3
-
- jmp %o7 + 8 ! exit point
- mov %o1, %o0
-
-jump_to_kernel:
- mov %o0, %l1
- mov %o1, %o0
- mov %o2, %o1
- mov %o3, %o2
- jmp %l1 ! jump to kernel
- nop
-
-.global ofw
-ofw:
- save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
- set ofw_cif, %l0
- ldx [%l0], %l0
-
- rdpr %pstate, %l1
- and %l1, ~PSTATE_AM_BIT, %l2
- wrpr %l2, 0, %pstate
-
- jmpl %l0, %o7
- mov %i0, %o0
-
- wrpr %l1, 0, %pstate
-
- ret
- restore %o0, 0, %o0
Index: g5/boot/arch/sparc64/loader/boot.S
===================================================================
--- g5/boot/arch/sparc64/loader/boot.S (revision 3857)
+++ g5/boot/arch/sparc64/loader/boot.S (nonexistent)
@@ -1,84 +0,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# Copyright (c) 2006 Jakub Jermar
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <stack.h>
-#include <register.h>
-
-#define INITIAL_STACK_SIZE 8192
-
-#define NWINDOWS 8
-
-.register %g2, #scratch
-.register %g3, #scratch
-.register %g6, #scratch
-.register %g7, #scratch
-
-.section BOOTSTRAP, "ax"
-
-.global start
-start:
- b 1f
- nop
-
-/*
- * This header forces SILO to load the image at 0x4000.
- * More precisely, SILO will think this is an old version of Linux.
- */
- .ascii "HdrS"
- .word 0
- .half 0
-
-.align 8
-1:
- /*
- * Disable interrupts and disable address masking.
- */
- wrpr %g0, PSTATE_PRIV_BIT, %pstate
-
- wrpr %g0, NWINDOWS - 2, %cansave ! set maximum saveable windows
- wrpr %g0, 0, %canrestore ! get rid of windows we will never need again
- wrpr %g0, 0, %otherwin ! make sure the window state is consistent
- wrpr %g0, NWINDOWS - 1, %cleanwin ! prevent needless clean_window traps for kernel
-
- set initial_stack_top, %sp
- add %sp, -STACK_BIAS, %sp
-
- set ofw_cif, %l0
-
- call ofw_init ! initialize OpenFirmware
- stx %o4, [%l0]
-
- b bootstrap
- nop
-
-.align STACK_ALIGNMENT
-initial_stack:
- .space INITIAL_STACK_SIZE
-initial_stack_top:
- .space STACK_WINDOW_SAVE_AREA_SIZE
Index: g5/boot/arch/sparc64/loader/main.c
===================================================================
--- g5/boot/arch/sparc64/loader/main.c (revision 3857)
+++ g5/boot/arch/sparc64/loader/main.c (nonexistent)
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "main.h"
-#include <printf.h>
-#include "asm.h"
-#include "_components.h"
-#include <balloc.h>
-#include <ofw.h>
-#include <ofw_tree.h>
-#include "ofwarch.h"
-#include <align.h>
-
-bootinfo_t bootinfo;
-component_t components[COMPONENTS];
-
-char *release = RELEASE;
-
-#ifdef REVISION
- char *revision = ", revision " REVISION;
-#else
- char *revision = "";
-#endif
-
-#ifdef TIMESTAMP
- char *timestamp = "\nBuilt on " TIMESTAMP;
-#else
- char *timestamp = "";
-#endif
-
-/** Print version information. */
-static void version_print(void)
-{
- printf("HelenOS SPARC64 Bootloader\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n", release, revision, timestamp);
-}
-
-void bootstrap(void)
-{
- version_print();
-
- init_components(components);
-
- if (!ofw_get_physmem_start(&bootinfo.physmem_start)) {
- printf("Error: unable to get start of physical memory.\n");
- halt();
- }
-
- if (!ofw_memmap(&bootinfo.memmap)) {
- printf("Error: unable to get memory map, halting.\n");
- halt();
- }
-
- if (bootinfo.memmap.total == 0) {
- printf("Error: no memory detected, halting.\n");
- halt();
- }
-
- printf("\nSystem info\n");
- printf(" memory: %dM starting at %P\n",
- bootinfo.memmap.total >> 20, bootinfo.physmem_start);
-
- printf("\nMemory statistics\n");
- printf(" kernel entry point at %P\n", KERNEL_VIRTUAL_ADDRESS);
- printf(" %P: boot info structure\n", &bootinfo);
-
- unsigned int i;
- for (i = 0; i < COMPONENTS; i++)
- printf(" %P: %s image (size %d bytes)\n", components[i].start,
- components[i].name, components[i].size);
-
- void * base = (void *) KERNEL_VIRTUAL_ADDRESS;
- unsigned int top = 0;
-
- printf("\nCopying components\n");
- bootinfo.taskmap.count = 0;
- for (i = 0; i < COMPONENTS; i++) {
- printf(" %s...", components[i].name);
- top = ALIGN_UP(top, PAGE_SIZE);
-
- /*
- * At this point, we claim the physical memory that we are
- * going to use. We should be safe in case of the virtual
- * address space because the OpenFirmware, according to its
- * SPARC binding, should restrict its use of virtual memory
- * to addresses from [0xffd00000; 0xffefffff] and
- * [0xfe000000; 0xfeffffff].
- */
- (void) ofw_claim_phys(bootinfo.physmem_start + base + top,
- ALIGN_UP(components[i].size, PAGE_SIZE));
-
- memcpy(base + top, components[i].start, components[i].size);
- if (i > 0) {
- bootinfo.taskmap.tasks[bootinfo.taskmap.count].addr =
- base + top;
- bootinfo.taskmap.tasks[bootinfo.taskmap.count].size =
- components[i].size;
- bootinfo.taskmap.count++;
- }
- top += components[i].size;
- printf("done.\n");
- }
-
- /*
- * Claim the physical memory for the boot allocator.
- * Initialize the boot allocator.
- */
- (void) ofw_claim_phys(bootinfo.physmem_start +
- base + ALIGN_UP(top, PAGE_SIZE), BALLOC_MAX_SIZE);
- balloc_init(&bootinfo.ballocs, ALIGN_UP(((uintptr_t) base) + top,
- PAGE_SIZE));
-
- printf("\nCanonizing OpenFirmware device tree...");
- bootinfo.ofw_root = ofw_tree_build();
- printf("done.\n");
-
-#ifdef CONFIG_SMP
- printf("\nChecking for secondary processors...");
- if (!ofw_cpu())
- printf("Error: unable to get CPU properties\n");
- printf("done.\n");
-#endif
-
- printf("\nBooting the kernel...\n");
- jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS,
- bootinfo.physmem_start | BSP_PROCESSOR, &bootinfo,
- sizeof(bootinfo));
-}
-
Index: g5/boot/arch/sparc64/loader/asm.h
===================================================================
--- g5/boot/arch/sparc64/loader/asm.h (revision 3857)
+++ g5/boot/arch/sparc64/loader/asm.h (nonexistent)
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2006 Martin Decky
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BOOT_sparc64_ASM_H_
-#define BOOT_sparc64_ASM_H_
-
-#include "types.h"
-#include "main.h"
-
-#define PAGE_WIDTH 14
-#define PAGE_SIZE (1 << PAGE_WIDTH)
-
-#define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt))
-
-extern void halt(void);
-extern void jump_to_kernel(void *entry, uint64_t cfg, bootinfo_t *bootinfo,
- unsigned int bootinfo_size) __attribute__((noreturn));
-
-#endif
Index: g5/boot/arch/sparc64/silo/COPYING
===================================================================
--- g5/boot/arch/sparc64/silo/COPYING (revision 3857)
+++ g5/boot/arch/sparc64/silo/COPYING (nonexistent)
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
Index: g5/boot/arch/sparc64/silo/silo.conf
===================================================================
--- g5/boot/arch/sparc64/silo/silo.conf (revision 3857)
+++ g5/boot/arch/sparc64/silo/silo.conf (nonexistent)
@@ -1,3 +0,0 @@
-timeout = 0
-image = /HelenOS/image.boot
- label = HelenOS
Index: g5/boot/arch/sparc64/silo/silo.tar.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: g5/boot/arch/sparc64/silo/silo.tar.gz
===================================================================
--- g5/boot/arch/sparc64/silo/silo.tar.gz (revision 3857)
+++ g5/boot/arch/sparc64/silo/silo.tar.gz (nonexistent)
/g5/boot/arch/sparc64/silo/silo.tar.gz
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: g5/boot/arch/sparc64/silo/README
===================================================================
--- g5/boot/arch/sparc64/silo/README (revision 3857)
+++ g5/boot/arch/sparc64/silo/README (nonexistent)
@@ -1,5 +0,0 @@
-For licensing terms of SILO boot loader see the file COPYING contained
-in this directory. Full version of SILO, including its source code,
-can be downloaded from SILO's project page:
-
-http://www.sparc-boot.org/
Index: g5/boot/arch/ia64/Makefile.inc
===================================================================
--- g5/boot/arch/ia64/Makefile.inc (revision 3857)
+++ g5/boot/arch/ia64/Makefile.inc (nonexistent)
@@ -1,64 +0,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#ifeq ($(MACHINE),ski)
-
-
-
-#VMAXLMA_SRC = tools/ia64/vmaxlma.c
-#build: $(BASE)/kernel.bin
-#echo Building SKI
-#$(BASE)/kernel.bin: $(KERNELDIR)/kernel.bin vmaxlma
-# cp $(KERNELDIR)/kernel.bin $(BASE)/kernel.bin
-# ./vmaxlma $(BASE)/kernel.bin
-#vmaxlma: $(VMAXLMA_SRC)
-# $(CC) $(VMAXLMA_SRC) -o $@
-#clean:
-# -rm -f $(BASE)/kernel.bin vmaxlma
-
-
-#else
-
-
-build: $(BASE)/image.boot
-
-$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot
- cp arch/$(ARCH)/loader/image.boot $(BASE)/image.boot
-
-depend:
- -rm arch/$(ARCH)/loader/image.boot
-
-arch/$(ARCH)/loader/image.boot:
- make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)"
-
-clean: generic_clean
- make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)"
- -rm -f $(BASE)/image.boot
-
-
-#endif
\ No newline at end of file
Index: g5/boot/arch/ia64/loader/stack.h
===================================================================
--- g5/boot/arch/ia64/loader/stack.h (revision 3857)
+++ g5/boot/arch/ia64/loader/stack.h (nonexistent)
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BOOT_ia64_STACK_H_
-#define BOOT_ia64_STACK_H_
-
-#define STACK_ALIGNMENT 16
-#define STACK_BIAS 2047
-#define STACK_WINDOW_SAVE_AREA_SIZE (16*8)
-
-#endif
Index: g5/boot/arch/ia64/loader/Makefile
===================================================================
--- g5/boot/arch/ia64/loader/Makefile (revision 3857)
+++ g5/boot/arch/ia64/loader/Makefile (nonexistent)
@@ -1,135 +0,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-include ../../../../version
-include ../../../Makefile.config
-
-## Toolchain configuration
-#
-
-TARGET = ia64-pc-linux-gnu
-TOOLCHAIN_DIR = /usr/local/ia64/bin
-
-ifeq ($(COMPILER),gcc_native)
- CC = gcc
- AS = as
- LD = ld
- OBJCOPY = objcopy
- OBJDUMP = objdump
- GEFI_PREXIX =
-endif
-
-ifeq ($(COMPILER),icc_native)
- CC = icc
- AS = as
- LD = ld
- OBJCOPY = objcopy
- OBJDUMP = objdump
-endif
-
-ifeq ($(COMPILER),gcc_cross)
- CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc
- AS = $(TOOLCHAIN_DIR)/$(TARGET)-as
- LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
- OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
- OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
- GEFI_PREFIX = $(TOOLCHAIN_DIR)/$(TARGET)-
-endif
-
-#-mno-pic means do not use gp + imm22 to address data
-CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -I../../../genarch -I../../../../kernel/generic/include -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic
-
-ifdef REVISION
- CFLAGS += "-DREVISION=\"$(REVISION)\""
-endif
-
-ifdef TIMESTAMP
- CFLAGS += "-DTIMESTAMP=\"$(TIMESTAMP)\""
-endif
-
-SOURCES = \
- main.c \
- ../../../generic/printf.c \
- ../../../generic/string.c \
- ../../../genarch/balloc.c \
- asm.S \
- boot.S
-
-COMPONENTS = \
- $(KERNELDIR)/kernel.bin \
- $(USPACEDIR)/srv/ns/ns \
- $(USPACEDIR)/srv/fb/fb \
- $(USPACEDIR)/srv/kbd/kbd \
- $(USPACEDIR)/srv/console/console \
- $(USPACEDIR)/srv/vfs/vfs \
- $(USPACEDIR)/srv/fs/tmpfs/tmpfs \
- $(USPACEDIR)/srv/fs/fat/fat \
- $(USPACEDIR)/srv/devmap/devmap \
- $(USPACEDIR)/app/init/init \
- $(USPACEDIR)/app/tetris/tetris \
- $(USPACEDIR)/app/tester/tester \
- $(USPACEDIR)/app/klog/klog
-
-
-OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS))))
-
-.PHONY: all clean depend
-
-all: hello.efi disasm
-
--include Makefile.depend
-
-
-hello.efi: image.boot
- make -C gefi/HelenOS PREFIX=$(GEFI_PREFIX)
- cp gefi/HelenOS/hello.efi ../../../../
-# cp gefi/HelenOS/hello.efi /boot/efi/
- cp gefi/HelenOS/image.bin ../../../../
-
-image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS)
- $(LD) -Map boot.map -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) -o $@
-
-depend:
- -makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
-
-clean:
- -rm -f _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot boot.disasm Makefile.depend
- make -C gefi/HelenOS clean
-
-_components.h _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS)
- ./pack $(IMAGE) $(OBJCOPY) $(COMPONENTS)
-
-%.o: %.S
- $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
-
-%.o: %.c
- $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
-
-disasm: image.boot
- $(OBJDUMP) -d image.boot > boot.disasm
Index: g5/boot/arch/ia64/loader/pack
===================================================================
--- g5/boot/arch/ia64/loader/pack (revision 3857)
+++ g5/boot/arch/ia64/loader/pack (nonexistent)
@@ -1,121 +0,0 @@
-#! /bin/sh
-
-#
-# Copyright (C) 2006 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-[ "$#" -lt 1 ] && exit 1
-
-OBJCOPY="$1"
-LINK="_link.ld"
-HEADER="_components.h"
-
-shift
-echo 'OUTPUT_FORMAT("elf64-ia64-little")
-ENTRY(start)
-
-SECTIONS {
- .boot 0x4400000: AT (0x4400000) {
- *(BOOTSTRAP);
-
- . = ALIGN (0x4000);
-
-' > "$LINK"
-
-echo '#ifndef ___COMPONENTS_H__
-#define ___COMPONENTS_H__
-
-typedef struct {
- char *name;
-
- void *start;
- void *end;
- unsigned int size;
-} component_t;' > "$HEADER"
-
-
-COUNT="0"
-DATA=""
-
-for TASK in "$@" ; do
- BASENAME="`basename "$TASK" | sed 's/^\(.*\)\.[^.]*$/\1/'`"
- OBJECT="${BASENAME}.o"
- SYMBOL="`echo "_binary_$TASK" | tr "./" "__"`"
- MACRO="`echo "$BASENAME" | tr [:lower:] [:upper:]`"
- echo "$TASK -> $OBJECT"
-
- echo "
- *(.${BASENAME}_image);
- . = ALIGN (0x4000);" >> "$LINK"
- echo "
-extern int ${SYMBOL}_start;
-extern int ${SYMBOL}_end;
-
-#define ${MACRO}_START ((void *) &${SYMBOL}_start)
-#define ${MACRO}_END ((void *) &${SYMBOL}_end)
-#define ${MACRO}_SIZE ((unsigned long) ${MACRO}_END - (unsigned long) ${MACRO}_START)" >> "$HEADER"
-
- "$OBJCOPY" -I binary -O elf64-ia64-little -B ia64 --rename-section ".data=.${BASENAME}_image" "$TASK" "$OBJECT"
-
- DATA="${DATA}
- components[$COUNT].name = \"${BASENAME}\";
- components[$COUNT].start = ${MACRO}_START;
- components[$COUNT].end = ${MACRO}_END;
- components[$COUNT].size = ${MACRO}_SIZE;";
- COUNT="`expr "$COUNT" + 1`"
-done
-
-echo '
- *(.text);
- *(.rodata);
- *(.rodata.*);
- *(.data); /* initialized data */
- _got = . ;
- *(.got .got.*);
- *(.sdata);
- *(.sdata2);
- *(.sbss);
- *(.bss); /* uninitialized static variables */
- *(COMMON);' >> "$LINK"
-
-echo ' }
- /DISCARD/ : {
- *(.comment);
- *(.note*);
- }
-}' >> "$LINK"
-
-echo "
-#define COMPONENTS $COUNT
-
-static void init_components(component_t components[])
-{
-$DATA
-}
-
-#endif
-" >> "$HEADER"
/g5/boot/arch/ia64/loader/pack
Property changes:
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: g5/boot/arch/ia64/loader/asm.S
===================================================================
--- g5/boot/arch/ia64/loader/asm.S (revision 3857)
+++ g5/boot/arch/ia64/loader/asm.S (nonexistent)
@@ -1,43 +0,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# Copyright (c) 2006 Jakub Jermar
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <stack.h>
-
-.text
-
-.global jump_to_kernel
-
-jump_to_kernel:
- alloc loc0 = ar.pfs, 1, 1, 0, 0
- movl r8 = 0x4404000;;
- mov b1 = r8 ;;
- mov r1 = in0;
- br.call.sptk.many b0 = b1;;
-.global ofw
-ofw:
Index: g5/boot/arch/ia64/loader/boot.S
===================================================================
--- g5/boot/arch/ia64/loader/boot.S (revision 3857)
+++ g5/boot/arch/ia64/loader/boot.S (nonexistent)
@@ -1,68 +0,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# Copyright (c) 2006 Jakub Jermar
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <stack.h>
-
-.section BOOTSTRAP, "ax"
-
-.global start
-start:
-
- mov ar.rsc = r0
-# movl r8 = (VRN_KERNEL << VRN_SHIFT) ;;
- movl r1 = 0x4400000
- movl r8 = initial_stack ;;
- mov ar.bspstore = r8
- loadrs
-
- # initialize memory stack to some sane value
- movl r12 = initial_stack_top ;;
-
- add r12 = -16, r12 /* allocate a scratch area on the stack */
-
- # initialize gp (Global Pointer) register
- #movl r1 = _hardcoded_load_address
-
- ssm (1 << 19) ;; /* Disable f32 - f127 */
- srlz.i
- srlz.d ;;
-
- movl r18 = bootstrap ;;
- mov b1 = r18 ;;
- br.call.sptk.many b0 = b1
-
-.bss #on this line is ".bss", it cannot be seen in my mcedit :-(
-
-
-.align 8192
-
-initial_stack:
- .space 8192
-
-initial_stack_top:
Index: g5/boot/arch/ia64/loader/main.c
===================================================================
--- g5/boot/arch/ia64/loader/main.c (revision 3857)
+++ g5/boot/arch/ia64/loader/main.c (nonexistent)
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "main.h"
-#include <printf.h>
-#include "asm.h"
-#include "_components.h"
-#include <align.h>
-#include <balloc.h>
-
-bootinfo_t bootinfo;
-component_t components[COMPONENTS];
-
-char *release = RELEASE;
-
-void write(const char *str, const int len)
-{
- return;
-}
-
-
-#ifdef REVISION
- char *revision = ", revision " REVISION;
-#else
- char *revision = "";
-#endif
-
-#ifdef TIMESTAMP
- char *timestamp = "\nBuilt on " TIMESTAMP;
-#else
- char *timestamp = "";
-#endif
-
-/** Print version information. */
-static void version_print(void)
-{
- printf("HelenOS IA64 Bootloader\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n", release, revision, timestamp);
-}
-
-void bootstrap(void)
-{
-
- int ii;
-
-
- //for(ii=0;ii<KERNEL_SIZE;ii++) ((char *)(0x100000))[ii] = ((char *)KERNEL_START)[ii+1];
-
-
- //((int *)(0x100000))[0]++;
-
-
-
-
- version_print();
-
-
- init_components(components);
-
- printf("\nSystem info\n");
- printf("\nMemory statistics\n");
- printf(" %P: boot info structure\n", &bootinfo);
-
- unsigned int i;
- for (i = 0; i < COMPONENTS; i++)
- printf(" %P: %s image (size %d bytes)\n", components[i].start,
- components[i].name, components[i].size);
-
-
- bootinfo.taskmap.count = 0;
- for (i = 0; i < COMPONENTS; i++) {
-
- if (i > 0) {
- bootinfo.taskmap.tasks[bootinfo.taskmap.count].addr = components[i].start;
- bootinfo.taskmap.tasks[bootinfo.taskmap.count].size = components[i].size;
- bootinfo.taskmap.count++;
- }
- }
-
-
- jump_to_kernel(&bootinfo);
-
-
-}
-
Index: g5/boot/arch/ia64/loader/asm.h
===================================================================
--- g5/boot/arch/ia64/loader/asm.h (revision 3857)
+++ g5/boot/arch/ia64/loader/asm.h (nonexistent)
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2006 Martin Decky
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BOOT_ia64_ASM_H_
-#define BOOT_ia64_ASM_H_
-
-#include "types.h"
-#include "main.h"
-
-#define PAGE_WIDTH 14
-#define PAGE_SIZE (1 << PAGE_WIDTH)
-
-#define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt))
-
-extern void halt(void);
-/*extern void jump_to_kernel(void *entry, uint64_t cfg, bootinfo_t *bootinfo,
- unsigned int bootinfo_size) __attribute__((noreturn));*/
-
-extern void jump_to_kernel(void *) __attribute__((noreturn));
-
-
-#endif
Index: g5/boot/arch/ia64/loader/types.h
===================================================================
--- g5/boot/arch/ia64/loader/types.h (revision 3857)
+++ g5/boot/arch/ia64/loader/types.h (nonexistent)
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2006 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BOOT_ia64_TYPES_H_
-#define BOOT_ia64_TYPES_H_
-
-#include <gentypes.h>
-
-typedef signed char int8_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long uint64_t;
-
-typedef uint64_t uintptr_t;
-typedef uint64_t unative_t;
-
-typedef unsigned long count_t;
-
-
-#endif
Index: g5/boot/arch/ia64/loader/main.h
===================================================================
--- g5/boot/arch/ia64/loader/main.h (revision 3857)
+++ g5/boot/arch/ia64/loader/main.h (nonexistent)
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BOOT_ia64_MAIN_H_
-#define BOOT_ia64_MAIN_H_
-
-#include <ofw.h>
-#include <ofw_tree.h>
-#include <types.h>
-
-
-#define CONFIG_INIT_TASKS 32
-
-typedef struct {
- void *addr;
- size_t size;
-} init_task_t;
-
-typedef struct {
- count_t count;
- init_task_t tasks[CONFIG_INIT_TASKS];
-} init_t;
-
-typedef struct {
- init_t taskmap;
-} bootinfo_t;
-
-extern bootinfo_t bootinfo;
-
-extern void start(void);
-extern void bootstrap(void);
-
-#endif
Index: g5/boot/arch/ia64/loader/gefi/apps/tpause.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/apps/tpause.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/apps/tpause.c (nonexistent)
@@ -1,9 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
- Print(L"Press `q' to quit, any other key to continue:\n");
-
-}
Index: g5/boot/arch/ia64/loader/gefi/apps/t.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/apps/t.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/apps/t.c (nonexistent)
@@ -1,71 +0,0 @@
-#define EFI_SUCCESS 0
-
-typedef short CHAR16;
-typedef unsigned long UINTN;
-typedef unsigned long long UINT64;
-typedef unsigned int UINT32;
-typedef void * EFI_HANDLE;
-typedef UINTN EFI_STATUS;
-
-typedef struct _EFI_TABLE_HEARDER {
- UINT64 Signature;
- UINT32 Revision;
- UINT32 HeaderSize;
- UINT32 CRC32;
- UINT32 Reserved;
-} EFI_TABLE_HEADER;
-
-typedef EFI_STATUS (*EFI_TEXT_STRING) (void *This, CHAR16 *String);
-
-typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE {
- void * Reset;
-
- EFI_TEXT_STRING OutputString;
-} SIMPLE_TEXT_OUTPUT_INTERFACE;
-
-typedef struct _EFI_SYSTEM_TABLE {
- EFI_TABLE_HEADER Hdr;
-
- CHAR16 *FirmwareVendor;
- UINT32 FirmwareRevision;
-
- EFI_HANDLE ConsoleInHandle;
- /*SIMPLE_INPUT_INTERFACE*/ void *ConIn;
-
- EFI_HANDLE ConsoleOutHandle;
- SIMPLE_TEXT_OUTPUT_INTERFACE *ConOut;
-
- EFI_HANDLE StandardErrorHandle;
- SIMPLE_TEXT_OUTPUT_INTERFACE *StdErr;
-
- /*EFI_RUNTIME_SERVICES*/ void *RuntimeServices;
- /*EFI_BOOT_SERVICES*/ void *BootServices;
-
- UINTN NumberOfTableEntries;
- /*EFI_CONFIGURATION_TABLE*/void *ConfigurationTable;
-
-} EFI_SYSTEM_TABLE;
-
-static CHAR16 *
-a2u (char *str)
-{
- static CHAR16 mem[2048];
- int i;
-
- for (i = 0; str[i]; ++i)
- mem[i] = (CHAR16) str[i];
- mem[i] = 0;
- return mem;
-}
-
-EFI_STATUS
-efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab)
-{
- SIMPLE_TEXT_OUTPUT_INTERFACE *conout;
-
- conout = systab->ConOut;
- conout->OutputString(conout, (CHAR16 *)L"Hello World!\n\r");
- conout->OutputString(conout, a2u("Hello World!\n\r"));
-
- return EFI_SUCCESS;
-}
Index: g5/boot/arch/ia64/loader/gefi/apps/printenv.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/apps/printenv.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/apps/printenv.c (nonexistent)
@@ -1,32 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
- EFI_STATUS status;
- CHAR16 name[256], *val, fmt[20];
- EFI_GUID vendor;
- UINTN size;
-
- InitializeLib(image, systab);
-
- name[0] = 0;
- vendor = NullGuid;
-
- Print(L"GUID Variable Name Value\n");
- Print(L"=================================== ==================== ========\n");
-
- StrCpy(fmt, L"%.-35g %.-20s %s\n");
- while (1) {
- size = sizeof(name);
- status = RT->GetNextVariableName(&size, name, &vendor);
- if (status != EFI_SUCCESS)
- break;
-
- val = LibGetVariable(name, &vendor);
- Print(fmt, &vendor, name, val);
- FreePool(val);
- }
- return EFI_SUCCESS;
-}
Index: g5/boot/arch/ia64/loader/gefi/apps/t2.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/apps/t2.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/apps/t2.c (nonexistent)
@@ -1,13 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
- SIMPLE_TEXT_OUTPUT_INTERFACE *conout;
-
- conout = systab->ConOut;
- conout->OutputString(conout, L"Hello World!\n\r");
-
- return EFI_SUCCESS;
-}
Index: g5/boot/arch/ia64/loader/gefi/apps/t3.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/apps/t3.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/apps/t3.c (nonexistent)
@@ -1,93 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main(
- EFI_HANDLE image_handle,
- EFI_SYSTEM_TABLE *systab
-)
-{
- EFI_GUID loaded_image_protocol = LOADED_IMAGE_PROTOCOL;
- EFI_STATUS efi_status;
- EFI_LOADED_IMAGE *li;
- UINTN pat = PoolAllocationType;
- VOID *void_li_p;
-
- InitializeLib(image_handle, systab);
- PoolAllocationType = 2; /* klooj */
-
- Print(L"Hello World! (0xd=0x%x, 13=%d)\n", 13, 13);
-
- Print(L"before InitializeLib(): PoolAllocationType=%d\n",
- pat);
-
- Print(L" after InitializeLib(): PoolAllocationType=%d\n",
- PoolAllocationType);
-
- /*
- * Locate loaded_image_handle instance.
- */
-
- Print(L"BS->HandleProtocol() ");
-
- efi_status = BS->HandleProtocol(
- image_handle,
- &loaded_image_protocol,
- &void_li_p);
- li = void_li_p;
-
- Print(L"%xh (%r)\n", efi_status, efi_status);
-
- if (efi_status != EFI_SUCCESS) {
- return efi_status;
- }
-
- Print(L" li: %xh\n", li);
-
- if (!li) {
- return EFI_UNSUPPORTED;
- }
-
- Print(L" li->Revision: %xh\n", li->Revision);
- Print(L" li->ParentHandle: %xh\n", li->ParentHandle);
- Print(L" li->SystemTable: %xh\n", li->SystemTable);
- Print(L" li->DeviceHandle: %xh\n", li->DeviceHandle);
- Print(L" li->FilePath: %xh\n", li->FilePath);
- Print(L" li->Reserved: %xh\n", li->Reserved);
- Print(L" li->LoadOptionsSize: %xh\n", li->LoadOptionsSize);
- Print(L" li->LoadOptions: %xh\n", li->LoadOptions);
- Print(L" li->ImageBase: %xh\n", li->ImageBase);
- Print(L" li->ImageSize: %xh\n", li->ImageSize);
- Print(L" li->ImageCodeType: %xh\n", li->ImageCodeType);
- Print(L" li->ImageDataType: %xh\n", li->ImageDataType);
- Print(L" li->Unload: %xh\n", li->Unload);
-
-#if 0
-typedef struct {
- UINT32 Revision;
- EFI_HANDLE ParentHandle;
- struct _EFI_SYSTEM_TABLE *SystemTable;
-
- // Source location of image
- EFI_HANDLE DeviceHandle;
- EFI_DEVICE_PATH *FilePath;
- VOID *Reserved;
-
- // Images load options
- UINT32 LoadOptionsSize;
- VOID *LoadOptions;
-
- // 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
- EFI_IMAGE_UNLOAD Unload;
-
-} EFI_LOADED_IMAGE;
-#endif
-
- return EFI_SUCCESS;
-}
Index: g5/boot/arch/ia64/loader/gefi/apps/t4.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/apps/t4.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/apps/t4.c (nonexistent)
@@ -1,13 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE *image, EFI_SYSTEM_TABLE *systab)
-{
- UINTN index;
-
- systab->ConOut->OutputString(systab->ConOut, L"Hello application started\r\n");
- systab->ConOut->OutputString(systab->ConOut, L"\r\n\r\n\r\nHit any key to exit\r\n");
- systab->BootServices->WaitForEvent(1, &systab->ConIn->WaitForKey, &index);
- return EFI_SUCCESS;
-}
Index: g5/boot/arch/ia64/loader/gefi/apps/t5.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/apps/t5.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/apps/t5.c (nonexistent)
@@ -1,13 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
- InitializeLib(image, systab);
- Print(L"HelloLib application started\n");
- Print(L"\n\n\nHit any key to exit this image\n");
- WaitForSingleEvent(ST->ConIn->WaitForKey, 0);
- ST->ConOut->OutputString(ST->ConOut, L"\n\n");
- return EFI_SUCCESS;
-}
Index: g5/boot/arch/ia64/loader/gefi/apps/t6.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/apps/t6.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/apps/t6.c (nonexistent)
@@ -1,39 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-typedef EFI_STATUS (*foo_t)(EFI_HANDLE, EFI_GUID *, VOID **);
-typedef struct {
- unsigned long addr;
- unsigned long gp;
-} fdesc_t;
-
-EFI_LOADED_IMAGE my_loaded;
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
- EFI_LOADED_IMAGE *loaded_image = NULL;
-#if 0
- EFI_DEVICE_PATH *dev_path;
-#endif
- EFI_STATUS status;
-
- InitializeLib(image, systab);
- status = systab->BootServices->HandleProtocol(image, &LoadedImageProtocol, (void **) &loaded_image);
- if (EFI_ERROR(status)) {
- Print(L"handleprotocol: %r\n", status);
- }
-
-#if 0
- BS->HandleProtocol(loaded_image->DeviceHandle, &DevicePathProtocol, (void **) &dev_path);
-
- Print(L"Image device : %s\n", DevicePathToStr(dev_path));
- Print(L"Image file : %s\n", DevicePathToStr(loaded_image->FilePath));
-#endif
- Print(L"Image base : %lx\n", loaded_image->ImageBase);
- Print(L"Image size : %lx\n", loaded_image->ImageSize);
- Print(L"Load options size : %lx\n", loaded_image->LoadOptionsSize);
- Print(L"Load options : %s\n", loaded_image->LoadOptions);
-
- return EFI_SUCCESS;
-}
Index: g5/boot/arch/ia64/loader/gefi/apps/trivial.S
===================================================================
--- g5/boot/arch/ia64/loader/gefi/apps/trivial.S (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/apps/trivial.S (nonexistent)
@@ -1,43 +0,0 @@
- .text
- .align 4
-
- .globl _start
-_start:
-#if 0
- pushl %ebp
- movl %esp,%ebp
- pushl %ebx # save ebx
- movl 12(%ebp),%eax # eax <- systab
- movl 24(%eax),%ebx # ebx <- systab->FirmwareVendor
- pushl %ebx
- movl 44(%eax),%ebx # ebx <- systab->ConOut
- pushl %ebx
- movl 4(%ebx),%eax # eax <- conout->OutputString
- call *%eax
- movl -4(%ebp),%ebx # restore ebx
- leave
- ret
-
-#else
-
- pushl %ebp
- movl %esp,%ebp
- pushl %ebx
- call 0f
-0: popl %eax
- addl $hello-0b,%eax
- pushl %eax
- movl 12(%ebp),%eax # eax <- systab
- movl 44(%eax),%ebx # ebx <- systab->ConOut
- pushl %ebx
- movl 4(%ebx),%eax # eax <- conout->OutputString
- call *%eax
- movl -4(%ebp),%ebx
- leave
- ret
-
- .section .rodata
- .align 2
-hello: .byte 'h',0,'e',0,'l',0,'l',0,'o',0,'\n',0,'\r',0,0,0
-
-#endif
Index: g5/boot/arch/ia64/loader/gefi/apps/t7.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/apps/t7.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/apps/t7.c (nonexistent)
@@ -1,25 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
- EFI_INPUT_KEY efi_input_key;
- EFI_STATUS efi_status;
-
- InitializeLib(image, systab);
-
- Print(L"HelloLib application started\n");
-
- Print(L"\n\n\nHit any key to exit this image\n");
- WaitForSingleEvent(ST->ConIn->WaitForKey, 0);
-
- ST->ConOut->OutputString(ST->ConOut, L"\n\n");
-
- efi_status = ST->ConIn->ReadKeyStroke(ST->ConIn, &efi_input_key);
-
- Print(L"ScanCode: %xh UnicodeChar: %xh\n",
- efi_input_key.ScanCode, efi_input_key.UnicodeChar);
-
- return EFI_SUCCESS;
-}
Index: g5/boot/arch/ia64/loader/gefi/apps/Makefile
===================================================================
--- g5/boot/arch/ia64/loader/gefi/apps/Makefile (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/apps/Makefile (nonexistent)
@@ -1,44 +0,0 @@
-#
-# Copyright (C) 1999-2001 Hewlett-Packard Co.
-# Contributed by David Mosberger <davidm@hpl.hp.com>
-# Contributed by Stephane Eranian <eranian@hpl.hp.com>
-#
-# This file is part of the gnu-efi package.
-#
-# GNU-EFI is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# GNU-EFI is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU-EFI; see the file COPYING. If not, write to the Free
-# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-#
-
-include ../Make.defaults
-CDIR=$(TOPDIR)/..
-LINUX_HEADERS = /usr/src/sys/build
-CPPFLAGS += -D__KERNEL__ -I$(LINUX_HEADERS)/include
-CRTOBJS = ../gnuefi/crt0-efi-$(ARCH).o
-LDSCRIPT = ../gnuefi/elf_$(ARCH)_efi.lds
-LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
-LOADLIBES = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name)
-FORMAT = efi-app-$(ARCH)
-
-TARGETS = t.efi t2.efi t3.efi t4.efi t5.efi t6.efi printenv.efi t7.efi
-
-all: $(TARGETS)
-
-
-clean:
- rm -f $(TARGETS) *~ *.o *.so
-
-.PHONY: install
-
-include ../Make.rules
Index: g5/boot/arch/ia64/loader/gefi/Make.defaults
===================================================================
--- g5/boot/arch/ia64/loader/gefi/Make.defaults (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/Make.defaults (nonexistent)
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P.
-# Contributed by David Mosberger <davidm@hpl.hp.com>
-# Contributed by Stephane Eranian <eranian@hpl.hp.com>
-#
-# This file is part of the gnu-efi package.
-#
-# GNU-EFI is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# GNU-EFI is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU-EFI; see the file COPYING. If not, write to the Free
-# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-#
-
-#
-# Where to install the package. GNU-EFI will create and access
-# lib and include under the root
-#
-INSTALLROOT=/usr/local
-
-TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
-
-ARCH = $(shell uname -m | sed s,i[3456789]86,ia32,)
-INCDIR = -I. -I$(CDIR)/inc -I$(CDIR)/inc/$(ARCH) -I$(CDIR)/inc/protocol
-CPPFLAGS = -DCONFIG_$(ARCH)
-CFLAGS = -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants
-LDFLAGS = -nostdlib
-INSTALL = install
-
-GCC_VERSION=$(shell $(CROSS_COMPILE)$(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
-
-# prefix =
-CC = $(prefix)gcc
-AS = $(prefix)as
-LD = $(prefix)ld
-AR = $(prefix)ar
-RANLIB = $(prefix)ranlib
-OBJCOPY = $(prefix)objcopy
-OBJDUMP = $(prefix)objdump
-
-
-ifneq ($(GCC_VERSION),2)
- CFLAGS += -frename-registers
-endif
-
-CFLAGS += -mfixed-range=f32-f127
-
Index: g5/boot/arch/ia64/loader/gefi/Make.rules
===================================================================
--- g5/boot/arch/ia64/loader/gefi/Make.rules (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/Make.rules (nonexistent)
@@ -1,33 +0,0 @@
-#
-# Copyright (C) 1999-2001 Hewlett-Packard Co.
-# Contributed by David Mosberger <davidm@hpl.hp.com>
-# Contributed by Stephane Eranian <eranian@hpl.hp.com>
-#
-# This file is part of the gnu-efi package.
-#
-# GNU-EFI is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# GNU-EFI is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU-EFI; see the file COPYING. If not, write to the Free
-# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-#
-
-%.efi: %.so
- $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
- -j .rela -j .reloc --target=$(FORMAT) $*.so $@
-
-%.so: %.o
- $(LD) $(LDFLAGS) $^ -o $@ $(LOADLIBES)
-
-%.o: %.c
- $(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
Index: g5/boot/arch/ia64/loader/gefi/README.efilib
===================================================================
--- g5/boot/arch/ia64/loader/gefi/README.efilib (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/README.efilib (nonexistent)
@@ -1,30 +0,0 @@
-
-The files in the "lib" and "inc" subdirectories are using the EFI Application
-Toolkit distributed by Intel at http://developer.intel.com/technology/efi
-
-This code is covered by the following agreement:
-
-Copyright (c) 1998-2000 Intel Corporation
-
-Redistribution and use in source and binary forms, with or without modification, are permitted
-provided that the following conditions are met:
-
-Redistributions of source code must retain the above copyright notice, this list of conditions and
-the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-and the following disclaimer in the documentation and/or other materials provided with the
-distribution.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE. THE EFI SPECIFICATION AND ALL OTHER INFORMATION
-ON THIS WEB SITE ARE PROVIDED "AS IS" WITH NO WARRANTIES, AND ARE SUBJECT
-TO CHANGE WITHOUT NOTICE.
Index: g5/boot/arch/ia64/loader/gefi/lib/smbios.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/smbios.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/smbios.c (nonexistent)
@@ -1,126 +0,0 @@
-/*++
-
-Copyright (c) 2000 Intel Corporation
-
-Module Name:
-
- Smbios.c
-
-Abstract:
-
- Lib fucntions for SMBIOS. Used to get system serial number and GUID
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-EFI_STATUS
-LibGetSmbiosSystemGuidAndSerialNumber (
- IN EFI_GUID *SystemGuid,
- OUT CHAR8 **SystemSerialNumber
- )
-{
- EFI_STATUS Status;
- SMBIOS_STRUCTURE_TABLE *SmbiosTable;
- SMBIOS_STRUCTURE_POINTER Smbios;
- SMBIOS_STRUCTURE_POINTER SmbiosEnd;
- UINT16 Index;
-
- Status = LibGetSystemConfigurationTable(&SMBIOSTableGuid, (VOID**)&SmbiosTable);
- if (EFI_ERROR(Status)) {
- return EFI_NOT_FOUND;
- }
-
- Smbios.Hdr = (SMBIOS_HEADER *)SmbiosTable->TableAddress;
- SmbiosEnd.Raw = (UINT8 *)(SmbiosTable->TableAddress + SmbiosTable->TableLength);
- for (Index = 0; Index < SmbiosTable->TableLength ; Index++) {
- if (Smbios.Hdr->Type == 1) {
- if (Smbios.Hdr->Length < 0x19) {
- //
- // Older version did not support Guid and Serial number
- //
- continue;
- }
-
- //
- // SMBIOS tables are byte packed so we need to do a byte copy to
- // prevend alignment faults on IA-64.
-
- CopyMem (SystemGuid, &Smbios.Type1->Uuid, sizeof(EFI_GUID));
- *SystemSerialNumber = LibGetSmbiosString(&Smbios, Smbios.Type1->SerialNumber);
- return EFI_SUCCESS;
- }
-
- //
- // Make Smbios point to the next record
- //
- LibGetSmbiosString (&Smbios, -1);
-
- if (Smbios.Raw >= SmbiosEnd.Raw) {
- //
- // SMBIOS 2.1 incorrectly stated the length of SmbiosTable as 0x1e.
- // given this we must double check against the lenght of
- /// the structure. My home PC has this bug.ruthard
- //
- return EFI_SUCCESS;
- }
- }
-
- return EFI_SUCCESS;
-}
-
-CHAR8*
-LibGetSmbiosString (
- IN SMBIOS_STRUCTURE_POINTER *Smbios,
- IN UINT16 StringNumber
- )
-/*++
-
- Return SMBIOS string given the string number.
-
- Arguments:
- Smbios - Pointer to SMBIOS structure
- StringNumber - String number to return. -1 is used to skip all strings and
- point to the next SMBIOS structure.
-
- Returns:
- Pointer to string, or pointer to next SMBIOS strcuture if StringNumber == -1
---*/
-{
- UINT16 Index;
- CHAR8 *String;
-
- //
- // Skip over formatted section
- //
- String = (CHAR8 *)(Smbios->Raw + Smbios->Hdr->Length);
-
- //
- // Look through unformated section
- //
- for (Index = 1; Index <= StringNumber; Index++) {
- if (StringNumber == Index) {
- return String;
- }
-
- //
- // Skip string
- //
- for (; *String != 0; String++);
- String++;
-
- if (*String == 0) {
- //
- // If double NULL then we are done.
- // Retrun pointer to next structure in Smbios.
- // if you pass in a -1 you will always get here
- //
- Smbios->Raw = (UINT8 *)++String;
- return NULL;
- }
- }
- return NULL;
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/print.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/print.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/print.c (nonexistent)
@@ -1,1301 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- print.c
-
-Abstract:
-
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-#include "efistdarg.h" // !!!
-
-//
-// Declare runtime functions
-//
-
-#ifdef RUNTIME_CODE
-#pragma RUNTIME_CODE(DbgPrint)
-
-// For debugging..
-
-/*
-#pragma RUNTIME_CODE(_Print)
-#pragma RUNTIME_CODE(PFLUSH)
-#pragma RUNTIME_CODE(PSETATTR)
-#pragma RUNTIME_CODE(PPUTC)
-#pragma RUNTIME_CODE(PGETC)
-#pragma RUNTIME_CODE(PITEM)
-#pragma RUNTIME_CODE(ValueToHex)
-#pragma RUNTIME_CODE(ValueToString)
-#pragma RUNTIME_CODE(TimeToString)
-*/
-
-#endif
-
-//
-//
-//
-
-
-#define PRINT_STRING_LEN 200
-#define PRINT_ITEM_BUFFER_LEN 100
-
-typedef struct {
- BOOLEAN Ascii;
- UINTN Index;
- union {
- CHAR16 *pw;
- CHAR8 *pc;
- } un;
-} POINTER;
-
-#define pw un.pw
-#define pc un.pc
-
-typedef struct _pitem {
-
- POINTER Item;
- CHAR16 Scratch[PRINT_ITEM_BUFFER_LEN];
- UINTN Width;
- UINTN FieldWidth;
- UINTN *WidthParse;
- CHAR16 Pad;
- BOOLEAN PadBefore;
- BOOLEAN Comma;
- BOOLEAN Long;
-} PRINT_ITEM;
-
-
-typedef struct _pstate {
- // Input
- POINTER fmt;
- va_list args;
-
- // Output
- CHAR16 *Buffer;
- CHAR16 *End;
- CHAR16 *Pos;
- UINTN Len;
-
- UINTN Attr;
- UINTN RestoreAttr;
-
- UINTN AttrNorm;
- UINTN AttrHighlight;
- UINTN AttrError;
-
- INTN (*Output)(VOID *context, CHAR16 *str);
- INTN (*SetAttr)(VOID *context, UINTN attr);
- VOID *Context;
-
- // Current item being formatted
- struct _pitem *Item;
-} PRINT_STATE;
-
-//
-// Internal fucntions
-//
-
-STATIC
-UINTN
-_Print (
- IN PRINT_STATE *ps
- );
-
-STATIC
-UINTN
-_IPrint (
- IN UINTN Column,
- IN UINTN Row,
- IN SIMPLE_TEXT_OUTPUT_INTERFACE *Out,
- IN CHAR16 *fmt,
- IN CHAR8 *fmta,
- IN va_list args
- );
-
-STATIC
-INTN
-_DbgOut (
- IN VOID *Context,
- IN CHAR16 *Buffer
- );
-
-STATIC
-VOID
-PFLUSH (
- IN OUT PRINT_STATE *ps
- );
-
-STATIC
-VOID
-PPUTC (
- IN OUT PRINT_STATE *ps,
- IN CHAR16 c
- );
-
-STATIC
-VOID
-PITEM (
- IN OUT PRINT_STATE *ps
- );
-
-STATIC
-CHAR16
-PGETC (
- IN POINTER *p
- );
-
-STATIC
-VOID
-PSETATTR (
- IN OUT PRINT_STATE *ps,
- IN UINTN Attr
- );
-
-//
-//
-//
-
-INTN
-DbgPrint (
- IN INTN mask,
- IN CHAR8 *fmt,
- ...
- )
-/*++
-
-Routine Description:
-
- Prints a formatted unicode string to the default StandardError console
-
-Arguments:
-
- mask - Bit mask of debug string. If a bit is set in the
- mask that is also set in EFIDebug the string is
- printed; otherwise, the string is not printed
-
- fmt - Format string
-
-Returns:
-
- Length of string printed to the StandardError console
-
---*/
-{
- SIMPLE_TEXT_OUTPUT_INTERFACE *DbgOut;
- PRINT_STATE ps;
- va_list args;
- UINTN back;
- UINTN attr;
- UINTN SavedAttribute;
-
-
- if (!(EFIDebug & mask)) {
- return 0;
- }
-
- va_start (args, fmt);
- ZeroMem (&ps, sizeof(ps));
-
- ps.Output = _DbgOut;
- ps.fmt.Ascii = TRUE;
- ps.fmt.pc = fmt;
- va_copy(ps.args, args);
- ps.Attr = EFI_TEXT_ATTR(EFI_LIGHTGRAY, EFI_RED);
-
- DbgOut = LibRuntimeDebugOut;
-
- if (!DbgOut) {
- DbgOut = ST->StdErr;
- }
-
- if (DbgOut) {
- ps.Attr = DbgOut->Mode->Attribute;
- ps.Context = DbgOut;
- ps.SetAttr = (INTN (*)(VOID *, UINTN)) DbgOut->SetAttribute;
- }
-
- SavedAttribute = ps.Attr;
-
- back = (ps.Attr >> 4) & 0xf;
- ps.AttrNorm = EFI_TEXT_ATTR(EFI_LIGHTGRAY, back);
- ps.AttrHighlight = EFI_TEXT_ATTR(EFI_WHITE, back);
- ps.AttrError = EFI_TEXT_ATTR(EFI_YELLOW, back);
-
- attr = ps.AttrNorm;
-
- if (mask & D_WARN) {
- attr = ps.AttrHighlight;
- }
-
- if (mask & D_ERROR) {
- attr = ps.AttrError;
- }
-
- if (ps.SetAttr) {
- ps.Attr = attr;
- ps.SetAttr (ps.Context, attr);
- }
-
- _Print (&ps);
-
- va_end (ps.args);
- va_end (args);
-
- //
- // Restore original attributes
- //
-
- if (ps.SetAttr) {
- ps.SetAttr (ps.Context, SavedAttribute);
- }
-
- return 0;
-}
-
-
-
-STATIC
-INTN
-_DbgOut (
- IN VOID *Context,
- IN CHAR16 *Buffer
- )
-// Append string worker for DbgPrint
-{
- SIMPLE_TEXT_OUTPUT_INTERFACE *DbgOut;
-
- DbgOut = Context;
-// if (!DbgOut && ST && ST->ConOut) {
-// DbgOut = ST->ConOut;
-// }
-
- if (DbgOut) {
- DbgOut->OutputString (DbgOut, Buffer);
- }
-
- return 0;
-}
-
-INTN
-_SPrint (
- IN VOID *Context,
- IN CHAR16 *Buffer
- )
-// Append string worker for SPrint, PoolPrint and CatPrint
-{
- UINTN len;
- POOL_PRINT *spc;
-
- spc = Context;
- len = StrLen(Buffer);
-
- //
- // Is the string is over the max truncate it
- //
-
- if (spc->len + len > spc->maxlen) {
- len = spc->maxlen - spc->len;
- }
-
- //
- // Append the new text
- //
-
- CopyMem (spc->str + spc->len, Buffer, len * sizeof(CHAR16));
- spc->len += len;
-
- //
- // Null terminate it
- //
-
- if (spc->len < spc->maxlen) {
- spc->str[spc->len] = 0;
- } else if (spc->maxlen) {
- spc->str[spc->maxlen-1] = 0;
- }
-
- return 0;
-}
-
-
-INTN
-_PoolPrint (
- IN VOID *Context,
- IN CHAR16 *Buffer
- )
-// Append string worker for PoolPrint and CatPrint
-{
- UINTN newlen;
- POOL_PRINT *spc;
-
- spc = Context;
- newlen = spc->len + StrLen(Buffer) + 1;
-
- //
- // Is the string is over the max, grow the buffer
- //
-
- if (newlen > spc->maxlen) {
-
- //
- // Grow the pool buffer
- //
-
- newlen += PRINT_STRING_LEN;
- spc->maxlen = newlen;
- spc->str = ReallocatePool (
- spc->str,
- spc->len * sizeof(CHAR16),
- spc->maxlen * sizeof(CHAR16)
- );
-
- if (!spc->str) {
- spc->len = 0;
- spc->maxlen = 0;
- }
- }
-
- //
- // Append the new text
- //
-
- return _SPrint (Context, Buffer);
-}
-
-
-
-VOID
-_PoolCatPrint (
- IN CHAR16 *fmt,
- IN va_list args,
- IN OUT POOL_PRINT *spc,
- IN INTN (*Output)(VOID *context, CHAR16 *str)
- )
-// Dispath function for SPrint, PoolPrint, and CatPrint
-{
- PRINT_STATE ps;
-
- ZeroMem (&ps, sizeof(ps));
- ps.Output = Output;
- ps.Context = spc;
- ps.fmt.pw = fmt;
- va_copy(ps.args, args);
- _Print (&ps);
- va_end(ps.args);
-}
-
-
-
-UINTN
-SPrint (
- OUT CHAR16 *Str,
- IN UINTN StrSize,
- IN CHAR16 *fmt,
- ...
- )
-/*++
-
-Routine Description:
-
- Prints a formatted unicode string to a buffer
-
-Arguments:
-
- Str - Output buffer to print the formatted string into
-
- StrSize - Size of Str. String is truncated to this size.
- A size of 0 means there is no limit
-
- fmt - The format string
-
-Returns:
-
- String length returned in buffer
-
---*/
-{
- POOL_PRINT spc;
- va_list args;
-
-
- va_start (args, fmt);
- spc.str = Str;
- spc.maxlen = StrSize / sizeof(CHAR16) - 1;
- spc.len = 0;
-
- _PoolCatPrint (fmt, args, &spc, _SPrint);
- va_end (args);
- return spc.len;
-}
-
-
-CHAR16 *
-PoolPrint (
- IN CHAR16 *fmt,
- ...
- )
-/*++
-
-Routine Description:
-
- Prints a formatted unicode string to allocated pool. The caller
- must free the resulting buffer.
-
-Arguments:
-
- fmt - The format string
-
-Returns:
-
- Allocated buffer with the formatted string printed in it.
- The caller must free the allocated buffer. The buffer
- allocation is not packed.
-
---*/
-{
- POOL_PRINT spc;
- va_list args;
-
- ZeroMem (&spc, sizeof(spc));
- va_start (args, fmt);
- _PoolCatPrint (fmt, args, &spc, _PoolPrint);
- va_end (args);
- return spc.str;
-}
-
-
-
-CHAR16 *
-CatPrint (
- IN OUT POOL_PRINT *Str,
- IN CHAR16 *fmt,
- ...
- )
-/*++
-
-Routine Description:
-
- Concatenates a formatted unicode string to allocated pool.
- The caller must free the resulting buffer.
-
-Arguments:
-
- Str - Tracks the allocated pool, size in use, and
- amount of pool allocated.
-
- fmt - The format string
-
-Returns:
-
- Allocated buffer with the formatted string printed in it.
- The caller must free the allocated buffer. The buffer
- allocation is not packed.
-
---*/
-{
- va_list args;
-
- va_start (args, fmt);
- _PoolCatPrint (fmt, args, Str, _PoolPrint);
- va_end (args);
- return Str->str;
-}
-
-
-
-UINTN
-Print (
- IN CHAR16 *fmt,
- ...
- )
-/*++
-
-Routine Description:
-
- Prints a formatted unicode string to the default console
-
-Arguments:
-
- fmt - Format string
-
-Returns:
-
- Length of string printed to the console
-
---*/
-{
- va_list args;
- UINTN back;
-
- va_start (args, fmt);
- back = _IPrint ((UINTN) -1, (UINTN) -1, ST->ConOut, fmt, NULL, args);
- va_end (args);
- return back;
-}
-
-UINTN
-VPrint (
- IN CHAR16 *fmt,
- va_list args
- )
-/*++
-
-Routine Description:
-
- Prints a formatted unicode string to the default console using a va_list
-
-Arguments:
-
- fmt - Format string
- args - va_list
-Returns:
-
- Length of string printed to the console
-
---*/
-{
- return _IPrint ((UINTN) -1, (UINTN) -1, ST->ConOut, fmt, NULL, args);
-}
-
-
-UINTN
-PrintAt (
- IN UINTN Column,
- IN UINTN Row,
- IN CHAR16 *fmt,
- ...
- )
-/*++
-
-Routine Description:
-
- Prints a formatted unicode string to the default console, at
- the supplied cursor position
-
-Arguments:
-
- Column, Row - The cursor position to print the string at
-
- fmt - Format string
-
-Returns:
-
- Length of string printed to the console
-
---*/
-{
- va_list args;
- UINTN back;
-
- va_start (args, fmt);
- back = _IPrint (Column, Row, ST->ConOut, fmt, NULL, args);
- va_end (args);
- return back;
-}
-
-
-UINTN
-IPrint (
- IN SIMPLE_TEXT_OUTPUT_INTERFACE *Out,
- IN CHAR16 *fmt,
- ...
- )
-/*++
-
-Routine Description:
-
- Prints a formatted unicode string to the specified console
-
-Arguments:
-
- Out - The console to print the string too
-
- fmt - Format string
-
-Returns:
-
- Length of string printed to the console
-
---*/
-{
- va_list args;
- UINTN back;
-
- va_start (args, fmt);
- back = _IPrint ((UINTN) -1, (UINTN) -1, Out, fmt, NULL, args);
- va_end (args);
- return back;
-}
-
-
-UINTN
-IPrintAt (
- IN SIMPLE_TEXT_OUTPUT_INTERFACE *Out,
- IN UINTN Column,
- IN UINTN Row,
- IN CHAR16 *fmt,
- ...
- )
-/*++
-
-Routine Description:
-
- Prints a formatted unicode string to the specified console, at
- the supplied cursor position
-
-Arguments:
-
- Out - The console to print the string too
-
- Column, Row - The cursor position to print the string at
-
- fmt - Format string
-
-Returns:
-
- Length of string printed to the console
-
---*/
-{
- va_list args;
- UINTN back;
-
- va_start (args, fmt);
- back = _IPrint (Column, Row, ST->ConOut, fmt, NULL, args);
- va_end (args);
- return back;
-}
-
-
-UINTN
-_IPrint (
- IN UINTN Column,
- IN UINTN Row,
- IN SIMPLE_TEXT_OUTPUT_INTERFACE *Out,
- IN CHAR16 *fmt,
- IN CHAR8 *fmta,
- IN va_list args
- )
-// Display string worker for: Print, PrintAt, IPrint, IPrintAt
-{
- PRINT_STATE ps;
- UINTN back;
-
- ZeroMem (&ps, sizeof(ps));
- ps.Context = Out;
- ps.Output = (INTN (*)(VOID *, CHAR16 *)) Out->OutputString;
- ps.SetAttr = (INTN (*)(VOID *, UINTN)) Out->SetAttribute;
- ps.Attr = Out->Mode->Attribute;
-
- back = (ps.Attr >> 4) & 0xF;
- ps.AttrNorm = EFI_TEXT_ATTR(EFI_LIGHTGRAY, back);
- ps.AttrHighlight = EFI_TEXT_ATTR(EFI_WHITE, back);
- ps.AttrError = EFI_TEXT_ATTR(EFI_YELLOW, back);
-
- if (fmt) {
- ps.fmt.pw = fmt;
- } else {
- ps.fmt.Ascii = TRUE;
- ps.fmt.pc = fmta;
- }
-
- va_copy(ps.args, args);
-
- if (Column != (UINTN) -1) {
- Out->SetCursorPosition(Out, Column, Row);
- }
-
- back = _Print (&ps);
- va_end(ps.args);
- return back;
-}
-
-
-UINTN
-APrint (
- IN CHAR8 *fmt,
- ...
- )
-/*++
-
-Routine Description:
-
- For those whom really can't deal with unicode, a print
- function that takes an ascii format string
-
-Arguments:
-
- fmt - ascii format string
-
-Returns:
-
- Length of string printed to the console
-
---*/
-
-{
- va_list args;
- UINTN back;
-
- va_start (args, fmt);
- back = _IPrint ((UINTN) -1, (UINTN) -1, ST->ConOut, NULL, fmt, args);
- va_end (args);
- return back;
-}
-
-
-STATIC
-VOID
-PFLUSH (
- IN OUT PRINT_STATE *ps
- )
-{
- *ps->Pos = 0;
- ps->Output(ps->Context, ps->Buffer);
- ps->Pos = ps->Buffer;
-}
-
-STATIC
-VOID
-PSETATTR (
- IN OUT PRINT_STATE *ps,
- IN UINTN Attr
- )
-{
- PFLUSH (ps);
-
- ps->RestoreAttr = ps->Attr;
- if (ps->SetAttr) {
- ps->SetAttr (ps->Context, Attr);
- }
-
- ps->Attr = Attr;
-}
-
-STATIC
-VOID
-PPUTC (
- IN OUT PRINT_STATE *ps,
- IN CHAR16 c
- )
-{
- // if this is a newline, add a carraige return
- if (c == '\n') {
- PPUTC (ps, '\r');
- }
-
- *ps->Pos = c;
- ps->Pos += 1;
- ps->Len += 1;
-
- // if at the end of the buffer, flush it
- if (ps->Pos >= ps->End) {
- PFLUSH(ps);
- }
-}
-
-
-STATIC
-CHAR16
-PGETC (
- IN POINTER *p
- )
-{
- CHAR16 c;
-
- c = p->Ascii ? p->pc[p->Index] : p->pw[p->Index];
- p->Index += 1;
-
- return c;
-}
-
-
-STATIC
-VOID
-PITEM (
- IN OUT PRINT_STATE *ps
- )
-{
- UINTN Len, i;
- PRINT_ITEM *Item;
- CHAR16 c;
-
- // Get the length of the item
- Item = ps->Item;
- Item->Item.Index = 0;
- while (Item->Item.Index < Item->FieldWidth) {
- c = PGETC(&Item->Item);
- if (!c) {
- Item->Item.Index -= 1;
- break;
- }
- }
- Len = Item->Item.Index;
-
- // if there is no item field width, use the items width
- if (Item->FieldWidth == (UINTN) -1) {
- Item->FieldWidth = Len;
- }
-
- // if item is larger then width, update width
- if (Len > Item->Width) {
- Item->Width = Len;
- }
-
-
- // if pad field before, add pad char
- if (Item->PadBefore) {
- for (i=Item->Width; i < Item->FieldWidth; i+=1) {
- PPUTC (ps, ' ');
- }
- }
-
- // pad item
- for (i=Len; i < Item->Width; i++) {
- PPUTC (ps, Item->Pad);
- }
-
- // add the item
- Item->Item.Index=0;
- while (Item->Item.Index < Len) {
- PPUTC (ps, PGETC(&Item->Item));
- }
-
- // If pad at the end, add pad char
- if (!Item->PadBefore) {
- for (i=Item->Width; i < Item->FieldWidth; i+=1) {
- PPUTC (ps, ' ');
- }
- }
-}
-
-
-STATIC
-UINTN
-_Print (
- IN PRINT_STATE *ps
- )
-/*++
-
-Routine Description:
-
- %w.lF - w = width
- l = field width
- F = format of arg
-
- Args F:
- 0 - pad with zeros
- - - justify on left (default is on right)
- , - add comma's to field
- * - width provided on stack
- n - Set output attribute to normal (for this field only)
- h - Set output attribute to highlight (for this field only)
- e - Set output attribute to error (for this field only)
- l - Value is 64 bits
-
- a - ascii string
- s - unicode string
- X - fixed 8 byte value in hex
- x - hex value
- d - value as decimal
- c - Unicode char
- t - EFI time structure
- g - Pointer to GUID
- r - EFI status code (result code)
-
- N - Set output attribute to normal
- H - Set output attribute to highlight
- E - Set output attribute to error
- % - Print a %
-
-Arguments:
-
- SystemTable - The system table
-
-Returns:
-
- Number of charactors written
-
---*/
-{
- CHAR16 c;
- UINTN Attr;
- PRINT_ITEM Item;
- CHAR16 Buffer[PRINT_STRING_LEN];
-
- ps->Len = 0;
- ps->Buffer = Buffer;
- ps->Pos = Buffer;
- ps->End = Buffer + PRINT_STRING_LEN - 1;
- ps->Item = &Item;
-
- ps->fmt.Index = 0;
- while ((c = PGETC(&ps->fmt))) {
-
- if (c != '%') {
- PPUTC ( ps, c );
- continue;
- }
-
- // setup for new item
- Item.FieldWidth = (UINTN) -1;
- Item.Width = 0;
- Item.WidthParse = &Item.Width;
- Item.Pad = ' ';
- Item.PadBefore = TRUE;
- Item.Comma = FALSE;
- Item.Long = FALSE;
- Item.Item.Ascii = FALSE;
- Item.Item.pw = NULL;
- ps->RestoreAttr = 0;
- Attr = 0;
-
- while ((c = PGETC(&ps->fmt))) {
-
- switch (c) {
-
- case '%':
- //
- // %% -> %
- //
- Item.Item.pw = Item.Scratch;
- Item.Item.pw[0] = '%';
- Item.Item.pw[1] = 0;
- break;
-
- case '0':
- Item.Pad = '0';
- break;
-
- case '-':
- Item.PadBefore = FALSE;
- break;
-
- case ',':
- Item.Comma = TRUE;
- break;
-
- case '.':
- Item.WidthParse = &Item.FieldWidth;
- break;
-
- case '*':
- *Item.WidthParse = va_arg(ps->args, UINTN);
- break;
-
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- *Item.WidthParse = 0;
- do {
- *Item.WidthParse = *Item.WidthParse * 10 + c - '0';
- c = PGETC(&ps->fmt);
- } while (c >= '0' && c <= '9') ;
- ps->fmt.Index -= 1;
- break;
-
- case 'a':
- Item.Item.pc = va_arg(ps->args, CHAR8 *);
- Item.Item.Ascii = TRUE;
- if (!Item.Item.pc) {
- Item.Item.pc = (CHAR8 *)"(null)";
- }
- break;
-
- case 's':
- Item.Item.pw = va_arg(ps->args, CHAR16 *);
- if (!Item.Item.pw) {
- Item.Item.pw = L"(null)";
- }
- break;
-
- case 'c':
- Item.Item.pw = Item.Scratch;
- Item.Item.pw[0] = (CHAR16) va_arg(ps->args, UINTN);
- Item.Item.pw[1] = 0;
- break;
-
- case 'l':
- Item.Long = TRUE;
- break;
-
- case 'X':
- Item.Width = Item.Long ? 16 : 8;
- Item.Pad = '0';
- case 'x':
- Item.Item.pw = Item.Scratch;
- ValueToHex (
- Item.Item.pw,
- Item.Long ? va_arg(ps->args, UINT64) : va_arg(ps->args, UINTN)
- );
-
- break;
-
-
- case 'g':
- Item.Item.pw = Item.Scratch;
- GuidToString (Item.Item.pw, va_arg(ps->args, EFI_GUID *));
- break;
-
- case 'd':
- Item.Item.pw = Item.Scratch;
- ValueToString (
- Item.Item.pw,
- Item.Comma,
- Item.Long ? va_arg(ps->args, UINT64) : va_arg(ps->args, UINTN)
- );
- break
- ;
- case 't':
- Item.Item.pw = Item.Scratch;
- TimeToString (Item.Item.pw, va_arg(ps->args, EFI_TIME *));
- break;
-
- case 'r':
- Item.Item.pw = Item.Scratch;
- StatusToString (Item.Item.pw, va_arg(ps->args, EFI_STATUS));
- break;
-
- case 'n':
- PSETATTR(ps, ps->AttrNorm);
- break;
-
- case 'h':
- PSETATTR(ps, ps->AttrHighlight);
- break;
-
- case 'e':
- PSETATTR(ps, ps->AttrError);
- break;
-
- case 'N':
- Attr = ps->AttrNorm;
- break;
-
- case 'H':
- Attr = ps->AttrHighlight;
- break;
-
- case 'E':
- Attr = ps->AttrError;
- break;
-
- default:
- Item.Item.pw = Item.Scratch;
- Item.Item.pw[0] = '?';
- Item.Item.pw[1] = 0;
- break;
- }
-
- // if we have an Item
- if (Item.Item.pw) {
- PITEM (ps);
- break;
- }
-
- // if we have an Attr set
- if (Attr) {
- PSETATTR(ps, Attr);
- ps->RestoreAttr = 0;
- break;
- }
- }
-
- if (ps->RestoreAttr) {
- PSETATTR(ps, ps->RestoreAttr);
- }
- }
-
- // Flush buffer
- PFLUSH (ps);
- return ps->Len;
-}
-
-STATIC CHAR8 Hex[] = {'0','1','2','3','4','5','6','7',
- '8','9','A','B','C','D','E','F'};
-
-VOID
-ValueToHex (
- IN CHAR16 *Buffer,
- IN UINT64 v
- )
-{
- CHAR8 str[30], *p1;
- CHAR16 *p2;
-
- if (!v) {
- Buffer[0] = '0';
- Buffer[1] = 0;
- return ;
- }
-
- p1 = str;
- p2 = Buffer;
-
- while (v) {
- *(p1++) = Hex[v & 0xf];
- v = RShiftU64 (v, 4);
- }
-
- while (p1 != str) {
- *(p2++) = *(--p1);
- }
- *p2 = 0;
-}
-
-
-VOID
-ValueToString (
- IN CHAR16 *Buffer,
- IN BOOLEAN Comma,
- IN INT64 v
- )
-{
- STATIC CHAR8 ca[] = { 3, 1, 2 };
- CHAR8 str[40], *p1;
- CHAR16 *p2;
- UINTN c, r;
-
- if (!v) {
- Buffer[0] = '0';
- Buffer[1] = 0;
- return ;
- }
-
- p1 = str;
- p2 = Buffer;
-
- if (v < 0) {
- *(p2++) = '-';
- v = -v;
- }
-
- while (v) {
- v = (INT64)DivU64x32 ((UINT64)v, 10, &r);
- *(p1++) = (CHAR8)r + '0';
- }
-
- c = (Comma ? ca[(p1 - str) % 3] : 999) + 1;
- while (p1 != str) {
-
- c -= 1;
- if (!c) {
- *(p2++) = ',';
- c = 3;
- }
-
- *(p2++) = *(--p1);
- }
- *p2 = 0;
-}
-
-VOID
-TimeToString (
- OUT CHAR16 *Buffer,
- IN EFI_TIME *Time
- )
-{
- UINTN Hour, Year;
- CHAR16 AmPm;
-
- AmPm = 'a';
- Hour = Time->Hour;
- if (Time->Hour == 0) {
- Hour = 12;
- } else if (Time->Hour >= 12) {
- AmPm = 'p';
- if (Time->Hour >= 13) {
- Hour -= 12;
- }
- }
-
- Year = Time->Year % 100;
-
- // bugbug: for now just print it any old way
- SPrint (Buffer, 0, L"%02d/%02d/%02d %02d:%02d%c",
- Time->Month,
- Time->Day,
- Year,
- Hour,
- Time->Minute,
- AmPm
- );
-}
-
-
-
-
-VOID
-DumpHex (
- IN UINTN Indent,
- IN UINTN Offset,
- IN UINTN DataSize,
- IN VOID *UserData
- )
-{
- CHAR8 *Data, Val[50], Str[20], c;
- UINTN Size, Index;
-
- UINTN ScreenCount;
- UINTN TempColumn;
- UINTN ScreenSize;
- CHAR16 ReturnStr[1];
-
-
- ST->ConOut->QueryMode (ST->ConOut, ST->ConOut->Mode->Mode, &TempColumn, &ScreenSize);
- ScreenCount = 0;
- ScreenSize -= 2;
-
- Data = UserData;
- while (DataSize) {
- Size = 16;
- if (Size > DataSize) {
- Size = DataSize;
- }
-
- for (Index=0; Index < Size; Index += 1) {
- c = Data[Index];
- Val[Index*3+0] = Hex[c>>4];
- Val[Index*3+1] = Hex[c&0xF];
- Val[Index*3+2] = (Index == 7)?'-':' ';
- Str[Index] = (c < ' ' || c > 'z') ? '.' : c;
- }
-
- Val[Index*3] = 0;
- Str[Index] = 0;
- Print (L"%*a%X: %-.48a *%a*\n", Indent, "", Offset, Val, Str);
-
- Data += Size;
- Offset += Size;
- DataSize -= Size;
-
- ScreenCount++;
- if (ScreenCount >= ScreenSize && ScreenSize != 0) {
- //
- // If ScreenSize == 0 we have the console redirected so don't
- // block updates
- //
- ScreenCount = 0;
- Print (L"Press Enter to continue :");
- Input (L"", ReturnStr, sizeof(ReturnStr)/sizeof(CHAR16));
- Print (L"\n");
- }
-
- }
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/Makefile
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/Makefile (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/Makefile (nonexistent)
@@ -1,47 +0,0 @@
-#
-# Copyright (C) 1999-2001 Hewlett-Packard Co.
-# Contributed by David Mosberger <davidm@hpl.hp.com>
-# Contributed by Stephane Eranian <eranian@hpl.hp.com>
-#
-# This file is part of the gnu-efi package.
-#
-# GNU-EFI is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# GNU-EFI is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU-EFI; see the file COPYING. If not, write to the Free
-# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-#
-
-include ../Make.defaults
-CDIR = $(TOPDIR)/..
-FILES = boxdraw smbios console crc data debug dpath \
- error event guid hand hw init lock \
- misc print sread str \
- runtime/rtlock runtime/efirtlib runtime/rtstr runtime/vm runtime/rtdata \
- $(ARCH)/initplat $(ARCH)/math
-
-ifeq ($(ARCH),ia64)
-FILES += $(ARCH)/salpal $(ARCH)/palproc
-endif
-
-OBJS = $(FILES:%=%.o)
-
-libefi.a: libefi.a($(OBJS))
-
-clean:
- rm -f libefi.a *~ $(OBJS) */*.o
-
-install: libefi.a
- mkdir -p $(INSTALLROOT)/lib
- $(INSTALL) -m 644 libefi.a $(INSTALLROOT)/lib/
-
-include ../Make.rules
Index: g5/boot/arch/ia64/loader/gefi/lib/sread.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/sread.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/sread.c (nonexistent)
@@ -1,352 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- sread.c
-
-Abstract:
-
- Simple read file access
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-#define SIMPLE_READ_SIGNATURE EFI_SIGNATURE_32('s','r','d','r')
-typedef struct _SIMPLE_READ_FILE {
- UINTN Signature;
- BOOLEAN FreeBuffer;
- VOID *Source;
- UINTN SourceSize;
- EFI_FILE_HANDLE FileHandle;
-} SIMPLE_READ_HANDLE;
-
-
-
-EFI_STATUS
-OpenSimpleReadFile (
- IN BOOLEAN BootPolicy,
- IN VOID *SourceBuffer OPTIONAL,
- IN UINTN SourceSize,
- IN OUT EFI_DEVICE_PATH **FilePath,
- OUT EFI_HANDLE *DeviceHandle,
- OUT SIMPLE_READ_FILE *SimpleReadHandle
- )
-/*++
-
-Routine Description:
-
- Opens a file for (simple) reading. The simple read abstraction
- will access the file either from a memory copy, from a file
- system interface, or from the load file interface.
-
-Arguments:
-
-Returns:
-
- A handle to access the file
-
---*/
-{
- SIMPLE_READ_HANDLE *FHand;
- EFI_DEVICE_PATH *UserFilePath;
- EFI_DEVICE_PATH *TempFilePath;
- EFI_DEVICE_PATH *TempFilePathPtr;
- FILEPATH_DEVICE_PATH *FilePathNode;
- EFI_FILE_HANDLE FileHandle, LastHandle;
- EFI_STATUS Status;
- EFI_LOAD_FILE_INTERFACE *LoadFile;
-
- FHand = NULL;
- UserFilePath = *FilePath;
-
- //
- // Allocate a new simple read handle structure
- //
-
- FHand = AllocateZeroPool (sizeof(SIMPLE_READ_HANDLE));
- if (!FHand) {
- Status = EFI_OUT_OF_RESOURCES;
- goto Done;
- }
-
- *SimpleReadHandle = (SIMPLE_READ_FILE) FHand;
- FHand->Signature = SIMPLE_READ_SIGNATURE;
-
- //
- // If the caller passed a copy of the file, then just use it
- //
-
- if (SourceBuffer) {
- FHand->Source = SourceBuffer;
- FHand->SourceSize = SourceSize;
- *DeviceHandle = NULL;
- Status = EFI_SUCCESS;
- goto Done;
- }
-
- //
- // Attempt to access the file via a file system interface
- //
-
- FileHandle = NULL;
- Status = BS->LocateDevicePath (&FileSystemProtocol, FilePath, DeviceHandle);
- if (!EFI_ERROR(Status)) {
- FileHandle = LibOpenRoot (*DeviceHandle);
- }
-
- Status = FileHandle ? EFI_SUCCESS : EFI_UNSUPPORTED;
-
- //
- // To access as a filesystem, the filepath should only
- // contain filepath components. Follow the filepath nodes
- // and find the target file
- //
-
- FilePathNode = (FILEPATH_DEVICE_PATH *) *FilePath;
- while (!IsDevicePathEnd(&FilePathNode->Header)) {
-
- //
- // For filesystem access each node should be a filepath component
- //
-
- if (DevicePathType(&FilePathNode->Header) != MEDIA_DEVICE_PATH ||
- DevicePathSubType(&FilePathNode->Header) != MEDIA_FILEPATH_DP) {
- Status = EFI_UNSUPPORTED;
- }
-
- //
- // If there's been an error, stop
- //
-
- if (EFI_ERROR(Status)) {
- break;
- }
-
- //
- // Open this file path node
- //
-
- LastHandle = FileHandle;
- FileHandle = NULL;
-
- Status = LastHandle->Open (
- LastHandle,
- &FileHandle,
- FilePathNode->PathName,
- EFI_FILE_MODE_READ,
- 0
- );
-
- //
- // Close the last node
- //
-
- LastHandle->Close (LastHandle);
-
- //
- // Get the next node
- //
-
- FilePathNode = (FILEPATH_DEVICE_PATH *) NextDevicePathNode(&FilePathNode->Header);
- }
-
- //
- // If success, return the FHand
- //
-
- if (!EFI_ERROR(Status)) {
- ASSERT(FileHandle);
- FHand->FileHandle = FileHandle;
- goto Done;
- }
-
- //
- // Cleanup from filesystem access
- //
-
- if (FileHandle) {
- FileHandle->Close (FileHandle);
- FileHandle = NULL;
- *FilePath = UserFilePath;
- }
-
- //
- // If the error is something other then unsupported, return it
- //
-
- if (Status != EFI_UNSUPPORTED) {
- goto Done;
- }
-
- //
- // Attempt to access the file via the load file protocol
- //
-
- Status = LibDevicePathToInterface (&LoadFileProtocol, *FilePath, (VOID*)&LoadFile);
- if (!EFI_ERROR(Status)) {
-
- TempFilePath = DuplicateDevicePath (*FilePath);
-
- TempFilePathPtr = TempFilePath;
-
- Status = BS->LocateDevicePath (&LoadFileProtocol, &TempFilePath, DeviceHandle);
-
- FreePool (TempFilePathPtr);
-
- //
- // Determine the size of buffer needed to hold the file
- //
-
- SourceSize = 0;
- Status = LoadFile->LoadFile (
- LoadFile,
- *FilePath,
- BootPolicy,
- &SourceSize,
- NULL
- );
-
- //
- // We expect a buffer too small error to inform us
- // of the buffer size needed
- //
-
- if (Status == EFI_BUFFER_TOO_SMALL) {
- SourceBuffer = AllocatePool (SourceSize);
-
- if (SourceBuffer) {
- FHand->FreeBuffer = TRUE;
- FHand->Source = SourceBuffer;
- FHand->SourceSize = SourceSize;
-
- Status = LoadFile->LoadFile (
- LoadFile,
- *FilePath,
- BootPolicy,
- &SourceSize,
- SourceBuffer
- );
- }
- }
-
- //
- // If success, return FHand
- //
-
- if (!EFI_ERROR(Status) || Status == EFI_ALREADY_STARTED) {
- goto Done;
- }
- }
-
- //
- // Nothing else to try
- //
-
- DEBUG ((D_LOAD|D_WARN, "OpenSimpleReadFile: Device did not support a known load protocol\n"));
- Status = EFI_UNSUPPORTED;
-
-Done:
-
- //
- // If the file was not accessed, clean up
- //
- if (EFI_ERROR(Status) && (Status != EFI_ALREADY_STARTED)) {
- if (FHand) {
- if (FHand->FreeBuffer) {
- FreePool (FHand->Source);
- }
-
- FreePool (FHand);
- }
- }
-
- return Status;
-}
-
-EFI_STATUS
-ReadSimpleReadFile (
- IN SIMPLE_READ_FILE UserHandle,
- IN UINTN Offset,
- IN OUT UINTN *ReadSize,
- OUT VOID *Buffer
- )
-{
- UINTN EndPos;
- SIMPLE_READ_HANDLE *FHand;
- EFI_STATUS Status;
-
- FHand = UserHandle;
- ASSERT (FHand->Signature == SIMPLE_READ_SIGNATURE);
- if (FHand->Source) {
-
- //
- // Move data from our local copy of the file
- //
-
- EndPos = Offset + *ReadSize;
- if (EndPos > FHand->SourceSize) {
- *ReadSize = FHand->SourceSize - Offset;
- if (Offset >= FHand->SourceSize) {
- *ReadSize = 0;
- }
- }
-
- CopyMem (Buffer, (CHAR8 *) FHand->Source + Offset, *ReadSize);
- Status = EFI_SUCCESS;
-
- } else {
-
- //
- // Read data from the file
- //
-
- Status = FHand->FileHandle->SetPosition (FHand->FileHandle, Offset);
-
- if (!EFI_ERROR(Status)) {
- Status = FHand->FileHandle->Read (FHand->FileHandle, ReadSize, Buffer);
- }
- }
-
- return Status;
-}
-
-
-VOID
-CloseSimpleReadFile (
- IN SIMPLE_READ_FILE UserHandle
- )
-{
- SIMPLE_READ_HANDLE *FHand;
-
- FHand = UserHandle;
- ASSERT (FHand->Signature == SIMPLE_READ_SIGNATURE);
-
- //
- // Free any file handle we opened
- //
-
- if (FHand->FileHandle) {
- FHand->FileHandle->Close (FHand->FileHandle);
- }
-
- //
- // If we allocated the Source buffer, free it
- //
-
- if (FHand->FreeBuffer) {
- FreePool (FHand->Source);
- }
-
- //
- // Done with this simple read file handle
- //
-
- FreePool (FHand);
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/dpath.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/dpath.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/dpath.c (nonexistent)
@@ -1,1035 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- dpath.c
-
-Abstract:
- MBR & Device Path functions
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-#define ALIGN_SIZE(a) ((a % MIN_ALIGNMENT_SIZE) ? MIN_ALIGNMENT_SIZE - (a % MIN_ALIGNMENT_SIZE) : 0)
-
-
-
-EFI_DEVICE_PATH *
-DevicePathFromHandle (
- IN EFI_HANDLE Handle
- )
-{
- EFI_STATUS Status;
- EFI_DEVICE_PATH *DevicePath;
-
- Status = BS->HandleProtocol (Handle, &DevicePathProtocol, (VOID*)&DevicePath);
- if (EFI_ERROR(Status)) {
- DevicePath = NULL;
- }
-
- return DevicePath;
-}
-
-
-EFI_DEVICE_PATH *
-DevicePathInstance (
- IN OUT EFI_DEVICE_PATH **DevicePath,
- OUT UINTN *Size
- )
-{
- EFI_DEVICE_PATH *Start, *Next, *DevPath;
- UINTN Count;
-
- DevPath = *DevicePath;
- Start = DevPath;
-
- if (!DevPath) {
- return NULL;
- }
-
- //
- // Check for end of device path type
- //
-
- for (Count = 0; ; Count++) {
- Next = NextDevicePathNode(DevPath);
-
- if (IsDevicePathEndType(DevPath)) {
- break;
- }
-
- if (Count > 01000) {
- //
- // BugBug: Debug code to catch bogus device paths
- //
- DEBUG((D_ERROR, "DevicePathInstance: DevicePath %x Size %d", *DevicePath, ((UINT8 *) DevPath) - ((UINT8 *) Start) ));
- DumpHex (0, 0, ((UINT8 *) DevPath) - ((UINT8 *) Start), Start);
- break;
- }
-
- DevPath = Next;
- }
-
- ASSERT (DevicePathSubType(DevPath) == END_ENTIRE_DEVICE_PATH_SUBTYPE ||
- DevicePathSubType(DevPath) == END_INSTANCE_DEVICE_PATH_SUBTYPE);
-
- //
- // Set next position
- //
-
- if (DevicePathSubType(DevPath) == END_ENTIRE_DEVICE_PATH_SUBTYPE) {
- Next = NULL;
- }
-
- *DevicePath = Next;
-
- //
- // Return size and start of device path instance
- //
-
- *Size = ((UINT8 *) DevPath) - ((UINT8 *) Start);
- return Start;
-}
-
-UINTN
-DevicePathInstanceCount (
- IN EFI_DEVICE_PATH *DevicePath
- )
-{
- UINTN Count, Size;
-
- Count = 0;
- while (DevicePathInstance(&DevicePath, &Size)) {
- Count += 1;
- }
-
- return Count;
-}
-
-
-EFI_DEVICE_PATH *
-AppendDevicePath (
- IN EFI_DEVICE_PATH *Src1,
- IN EFI_DEVICE_PATH *Src2
- )
-// Src1 may have multiple "instances" and each instance is appended
-// Src2 is appended to each instance is Src1. (E.g., it's possible
-// to append a new instance to the complete device path by passing
-// it in Src2)
-{
- UINTN Src1Size, Src1Inst, Src2Size, Size;
- EFI_DEVICE_PATH *Dst, *Inst;
- UINT8 *DstPos;
-
- //
- // If there's only 1 path, just duplicate it
- //
-
- if (!Src1) {
- ASSERT (!IsDevicePathUnpacked (Src2));
- return DuplicateDevicePath (Src2);
- }
-
- if (!Src2) {
- ASSERT (!IsDevicePathUnpacked (Src1));
- return DuplicateDevicePath (Src1);
- }
-
- //
- // Verify we're not working with unpacked paths
- //
-
-// ASSERT (!IsDevicePathUnpacked (Src1));
-// ASSERT (!IsDevicePathUnpacked (Src2));
-
- //
- // Append Src2 to every instance in Src1
- //
-
- Src1Size = DevicePathSize(Src1);
- Src1Inst = DevicePathInstanceCount(Src1);
- Src2Size = DevicePathSize(Src2);
- Size = Src1Size * Src1Inst + Src2Size;
-
- Dst = AllocatePool (Size);
- if (Dst) {
- DstPos = (UINT8 *) Dst;
-
- //
- // Copy all device path instances
- //
-
- while ((Inst = DevicePathInstance (&Src1, &Size))) {
-
- CopyMem(DstPos, Inst, Size);
- DstPos += Size;
-
- CopyMem(DstPos, Src2, Src2Size);
- DstPos += Src2Size;
-
- CopyMem(DstPos, EndInstanceDevicePath, sizeof(EFI_DEVICE_PATH));
- DstPos += sizeof(EFI_DEVICE_PATH);
- }
-
- // Change last end marker
- DstPos -= sizeof(EFI_DEVICE_PATH);
- CopyMem(DstPos, EndDevicePath, sizeof(EFI_DEVICE_PATH));
- }
-
- return Dst;
-}
-
-
-EFI_DEVICE_PATH *
-AppendDevicePathNode (
- IN EFI_DEVICE_PATH *Src1,
- IN EFI_DEVICE_PATH *Src2
- )
-// Src1 may have multiple "instances" and each instance is appended
-// Src2 is a signal device path node (without a terminator) that is
-// appended to each instance is Src1.
-{
- EFI_DEVICE_PATH *Temp, *Eop;
- UINTN Length;
-
- //
- // Build a Src2 that has a terminator on it
- //
-
- Length = DevicePathNodeLength(Src2);
- Temp = AllocatePool (Length + sizeof(EFI_DEVICE_PATH));
- if (!Temp) {
- return NULL;
- }
-
- CopyMem (Temp, Src2, Length);
- Eop = NextDevicePathNode(Temp);
- SetDevicePathEndNode(Eop);
-
- //
- // Append device paths
- //
-
- Src1 = AppendDevicePath (Src1, Temp);
- FreePool (Temp);
- return Src1;
-}
-
-
-EFI_DEVICE_PATH *
-FileDevicePath (
- IN EFI_HANDLE Device OPTIONAL,
- IN CHAR16 *FileName
- )
-/*++
-
- N.B. Results are allocated from pool. The caller must FreePool
- the resulting device path structure
-
---*/
-{
- UINTN Size;
- FILEPATH_DEVICE_PATH *FilePath;
- EFI_DEVICE_PATH *Eop, *DevicePath;
-
- Size = StrSize(FileName);
- FilePath = AllocateZeroPool (Size + SIZE_OF_FILEPATH_DEVICE_PATH + sizeof(EFI_DEVICE_PATH));
- DevicePath = NULL;
-
- if (FilePath) {
-
- //
- // Build a file path
- //
-
- FilePath->Header.Type = MEDIA_DEVICE_PATH;
- FilePath->Header.SubType = MEDIA_FILEPATH_DP;
- SetDevicePathNodeLength (&FilePath->Header, Size + SIZE_OF_FILEPATH_DEVICE_PATH);
- CopyMem (FilePath->PathName, FileName, Size);
- Eop = NextDevicePathNode(&FilePath->Header);
- SetDevicePathEndNode(Eop);
-
- //
- // Append file path to device's device path
- //
-
- DevicePath = (EFI_DEVICE_PATH *) FilePath;
- if (Device) {
- DevicePath = AppendDevicePath (
- DevicePathFromHandle(Device),
- DevicePath
- );
-
- FreePool(FilePath);
- }
- }
-
- return DevicePath;
-}
-
-
-
-UINTN
-DevicePathSize (
- IN EFI_DEVICE_PATH *DevPath
- )
-{
- EFI_DEVICE_PATH *Start;
-
- //
- // Search for the end of the device path structure
- //
-
- Start = DevPath;
- while (!IsDevicePathEnd(DevPath)) {
- DevPath = NextDevicePathNode(DevPath);
- }
-
- //
- // Compute the size
- //
-
- return ((UINTN) DevPath - (UINTN) Start) + sizeof(EFI_DEVICE_PATH);
-}
-
-EFI_DEVICE_PATH *
-DuplicateDevicePath (
- IN EFI_DEVICE_PATH *DevPath
- )
-{
- EFI_DEVICE_PATH *NewDevPath;
- UINTN Size;
-
-
- //
- // Compute the size
- //
-
- Size = DevicePathSize (DevPath);
-
- //
- // Make a copy
- //
-
- NewDevPath = AllocatePool (Size);
- if (NewDevPath) {
- CopyMem (NewDevPath, DevPath, Size);
- }
-
- return NewDevPath;
-}
-
-EFI_DEVICE_PATH *
-UnpackDevicePath (
- IN EFI_DEVICE_PATH *DevPath
- )
-{
- EFI_DEVICE_PATH *Src, *Dest, *NewPath;
- UINTN Size;
-
- //
- // Walk device path and round sizes to valid boundries
- //
-
- Src = DevPath;
- Size = 0;
- for (; ;) {
- Size += DevicePathNodeLength(Src);
- Size += ALIGN_SIZE(Size);
-
- if (IsDevicePathEnd(Src)) {
- break;
- }
-
- Src = NextDevicePathNode(Src);
- }
-
-
- //
- // Allocate space for the unpacked path
- //
-
- NewPath = AllocateZeroPool (Size);
- if (NewPath) {
-
- ASSERT (((UINTN)NewPath) % MIN_ALIGNMENT_SIZE == 0);
-
- //
- // Copy each node
- //
-
- Src = DevPath;
- Dest = NewPath;
- for (; ;) {
- Size = DevicePathNodeLength(Src);
- CopyMem (Dest, Src, Size);
- Size += ALIGN_SIZE(Size);
- SetDevicePathNodeLength (Dest, Size);
- Dest->Type |= EFI_DP_TYPE_UNPACKED;
- Dest = (EFI_DEVICE_PATH *) (((UINT8 *) Dest) + Size);
-
- if (IsDevicePathEnd(Src)) {
- break;
- }
-
- Src = NextDevicePathNode(Src);
- }
- }
-
- return NewPath;
-}
-
-
-EFI_DEVICE_PATH*
-AppendDevicePathInstance (
- IN EFI_DEVICE_PATH *Src,
- IN EFI_DEVICE_PATH *Instance
- )
-{
- UINT8 *Ptr;
- EFI_DEVICE_PATH *DevPath;
- UINTN SrcSize;
- UINTN InstanceSize;
-
- if (Src == NULL) {
- return DuplicateDevicePath (Instance);
- }
- SrcSize = DevicePathSize(Src);
- InstanceSize = DevicePathSize(Instance);
- Ptr = AllocatePool (SrcSize + InstanceSize);
- DevPath = (EFI_DEVICE_PATH *)Ptr;
- ASSERT(DevPath);
-
- CopyMem (Ptr, Src, SrcSize);
-// FreePool (Src);
-
- while (!IsDevicePathEnd(DevPath)) {
- DevPath = NextDevicePathNode(DevPath);
- }
- //
- // Convert the End to an End Instance, since we are
- // appending another instacne after this one its a good
- // idea.
- //
- DevPath->SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE;
-
- DevPath = NextDevicePathNode(DevPath);
- CopyMem (DevPath, Instance, InstanceSize);
- return (EFI_DEVICE_PATH *)Ptr;
-}
-
-EFI_STATUS
-LibDevicePathToInterface (
- IN EFI_GUID *Protocol,
- IN EFI_DEVICE_PATH *FilePath,
- OUT VOID **Interface
- )
-{
- EFI_STATUS Status;
- EFI_HANDLE Device;
-
- Status = BS->LocateDevicePath (Protocol, &FilePath, &Device);
-
- if (!EFI_ERROR(Status)) {
-
- // If we didn't get a direct match return not found
- Status = EFI_NOT_FOUND;
-
- if (IsDevicePathEnd(FilePath)) {
-
- //
- // It was a direct match, lookup the protocol interface
- //
-
- Status = BS->HandleProtocol (Device, Protocol, Interface);
- }
- }
-
- //
- // If there was an error, do not return an interface
- //
-
- if (EFI_ERROR(Status)) {
- *Interface = NULL;
- }
-
- return Status;
-}
-
-VOID
-_DevPathPci (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- PCI_DEVICE_PATH *Pci;
-
- Pci = DevPath;
- CatPrint(Str, L"Pci(%x|%x)", Pci->Device, Pci->Function);
-}
-
-VOID
-_DevPathPccard (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- PCCARD_DEVICE_PATH *Pccard;
-
- Pccard = DevPath;
- CatPrint(Str, L"Pccard(Socket%x)", Pccard->SocketNumber);
-}
-
-VOID
-_DevPathMemMap (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- MEMMAP_DEVICE_PATH *MemMap;
-
- MemMap = DevPath;
- CatPrint(Str, L"MemMap(%d:%x-%x)",
- MemMap->MemoryType,
- MemMap->StartingAddress,
- MemMap->EndingAddress
- );
-}
-
-VOID
-_DevPathController (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- CONTROLLER_DEVICE_PATH *Controller;
-
- Controller = DevPath;
- CatPrint(Str, L"Ctrl(%d)",
- Controller->Controller
- );
-}
-
-VOID
-_DevPathVendor (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- VENDOR_DEVICE_PATH *Vendor;
- CHAR16 *Type;
- UNKNOWN_DEVICE_VENDOR_DEVICE_PATH *UnknownDevPath;
-
- Vendor = DevPath;
- switch (DevicePathType(&Vendor->Header)) {
- case HARDWARE_DEVICE_PATH: Type = L"Hw"; break;
- case MESSAGING_DEVICE_PATH: Type = L"Msg"; break;
- case MEDIA_DEVICE_PATH: Type = L"Media"; break;
- default: Type = L"?"; break;
- }
-
- CatPrint(Str, L"Ven%s(%g", Type, &Vendor->Guid);
- if (CompareGuid (&Vendor->Guid, &UnknownDevice) == 0) {
- //
- // GUID used by EFI to enumerate an EDD 1.1 device
- //
- UnknownDevPath = (UNKNOWN_DEVICE_VENDOR_DEVICE_PATH *)Vendor;
- CatPrint(Str, L":%02x)", UnknownDevPath->LegacyDriveLetter);
- } else {
- CatPrint(Str, L")");
- }
-}
-
-
-VOID
-_DevPathAcpi (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- ACPI_HID_DEVICE_PATH *Acpi;
-
- Acpi = DevPath;
- if ((Acpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {
- CatPrint(Str, L"Acpi(PNP%04x,%x)", EISA_ID_TO_NUM (Acpi->HID), Acpi->UID);
- } else {
- CatPrint(Str, L"Acpi(%08x,%x)", Acpi->HID, Acpi->UID);
- }
-}
-
-
-VOID
-_DevPathAtapi (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- ATAPI_DEVICE_PATH *Atapi;
-
- Atapi = DevPath;
- CatPrint(Str, L"Ata(%s,%s)",
- Atapi->PrimarySecondary ? L"Secondary" : L"Primary",
- Atapi->SlaveMaster ? L"Slave" : L"Master"
- );
-}
-
-VOID
-_DevPathScsi (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- SCSI_DEVICE_PATH *Scsi;
-
- Scsi = DevPath;
- CatPrint(Str, L"Scsi(Pun%x,Lun%x)", Scsi->Pun, Scsi->Lun);
-}
-
-
-VOID
-_DevPathFibre (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- FIBRECHANNEL_DEVICE_PATH *Fibre;
-
- Fibre = DevPath;
- CatPrint(Str, L"Fibre(%lx)", Fibre->WWN);
-}
-
-VOID
-_DevPath1394 (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- F1394_DEVICE_PATH *F1394;
-
- F1394 = DevPath;
- CatPrint(Str, L"1394(%g)", &F1394->Guid);
-}
-
-
-
-VOID
-_DevPathUsb (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- USB_DEVICE_PATH *Usb;
-
- Usb = DevPath;
- CatPrint(Str, L"Usb(%x)", Usb->Port);
-}
-
-
-VOID
-_DevPathI2O (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- I2O_DEVICE_PATH *I2O;
-
- I2O = DevPath;
- CatPrint(Str, L"I2O(%x)", I2O->Tid);
-}
-
-VOID
-_DevPathMacAddr (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- MAC_ADDR_DEVICE_PATH *MAC;
- UINTN HwAddressSize;
- UINTN Index;
-
- MAC = DevPath;
-
- HwAddressSize = sizeof(EFI_MAC_ADDRESS);
- if (MAC->IfType == 0x01 || MAC->IfType == 0x00) {
- HwAddressSize = 6;
- }
-
- CatPrint(Str, L"Mac(");
-
- for(Index = 0; Index < HwAddressSize; Index++) {
- CatPrint(Str, L"%02x",MAC->MacAddress.Addr[Index]);
- }
- CatPrint(Str, L")");
-}
-
-VOID
-_DevPathIPv4 (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- IPv4_DEVICE_PATH *IP;
-
- IP = DevPath;
- CatPrint(Str, L"IPv4(not-done)");
-}
-
-VOID
-_DevPathIPv6 (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- IPv6_DEVICE_PATH *IP;
-
- IP = DevPath;
- CatPrint(Str, L"IP-v6(not-done)");
-}
-
-VOID
-_DevPathInfiniBand (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- INFINIBAND_DEVICE_PATH *InfiniBand;
-
- InfiniBand = DevPath;
- CatPrint(Str, L"InfiniBand(not-done)");
-}
-
-VOID
-_DevPathUart (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- UART_DEVICE_PATH *Uart;
- CHAR8 Parity;
-
- Uart = DevPath;
- switch (Uart->Parity) {
- case 0 : Parity = 'D'; break;
- case 1 : Parity = 'N'; break;
- case 2 : Parity = 'E'; break;
- case 3 : Parity = 'O'; break;
- case 4 : Parity = 'M'; break;
- case 5 : Parity = 'S'; break;
- default : Parity = 'x'; break;
- }
-
- if (Uart->BaudRate == 0) {
- CatPrint(Str, L"Uart(DEFAULT %c",Uart->BaudRate,Parity);
- } else {
- CatPrint(Str, L"Uart(%d %c",Uart->BaudRate,Parity);
- }
-
- if (Uart->DataBits == 0) {
- CatPrint(Str, L"D");
- } else {
- CatPrint(Str, L"%d",Uart->DataBits);
- }
-
- switch (Uart->StopBits) {
- case 0 : CatPrint(Str, L"D)"); break;
- case 1 : CatPrint(Str, L"1)"); break;
- case 2 : CatPrint(Str, L"1.5)"); break;
- case 3 : CatPrint(Str, L"2)"); break;
- default : CatPrint(Str, L"x)"); break;
- }
-}
-
-
-VOID
-_DevPathHardDrive (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- HARDDRIVE_DEVICE_PATH *Hd;
-
- Hd = DevPath;
- switch (Hd->SignatureType) {
- case SIGNATURE_TYPE_MBR:
- CatPrint(Str, L"HD(Part%d,Sig%08X)",
- Hd->PartitionNumber,
- *((UINT32 *)(&(Hd->Signature[0])))
- );
- break;
- case SIGNATURE_TYPE_GUID:
- CatPrint(Str, L"HD(Part%d,Sig%g)",
- Hd->PartitionNumber,
- (EFI_GUID *) &(Hd->Signature[0])
- );
- break;
- default:
- CatPrint(Str, L"HD(Part%d,MBRType=%02x,SigType=%02x)",
- Hd->PartitionNumber,
- Hd->MBRType,
- Hd->SignatureType
- );
- break;
- }
-}
-
-VOID
-_DevPathCDROM (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- CDROM_DEVICE_PATH *Cd;
-
- Cd = DevPath;
- CatPrint(Str, L"CDROM(Entry%x)", Cd->BootEntry);
-}
-
-VOID
-_DevPathFilePath (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- FILEPATH_DEVICE_PATH *Fp;
-
- Fp = DevPath;
- CatPrint(Str, L"%s", Fp->PathName);
-}
-
-VOID
-_DevPathMediaProtocol (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- MEDIA_PROTOCOL_DEVICE_PATH *MediaProt;
-
- MediaProt = DevPath;
- CatPrint(Str, L"%g", &MediaProt->Protocol);
-}
-
-VOID
-_DevPathBssBss (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- BBS_BBS_DEVICE_PATH *Bss;
- CHAR16 *Type;
-
- Bss = DevPath;
- switch (Bss->DeviceType) {
- case BBS_TYPE_FLOPPY: Type = L"Floppy"; break;
- case BBS_TYPE_HARDDRIVE: Type = L"Harddrive"; break;
- case BBS_TYPE_CDROM: Type = L"CDROM"; break;
- case BBS_TYPE_PCMCIA: Type = L"PCMCIA"; break;
- case BBS_TYPE_USB: Type = L"Usb"; break;
- case BBS_TYPE_EMBEDDED_NETWORK: Type = L"Net"; break;
- default: Type = L"?"; break;
- }
-
- CatPrint(Str, L"Bss-%s(%a)", Type, Bss->String);
-}
-
-
-VOID
-_DevPathEndInstance (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- CatPrint(Str, L",");
-}
-
-VOID
-_DevPathNodeUnknown (
- IN OUT POOL_PRINT *Str,
- IN VOID *DevPath
- )
-{
- CatPrint(Str, L"?");
-}
-
-
-struct {
- UINT8 Type;
- UINT8 SubType;
- VOID (*Function)(POOL_PRINT *, VOID *);
-} DevPathTable[] = {
- { HARDWARE_DEVICE_PATH, HW_PCI_DP, _DevPathPci},
- { HARDWARE_DEVICE_PATH, HW_PCCARD_DP, _DevPathPccard},
- { HARDWARE_DEVICE_PATH, HW_MEMMAP_DP, _DevPathMemMap},
- { HARDWARE_DEVICE_PATH, HW_VENDOR_DP, _DevPathVendor},
- { HARDWARE_DEVICE_PATH, HW_CONTROLLER_DP, _DevPathController},
- { ACPI_DEVICE_PATH, ACPI_DP, _DevPathAcpi},
- { MESSAGING_DEVICE_PATH, MSG_ATAPI_DP, _DevPathAtapi},
- { MESSAGING_DEVICE_PATH, MSG_SCSI_DP, _DevPathScsi},
- { MESSAGING_DEVICE_PATH, MSG_FIBRECHANNEL_DP, _DevPathFibre},
- { MESSAGING_DEVICE_PATH, MSG_1394_DP, _DevPath1394},
- { MESSAGING_DEVICE_PATH, MSG_USB_DP, _DevPathUsb},
- { MESSAGING_DEVICE_PATH, MSG_I2O_DP, _DevPathI2O},
- { MESSAGING_DEVICE_PATH, MSG_MAC_ADDR_DP, _DevPathMacAddr},
- { MESSAGING_DEVICE_PATH, MSG_IPv4_DP, _DevPathIPv4},
- { MESSAGING_DEVICE_PATH, MSG_IPv6_DP, _DevPathIPv6},
- { MESSAGING_DEVICE_PATH, MSG_INFINIBAND_DP, _DevPathInfiniBand},
- { MESSAGING_DEVICE_PATH, MSG_UART_DP, _DevPathUart},
- { MESSAGING_DEVICE_PATH, MSG_VENDOR_DP, _DevPathVendor},
- { MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP, _DevPathHardDrive},
- { MEDIA_DEVICE_PATH, MEDIA_CDROM_DP, _DevPathCDROM},
- { MEDIA_DEVICE_PATH, MEDIA_VENDOR_DP, _DevPathVendor},
- { MEDIA_DEVICE_PATH, MEDIA_FILEPATH_DP, _DevPathFilePath},
- { MEDIA_DEVICE_PATH, MEDIA_PROTOCOL_DP, _DevPathMediaProtocol},
- { BBS_DEVICE_PATH, BBS_BBS_DP, _DevPathBssBss},
- { END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, _DevPathEndInstance},
- { 0, 0, NULL}
-};
-
-
-CHAR16 *
-DevicePathToStr (
- EFI_DEVICE_PATH *DevPath
- )
-/*++
-
- Turns the Device Path into a printable string. Allcoates
- the string from pool. The caller must FreePool the returned
- string.
-
---*/
-{
- POOL_PRINT Str;
- EFI_DEVICE_PATH *DevPathNode;
- VOID (*DumpNode)(POOL_PRINT *, VOID *);
- UINTN Index, NewSize;
-
- ZeroMem(&Str, sizeof(Str));
-
- //
- // Unpacked the device path
- //
-
- DevPath = UnpackDevicePath(DevPath);
- ASSERT (DevPath);
-
-
- //
- // Process each device path node
- //
-
- DevPathNode = DevPath;
- while (!IsDevicePathEnd(DevPathNode)) {
- //
- // Find the handler to dump this device path node
- //
-
- DumpNode = NULL;
- for (Index = 0; DevPathTable[Index].Function; Index += 1) {
-
- if (DevicePathType(DevPathNode) == DevPathTable[Index].Type &&
- DevicePathSubType(DevPathNode) == DevPathTable[Index].SubType) {
- DumpNode = DevPathTable[Index].Function;
- break;
- }
- }
-
- //
- // If not found, use a generic function
- //
-
- if (!DumpNode) {
- DumpNode = _DevPathNodeUnknown;
- }
-
- //
- // Put a path seperator in if needed
- //
-
- if (Str.len && DumpNode != _DevPathEndInstance) {
- CatPrint (&Str, L"/");
- }
-
- //
- // Print this node of the device path
- //
-
- DumpNode (&Str, DevPathNode);
-
- //
- // Next device path node
- //
-
- DevPathNode = NextDevicePathNode(DevPathNode);
- }
-
- //
- // Shrink pool used for string allocation
- //
-
- FreePool (DevPath);
- NewSize = (Str.len + 1) * sizeof(CHAR16);
- Str.str = ReallocatePool (Str.str, NewSize, NewSize);
- Str.str[Str.len] = 0;
- return Str.str;
-}
-
-BOOLEAN
-LibMatchDevicePaths (
- IN EFI_DEVICE_PATH *Multi,
- IN EFI_DEVICE_PATH *Single
- )
-{
- EFI_DEVICE_PATH *DevicePath, *DevicePathInst;
- UINTN Size;
-
- if (!Multi || !Single) {
- return FALSE;
- }
-
- DevicePath = Multi;
- while ((DevicePathInst = DevicePathInstance (&DevicePath, &Size))) {
- if (CompareMem (Single, DevicePathInst, Size) == 0) {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-EFI_DEVICE_PATH *
-LibDuplicateDevicePathInstance (
- IN EFI_DEVICE_PATH *DevPath
- )
-{
- EFI_DEVICE_PATH *NewDevPath,*DevicePathInst,*Temp;
- UINTN Size;
-
- //
- // get the size of an instance from the input
- //
-
- Temp = DevPath;
- DevicePathInst = DevicePathInstance (&Temp, &Size);
-
- //
- // Make a copy and set proper end type
- //
- NewDevPath = NULL;
- if (Size) {
- NewDevPath = AllocatePool (Size + sizeof(EFI_DEVICE_PATH));
- }
-
- if (NewDevPath) {
- CopyMem (NewDevPath, DevicePathInst, Size);
- Temp = NextDevicePathNode(NewDevPath);
- SetDevicePathEndNode(Temp);
- }
-
- return NewDevPath;
-}
-
Index: g5/boot/arch/ia64/loader/gefi/lib/runtime/rtlock.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/runtime/rtlock.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/runtime/rtlock.c (nonexistent)
@@ -1,98 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- lock.c
-
-Abstract:
-
- Implements FLOCK
-
-
-
-Revision History
-
---*/
-
-
-#include "lib.h"
-
-
-
-#pragma RUNTIME_CODE(RtAcquireLock)
-VOID
-RtAcquireLock (
- IN FLOCK *Lock
- )
-/*++
-
-Routine Description:
-
- Raising to the task priority level of the mutual exclusion
- lock, and then acquires ownership of the lock.
-
-Arguments:
-
- Lock - The lock to acquire
-
-Returns:
-
- Lock owned
-
---*/
-{
- if (BS) {
- if (BS->RaiseTPL != NULL) {
- Lock->OwnerTpl = BS->RaiseTPL(Lock->Tpl);
- }
- }
- else {
- if (LibRuntimeRaiseTPL != NULL) {
- Lock->OwnerTpl = LibRuntimeRaiseTPL(Lock->Tpl);
- }
- }
- Lock->Lock += 1;
- ASSERT (Lock->Lock == 1);
-}
-
-
-#pragma RUNTIME_CODE(RtAcquireLock)
-VOID
-RtReleaseLock (
- IN FLOCK *Lock
- )
-/*++
-
-Routine Description:
-
- Releases ownership of the mutual exclusion lock, and
- restores the previous task priority level.
-
-Arguments:
-
- Lock - The lock to release
-
-Returns:
-
- Lock unowned
-
---*/
-{
- EFI_TPL Tpl;
-
- Tpl = Lock->OwnerTpl;
- ASSERT(Lock->Lock == 1);
- Lock->Lock -= 1;
- if (BS) {
- if (BS->RestoreTPL != NULL) {
- BS->RestoreTPL (Tpl);
- }
- }
- else {
- if (LibRuntimeRestoreTPL != NULL) {
- LibRuntimeRestoreTPL(Tpl);
- }
- }
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/runtime/rtstr.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/runtime/rtstr.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/runtime/rtstr.c (nonexistent)
@@ -1,126 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- str.c
-
-Abstract:
-
- String runtime functions
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-#pragma RUNTIME_CODE(RtAcquireLock)
-INTN
-RUNTIMEFUNCTION
-RtStrCmp (
- IN CHAR16 *s1,
- IN CHAR16 *s2
- )
-// compare strings
-{
- while (*s1) {
- if (*s1 != *s2) {
- break;
- }
-
- s1 += 1;
- s2 += 1;
- }
-
- return *s1 - *s2;
-}
-
-#pragma RUNTIME_CODE(RtStrCpy)
-VOID
-RUNTIMEFUNCTION
-RtStrCpy (
- IN CHAR16 *Dest,
- IN CHAR16 *Src
- )
-// copy strings
-{
- while (*Src) {
- *(Dest++) = *(Src++);
- }
- *Dest = 0;
-}
-
-#pragma RUNTIME_CODE(RtStrCat)
-VOID
-RUNTIMEFUNCTION
-RtStrCat (
- IN CHAR16 *Dest,
- IN CHAR16 *Src
- )
-{
- RtStrCpy(Dest+StrLen(Dest), Src);
-}
-
-#pragma RUNTIME_CODE(RtStrLen)
-UINTN
-RUNTIMEFUNCTION
-RtStrLen (
- IN CHAR16 *s1
- )
-// string length
-{
- UINTN len;
-
- for (len=0; *s1; s1+=1, len+=1) ;
- return len;
-}
-
-#pragma RUNTIME_CODE(RtStrSize)
-UINTN
-RUNTIMEFUNCTION
-RtStrSize (
- IN CHAR16 *s1
- )
-// string size
-{
- UINTN len;
-
- for (len=0; *s1; s1+=1, len+=1) ;
- return (len + 1) * sizeof(CHAR16);
-}
-
-#pragma RUNTIME_CODE(RtBCDtoDecimal)
-UINT8
-RUNTIMEFUNCTION
-RtBCDtoDecimal(
- IN UINT8 BcdValue
- )
-{
- UINTN High, Low;
-
- High = BcdValue >> 4;
- Low = BcdValue - (High << 4);
-
- return ((UINT8)(Low + (High * 10)));
-}
-
-
-#pragma RUNTIME_CODE(RtDecimaltoBCD)
-UINT8
-RUNTIMEFUNCTION
-RtDecimaltoBCD (
- IN UINT8 DecValue
- )
-{
- UINTN High, Low;
-
- High = DecValue / 10;
- Low = DecValue - (High * 10);
-
- return ((UINT8)(Low + (High << 4)));
-}
-
-
Index: g5/boot/arch/ia64/loader/gefi/lib/runtime/rtdata.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/runtime/rtdata.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/runtime/rtdata.c (nonexistent)
@@ -1,63 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- data.c
-
-Abstract:
-
- EFI library global data
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-//
-// These globals are runtime globals
-//
-// N.B. The Microsoft C compiler will only put the data in the
-// right data section if it is explicitly initialized..
-//
-
-#pragma BEGIN_RUNTIME_DATA()
-
-//
-// RT - pointer to the runtime table
-//
-
-EFI_RUNTIME_SERVICES *RT;
-
-//
-// LibStandalone - TRUE if lib is linked in as part of the firmware.
-// N.B. The EFI fw sets this value directly
-//
-
-BOOLEAN LibFwInstance;
-
-//
-// EFIDebug - Debug mask
-//
-
-UINTN EFIDebug = EFI_DBUG_MASK;
-
-//
-// LibRuntimeDebugOut - Runtime Debug Output device
-//
-
-SIMPLE_TEXT_OUTPUT_INTERFACE *LibRuntimeDebugOut;
-
-//
-// LibRuntimeRaiseTPL, LibRuntimeRestoreTPL - pointers to Runtime functions from the
-// Boot Services Table
-//
-
-EFI_RAISE_TPL LibRuntimeRaiseTPL = NULL;
-EFI_RESTORE_TPL LibRuntimeRestoreTPL = NULL;
-
Index: g5/boot/arch/ia64/loader/gefi/lib/runtime/efirtlib.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/runtime/efirtlib.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/runtime/efirtlib.c (nonexistent)
@@ -1,139 +0,0 @@
-/*++
-
-Copyright (c) 1999 Intel Corporation
-
-Module Name:
-
- EfiRtLib.h
-
-Abstract:
-
- EFI Runtime library functions
-
-
-
-Revision History
-
---*/
-
-#include "efi.h"
-#include "efilib.h"
-#include "efirtlib.h"
-
-#pragma RUNTIME_CODE(RtZeroMem)
-VOID
-RUNTIMEFUNCTION
-RtZeroMem (
- IN VOID *Buffer,
- IN UINTN Size
- )
-{
- INT8 *pt;
-
- pt = Buffer;
- while (Size--) {
- *(pt++) = 0;
- }
-}
-
-#pragma RUNTIME_CODE(RtSetMem)
-VOID
-RUNTIMEFUNCTION
-RtSetMem (
- IN VOID *Buffer,
- IN UINTN Size,
- IN UINT8 Value
- )
-{
- INT8 *pt;
-
- pt = Buffer;
- while (Size--) {
- *(pt++) = Value;
- }
-}
-
-#pragma RUNTIME_CODE(RtCopyMem)
-VOID
-RUNTIMEFUNCTION
-RtCopyMem (
- IN VOID *Dest,
- IN VOID *Src,
- IN UINTN len
- )
-{
- CHAR8 *d, *s;
-
- d = Dest;
- s = Src;
- while (len--) {
- *(d++) = *(s++);
- }
-}
-
-#pragma RUNTIME_CODE(RtCompareMem)
-INTN
-RUNTIMEFUNCTION
-RtCompareMem (
- IN VOID *Dest,
- IN VOID *Src,
- IN UINTN len
- )
-{
- CHAR8 *d, *s;
-
- d = Dest;
- s = Src;
- while (len--) {
- if (*d != *s) {
- return *d - *s;
- }
-
- d += 1;
- s += 1;
- }
-
- return 0;
-}
-
-#pragma RUNTIME_CODE(RtCompareGuid)
-INTN
-RUNTIMEFUNCTION
-RtCompareGuid (
- IN EFI_GUID *Guid1,
- IN EFI_GUID *Guid2
- )
-/*++
-
-Routine Description:
-
- Compares to GUIDs
-
-Arguments:
-
- Guid1 - guid to compare
- Guid2 - guid to compare
-
-Returns:
- = 0 if Guid1 == Guid2
-
---*/
-{
- INT32 *g1, *g2, r;
-
- //
- // Compare 32 bits at a time
- //
-
- g1 = (INT32 *) Guid1;
- g2 = (INT32 *) Guid2;
-
- r = g1[0] - g2[0];
- r |= g1[1] - g2[1];
- r |= g1[2] - g2[2];
- r |= g1[3] - g2[3];
-
- return r;
-}
-
-
Index: g5/boot/arch/ia64/loader/gefi/lib/runtime/vm.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/runtime/vm.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/runtime/vm.c (nonexistent)
@@ -1,101 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- vm.c
-
-Abstract:
-
- EFI Hell to remap runtime address into the new virual address space
- that was registered by the OS for RT calls.
-
- So the code image needs to be relocated. All pointers need to be
- manually fixed up since the address map changes.
-
- GOOD LUCK NOT HAVING BUGS IN YOUR CODE! PLEASE TEST A LOT. MAKE SURE
- EXIT BOOTSERVICES OVER WRITES ALL BOOTSERVICE MEMORY & DATA SPACES WHEN
- YOU TEST.
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-#pragma RUNTIME_CODE(RtLibEnableVirtualMappings)
-VOID
-RUNTIMEFUNCTION
-RtLibEnableVirtualMappings (
- VOID
- )
-{
- EFI_CONVERT_POINTER ConvertPointer;
-
- //
- // If this copy of the lib is linked into the firmware, then
- // do not update the pointers yet.
- //
-
- if (!LibFwInstance) {
-
- //
- // Different components are updating to the new virtual
- // mappings at differnt times. The only function that
- // is safe to call at this notification is ConvertAddress
- //
-
- ConvertPointer = RT->ConvertPointer;
-
- //
- // Fix any pointers that the lib created, that may be needed
- // during runtime.
- //
-
- ConvertPointer (EFI_INTERNAL_PTR, (VOID **)&RT);
- ConvertPointer (EFI_OPTIONAL_PTR, (VOID **)&LibRuntimeDebugOut);
-
- ConvertPointer (EFI_INTERNAL_PTR, (VOID **)&LibRuntimeRaiseTPL);
- ConvertPointer (EFI_INTERNAL_PTR, (VOID **)&LibRuntimeRestoreTPL);
-
- // that was it :^)
- }
-}
-
-
-#pragma RUNTIME_CODE(RtConvertList)
-VOID
-RUNTIMEFUNCTION
-RtConvertList (
- IN UINTN DebugDisposition,
- IN OUT LIST_ENTRY *ListHead
- )
-{
- LIST_ENTRY *Link;
- LIST_ENTRY *NextLink;
- EFI_CONVERT_POINTER ConvertPointer;
-
- ConvertPointer = RT->ConvertPointer;
-
- //
- // Convert all the Flink & Blink pointers in the list
- //
-
- Link = ListHead;
- do {
- NextLink = Link->Flink;
-
- ConvertPointer (
- Link->Flink == ListHead ? DebugDisposition : 0,
- (VOID **)&Link->Flink
- );
-
- ConvertPointer (
- Link->Blink == ListHead ? DebugDisposition : 0,
- (VOID **)&Link->Blink
- );
-
- Link = NextLink;
- } while (Link != ListHead);
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/console.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/console.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/console.c (nonexistent)
@@ -1,104 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- console.c
-
-Abstract:
-
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-
-VOID
-Output (
- IN CHAR16 *Str
- )
-// Write a string to the console at the current cursor location
-{
- ST->ConOut->OutputString (ST->ConOut, Str);
-}
-
-
-VOID
-Input (
- IN CHAR16 *Prompt OPTIONAL,
- OUT CHAR16 *InStr,
- IN UINTN StrLen
- )
-// Input a string at the current cursor location, for StrLen
-{
- IInput (
- ST->ConOut,
- ST->ConIn,
- Prompt,
- InStr,
- StrLen
- );
-}
-
-VOID
-IInput (
- IN SIMPLE_TEXT_OUTPUT_INTERFACE *ConOut,
- IN SIMPLE_INPUT_INTERFACE *ConIn,
- IN CHAR16 *Prompt OPTIONAL,
- OUT CHAR16 *InStr,
- IN UINTN StrLen
- )
-// Input a string at the current cursor location, for StrLen
-{
- EFI_INPUT_KEY Key;
- EFI_STATUS Status;
- UINTN Len;
-
- if (Prompt) {
- ConOut->OutputString (ConOut, Prompt);
- }
-
- Len = 0;
- for (; ;) {
- WaitForSingleEvent (ConIn->WaitForKey, 0);
-
- Status = ConIn->ReadKeyStroke(ConIn, &Key);
- if (EFI_ERROR(Status)) {
- DEBUG((D_ERROR, "Input: error return from ReadKey %x\n", Status));
- break;
- }
-
- if (Key.UnicodeChar == '\n' ||
- Key.UnicodeChar == '\r') {
- break;
- }
-
- if (Key.UnicodeChar == '\b') {
- if (Len) {
- ConOut->OutputString(ConOut, L"\b \b");
- Len -= 1;
- }
- continue;
- }
-
- if (Key.UnicodeChar >= ' ') {
- if (Len < StrLen-1) {
- InStr[Len] = Key.UnicodeChar;
-
- InStr[Len+1] = 0;
- ConOut->OutputString(ConOut, &InStr[Len]);
-
- Len += 1;
- }
- continue;
- }
- }
-
- InStr[Len] = 0;
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/init.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/init.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/init.c (nonexistent)
@@ -1,181 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
-
-Abstract:
-
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-VOID
-EFIDebugVariable (
- VOID
- );
-
-VOID
-InitializeLib (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-/*++
-
-Routine Description:
-
- Initializes EFI library for use
-
-Arguments:
-
- Firmware's EFI system table
-
-Returns:
-
- None
-
---*/
-{
- EFI_LOADED_IMAGE *LoadedImage;
- EFI_STATUS Status;
- CHAR8 *LangCode;
-
- if (!LibInitialized) {
- LibInitialized = TRUE;
- LibFwInstance = FALSE;
-
- //
- // Set up global pointer to the system table, boot services table,
- // and runtime services table
- //
-
- ST = SystemTable;
- BS = SystemTable->BootServices;
- RT = SystemTable->RuntimeServices;
-// ASSERT (CheckCrc(0, &ST->Hdr));
-// ASSERT (CheckCrc(0, &BS->Hdr));
-// ASSERT (CheckCrc(0, &RT->Hdr));
-
-
- //
- // Initialize pool allocation type
- //
-
- if (ImageHandle) {
- Status = BS->HandleProtocol (
- ImageHandle,
- &LoadedImageProtocol,
- (VOID*)&LoadedImage
- );
-
- if (!EFI_ERROR(Status)) {
- PoolAllocationType = LoadedImage->ImageDataType;
- }
-
- EFIDebugVariable ();
- }
-
- //
- // Initialize Guid table
- //
-
- InitializeGuid();
-
- InitializeLibPlatform(ImageHandle,SystemTable);
- }
-
- //
- //
- //
-
- if (ImageHandle && UnicodeInterface == &LibStubUnicodeInterface) {
- LangCode = LibGetVariable (VarLanguage, &EfiGlobalVariable);
- InitializeUnicodeSupport (LangCode);
- if (LangCode) {
- FreePool (LangCode);
- }
- }
-}
-
-VOID
-InitializeUnicodeSupport (
- CHAR8 *LangCode
- )
-{
- EFI_UNICODE_COLLATION_INTERFACE *Ui;
- EFI_STATUS Status;
- CHAR8 *Languages;
- UINTN Index, Position, Length;
- UINTN NoHandles;
- EFI_HANDLE *Handles;
-
- //
- // If we don't know it, lookup the current language code
- //
-
- LibLocateHandle (ByProtocol, &UnicodeCollationProtocol, NULL, &NoHandles, &Handles);
- if (!LangCode || !NoHandles) {
- goto Done;
- }
-
- //
- // Check all driver's for a matching language code
- //
-
- for (Index=0; Index < NoHandles; Index++) {
- Status = BS->HandleProtocol (Handles[Index], &UnicodeCollationProtocol, (VOID*)&Ui);
- if (EFI_ERROR(Status)) {
- continue;
- }
-
- //
- // Check for a matching language code
- //
-
- Languages = Ui->SupportedLanguages;
- Length = strlena(Languages);
- for (Position=0; Position < Length; Position += ISO_639_2_ENTRY_SIZE) {
-
- //
- // If this code matches, use this driver
- //
-
- if (CompareMem (Languages+Position, LangCode, ISO_639_2_ENTRY_SIZE) == 0) {
- UnicodeInterface = Ui;
- goto Done;
- }
- }
- }
-
-Done:
- //
- // Cleanup
- //
-
- if (Handles) {
- FreePool (Handles);
- }
-}
-
-VOID
-EFIDebugVariable (
- VOID
- )
-{
- EFI_STATUS Status;
- UINT32 Attributes;
- UINTN DataSize;
- UINTN NewEFIDebug;
-
- DataSize = sizeof(EFIDebug);
- Status = RT->GetVariable(L"EFIDebug", &EfiGlobalVariable, &Attributes, &DataSize, &NewEFIDebug);
- if (!EFI_ERROR(Status)) {
- EFIDebug = NewEFIDebug;
- }
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/boxdraw.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/boxdraw.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/boxdraw.c (nonexistent)
@@ -1,173 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- BoxDraw.c
-
-Abstract:
- Lib functions to support Box Draw Unicode code pages.
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-typedef struct {
- CHAR16 Unicode;
- CHAR8 PcAnsi;
- CHAR8 Ascii;
-} UNICODE_TO_CHAR;
-
-
-//
-// This list is used to define the valid extend chars.
-// It also provides a mapping from Unicode to PCANSI or
-// ASCII. The ASCII mapping we just made up.
-//
-//
-
-STATIC UNICODE_TO_CHAR UnicodeToPcAnsiOrAscii[] = {
- { BOXDRAW_HORIZONTAL, 0xc4, L'-'},
- { BOXDRAW_VERTICAL, 0xb3, L'|'},
- { BOXDRAW_DOWN_RIGHT, 0xda, L'/'},
- { BOXDRAW_DOWN_LEFT, 0xbf, L'\\'},
- { BOXDRAW_UP_RIGHT, 0xc0, L'\\'},
- { BOXDRAW_UP_LEFT, 0xd9, L'/'},
- { BOXDRAW_VERTICAL_RIGHT, 0xc3, L'|'},
- { BOXDRAW_VERTICAL_LEFT, 0xb4, L'|'},
- { BOXDRAW_DOWN_HORIZONTAL, 0xc2, L'+'},
- { BOXDRAW_UP_HORIZONTAL, 0xc1, L'+'},
- { BOXDRAW_VERTICAL_HORIZONTAL, 0xc5, L'+'},
- { BOXDRAW_DOUBLE_HORIZONTAL, 0xcd, L'-'},
- { BOXDRAW_DOUBLE_VERTICAL, 0xba, L'|'},
- { BOXDRAW_DOWN_RIGHT_DOUBLE, 0xd5, L'/'},
- { BOXDRAW_DOWN_DOUBLE_RIGHT, 0xd6, L'/'},
- { BOXDRAW_DOUBLE_DOWN_RIGHT, 0xc9, L'/'},
- { BOXDRAW_DOWN_LEFT_DOUBLE, 0xb8, L'\\'},
- { BOXDRAW_DOWN_DOUBLE_LEFT, 0xb7, L'\\'},
- { BOXDRAW_DOUBLE_DOWN_LEFT, 0xbb, L'\\'},
- { BOXDRAW_UP_RIGHT_DOUBLE, 0xd4, L'\\'},
- { BOXDRAW_UP_DOUBLE_RIGHT, 0xd3, L'\\'},
- { BOXDRAW_DOUBLE_UP_RIGHT, 0xc8, L'\\'},
- { BOXDRAW_UP_LEFT_DOUBLE, 0xbe, L'/'},
- { BOXDRAW_UP_DOUBLE_LEFT, 0xbd, L'/'},
- { BOXDRAW_DOUBLE_UP_LEFT, 0xbc, L'/'},
- { BOXDRAW_VERTICAL_RIGHT_DOUBLE, 0xc6, L'|'},
- { BOXDRAW_VERTICAL_DOUBLE_RIGHT, 0xc7, L'|'},
- { BOXDRAW_DOUBLE_VERTICAL_RIGHT, 0xcc, L'|'},
- { BOXDRAW_VERTICAL_LEFT_DOUBLE, 0xb5, L'|'},
- { BOXDRAW_VERTICAL_DOUBLE_LEFT, 0xb6, L'|'},
- { BOXDRAW_DOUBLE_VERTICAL_LEFT, 0xb9, L'|'},
- { BOXDRAW_DOWN_HORIZONTAL_DOUBLE, 0xd1, L'+'},
- { BOXDRAW_DOWN_DOUBLE_HORIZONTAL, 0xd2, L'+'},
- { BOXDRAW_DOUBLE_DOWN_HORIZONTAL, 0xcb, L'+'},
- { BOXDRAW_UP_HORIZONTAL_DOUBLE, 0xcf, L'+'},
- { BOXDRAW_UP_DOUBLE_HORIZONTAL, 0xd0, L'+'},
- { BOXDRAW_DOUBLE_UP_HORIZONTAL, 0xca, L'+'},
- { BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE, 0xd8, L'+'},
- { BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL, 0xd7, L'+'},
- { BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL, 0xce, L'+'},
-
- { BLOCKELEMENT_FULL_BLOCK, 0xdb, L'*'},
- { BLOCKELEMENT_LIGHT_SHADE, 0xb0, L'+'},
-
- { GEOMETRICSHAPE_UP_TRIANGLE, 0x1e, L'^'},
- { GEOMETRICSHAPE_RIGHT_TRIANGLE, 0x10, L'>'},
- { GEOMETRICSHAPE_DOWN_TRIANGLE, 0x1f, L'v'},
- { GEOMETRICSHAPE_LEFT_TRIANGLE, 0x11, L'<'},
-
- /* BugBug: Left Arrow is an ESC. We can not make it print
- on a PCANSI terminal. If we can make left arrow
- come out on PC ANSI we can add it back.
-
- { ARROW_LEFT, 0x1b, L'<'},
- */
-
- { ARROW_UP, 0x18, L'^'},
-
- /* BugBut: Took out left arrow so right has to go too.
- { ARROW_RIGHT, 0x1a, L'>'},
- */
- { ARROW_DOWN, 0x19, L'v'},
-
- { 0x0000, 0x00 }
-};
-
-
-BOOLEAN
-LibIsValidTextGraphics (
- IN CHAR16 Graphic,
- OUT CHAR8 *PcAnsi, OPTIONAL
- OUT CHAR8 *Ascii OPTIONAL
- )
-/*++
-
-Routine Description:
-
- Detects if a Unicode char is for Box Drawing text graphics.
-
-Arguments:
-
- Grphic - Unicode char to test.
-
- PcAnsi - Optional pointer to return PCANSI equivalent of Graphic.
-
- Asci - Optional pointer to return Ascii equivalent of Graphic.
-
-Returns:
-
- TRUE if Gpaphic is a supported Unicode Box Drawing character.
-
---*/{
- UNICODE_TO_CHAR *Table;
-
- if ((((Graphic & 0xff00) != 0x2500) && ((Graphic & 0xff00) != 0x2100))) {
-
- //
- // Unicode drawing code charts are all in the 0x25xx range,
- // arrows are 0x21xx
- //
- return FALSE;
- }
-
- for (Table = UnicodeToPcAnsiOrAscii; Table->Unicode != 0x0000; Table++) {
- if (Graphic == Table->Unicode) {
- if (PcAnsi) {
- *PcAnsi = Table->PcAnsi;
- }
- if (Ascii) {
- *Ascii = Table->Ascii;
- }
- return TRUE;
- }
- }
- return FALSE;
-}
-
-BOOLEAN
-IsValidAscii (
- IN CHAR16 Ascii
- )
-{
- if ((Ascii >= 0x20) && (Ascii <= 0x7f)) {
- return TRUE;
- }
- return FALSE;
-}
-
-BOOLEAN
-IsValidEfiCntlChar (
- IN CHAR16 c
- )
-{
- if (c == CHAR_NULL || c == CHAR_BACKSPACE || c == CHAR_LINEFEED || c == CHAR_CARRIAGE_RETURN) {
- return TRUE;
- }
- return FALSE;
-}
-
Index: g5/boot/arch/ia64/loader/gefi/lib/crc.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/crc.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/crc.c (nonexistent)
@@ -1,218 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- crc.c
-
-Abstract:
-
- CRC32 functions
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-UINT32 CRCTable[256] = {
- 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F,
- 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
- 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2,
- 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
- 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9,
- 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
- 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C,
- 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
- 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423,
- 0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
- 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, 0x01DB7106,
- 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
- 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D,
- 0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
- 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950,
- 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
- 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7,
- 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
- 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA,
- 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
- 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81,
- 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
- 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84,
- 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
- 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB,
- 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
- 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E,
- 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
- 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55,
- 0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
- 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28,
- 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
- 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F,
- 0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
- 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242,
- 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
- 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69,
- 0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
- 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC,
- 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
- 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693,
- 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
- 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
- };
-
-
-
-VOID
-SetCrc (
- IN OUT EFI_TABLE_HEADER *Hdr
- )
-/*++
-
-Routine Description:
-
- Updates the CRC32 value in the table header
-
-Arguments:
-
- Hdr - The table to update
-
-Returns:
-
- None
-
---*/
-{
- SetCrcAltSize (Hdr->HeaderSize, Hdr);
-}
-
-VOID
-SetCrcAltSize (
- IN UINTN Size,
- IN OUT EFI_TABLE_HEADER *Hdr
- )
-/*++
-
-Routine Description:
-
- Updates the CRC32 value in the table header
-
-Arguments:
-
- Hdr - The table to update
-
-Returns:
-
- None
-
---*/
-{
- Hdr->CRC32 = 0;
- Hdr->CRC32 = CalculateCrc((UINT8 *)Hdr, Size);
-}
-
-
-BOOLEAN
-CheckCrc (
- IN UINTN MaxSize,
- IN OUT EFI_TABLE_HEADER *Hdr
- )
-/*++
-
-Routine Description:
-
- Checks the CRC32 value in the table header
-
-Arguments:
-
- Hdr - The table to check
-
-Returns:
-
- TRUE if the CRC is OK in the table
-
---*/
-{
- return CheckCrcAltSize (MaxSize, Hdr->HeaderSize, Hdr);
-}
-
-
-
-
-BOOLEAN
-CheckCrcAltSize (
- IN UINTN MaxSize,
- IN UINTN Size,
- IN OUT EFI_TABLE_HEADER *Hdr
- )
-/*++
-
-Routine Description:
-
- Checks the CRC32 value in the table header
-
-Arguments:
-
- Hdr - The table to check
-
-Returns:
-
- TRUE if the CRC is OK in the table
-
---*/
-{
- UINT32 Crc;
- UINT32 OrgCrc;
- BOOLEAN f;
-
- if (Size == 0) {
- //
- // If header size is 0 CRC will pass so return FALSE here
- //
- return FALSE;
- }
- if (MaxSize && Size > MaxSize) {
- DEBUG((D_ERROR, "CheckCrc32: Size > MaxSize\n"));
- return FALSE;
- }
-
- // clear old crc from header
- OrgCrc = Hdr->CRC32;
- Hdr->CRC32 = 0;
- Crc = CalculateCrc((UINT8 *)Hdr, Size);
-
- // set restults
- Hdr->CRC32 = OrgCrc;
-
- // return status
- f = OrgCrc == (UINT32) Crc;
- if (!f) {
- DEBUG((D_ERROR, "CheckCrc32: Crc check failed\n"));
- }
-
- return f;
-}
-
-
-UINT32
-CalculateCrc (
- UINT8 *pt,
- UINTN Size
- )
-{
- UINTN Crc;
-
- // compute crc
- Crc = 0xffffffff;
- while (Size) {
- Crc = (Crc >> 8) ^ CRCTable[(UINT8) Crc ^ *pt];
- pt += 1;
- Size -= 1;
- }
- Crc = Crc ^ 0xffffffff;
- return (UINT32)Crc;
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/str.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/str.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/str.c (nonexistent)
@@ -1,370 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- str.c
-
-Abstract:
-
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-INTN
-StrCmp (
- IN CHAR16 *s1,
- IN CHAR16 *s2
- )
-// compare strings
-{
- return RtStrCmp(s1, s2);
-}
-
-INTN
-StrnCmp (
- IN CHAR16 *s1,
- IN CHAR16 *s2,
- IN UINTN len
- )
-// compare strings
-{
- while (*s1 && len) {
- if (*s1 != *s2) {
- break;
- }
-
- s1 += 1;
- s2 += 1;
- len -= 1;
- }
-
- return len ? *s1 - *s2 : 0;
-}
-
-
-INTN
-LibStubStriCmp (
- IN EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *s1,
- IN CHAR16 *s2
- )
-{
- return StrCmp (s1, s2);
-}
-
-VOID
-LibStubStrLwrUpr (
- IN EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *Str
- )
-{
-}
-
-INTN
-StriCmp (
- IN CHAR16 *s1,
- IN CHAR16 *s2
- )
-// compare strings
-{
- return UnicodeInterface->StriColl(UnicodeInterface, s1, s2);
-}
-
-VOID
-StrLwr (
- IN CHAR16 *Str
- )
-// lwoer case string
-{
- UnicodeInterface->StrLwr(UnicodeInterface, Str);
-}
-
-VOID
-StrUpr (
- IN CHAR16 *Str
- )
-// upper case string
-{
- UnicodeInterface->StrUpr(UnicodeInterface, Str);
-}
-
-VOID
-StrCpy (
- IN CHAR16 *Dest,
- IN CHAR16 *Src
- )
-// copy strings
-{
- RtStrCpy (Dest, Src);
-}
-
-VOID
-StrCat (
- IN CHAR16 *Dest,
- IN CHAR16 *Src
- )
-{
- RtStrCat(Dest, Src);
-}
-
-UINTN
-StrLen (
- IN CHAR16 *s1
- )
-// string length
-{
- return RtStrLen(s1);
-}
-
-UINTN
-StrSize (
- IN CHAR16 *s1
- )
-// string size
-{
- return RtStrSize(s1);
-}
-
-CHAR16 *
-StrDuplicate (
- IN CHAR16 *Src
- )
-// duplicate a string
-{
- CHAR16 *Dest;
- UINTN Size;
-
- Size = StrSize(Src);
- Dest = AllocatePool (Size);
- if (Dest) {
- CopyMem (Dest, Src, Size);
- }
- return Dest;
-}
-
-UINTN
-strlena (
- IN CHAR8 *s1
- )
-// string length
-{
- UINTN len;
-
- for (len=0; *s1; s1+=1, len+=1) ;
- return len;
-}
-
-UINTN
-strcmpa (
- IN CHAR8 *s1,
- IN CHAR8 *s2
- )
-// compare strings
-{
- while (*s1) {
- if (*s1 != *s2) {
- break;
- }
-
- s1 += 1;
- s2 += 1;
- }
-
- return *s1 - *s2;
-}
-
-UINTN
-strncmpa (
- IN CHAR8 *s1,
- IN CHAR8 *s2,
- IN UINTN len
- )
-// compare strings
-{
- while (*s1 && len) {
- if (*s1 != *s2) {
- break;
- }
-
- s1 += 1;
- s2 += 1;
- len -= 1;
- }
-
- return len ? *s1 - *s2 : 0;
-}
-
-
-
-UINTN
-xtoi (
- CHAR16 *str
- )
-// convert hex string to uint
-{
- UINTN u;
- CHAR16 c;
-
- // skip preceeding white space
- while (*str && *str == ' ') {
- str += 1;
- }
-
- // convert hex digits
- u = 0;
- while ((c = *(str++))) {
- if (c >= 'a' && c <= 'f') {
- c -= 'a' - 'A';
- }
-
- if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F')) {
- u = (u << 4) | (c - (c >= 'A' ? 'A'-10 : '0'));
- } else {
- break;
- }
- }
-
- return u;
-}
-
-UINTN
-Atoi (
- CHAR16 *str
- )
-// convert hex string to uint
-{
- UINTN u;
- CHAR16 c;
-
- // skip preceeding white space
- while (*str && *str == ' ') {
- str += 1;
- }
-
- // convert digits
- u = 0;
- while ((c = *(str++))) {
- if (c >= '0' && c <= '9') {
- u = (u * 10) + c - '0';
- } else {
- break;
- }
- }
-
- return u;
-}
-
-BOOLEAN
-MetaMatch (
- IN CHAR16 *String,
- IN CHAR16 *Pattern
- )
-{
- CHAR16 c, p, l;
-
- for (; ;) {
- p = *Pattern;
- Pattern += 1;
-
- switch (p) {
- case 0:
- // End of pattern. If end of string, TRUE match
- return *String ? FALSE : TRUE;
-
- case '*':
- // Match zero or more chars
- while (*String) {
- if (MetaMatch (String, Pattern)) {
- return TRUE;
- }
- String += 1;
- }
- return MetaMatch (String, Pattern);
-
- case '?':
- // Match any one char
- if (!*String) {
- return FALSE;
- }
- String += 1;
- break;
-
- case '[':
- // Match char set
- c = *String;
- if (!c) {
- return FALSE; // syntax problem
- }
-
- l = 0;
- while ((p = *Pattern++)) {
- if (p == ']') {
- return FALSE;
- }
-
- if (p == '-') { // if range of chars,
- p = *Pattern; // get high range
- if (p == 0 || p == ']') {
- return FALSE; // syntax problem
- }
-
- if (c >= l && c <= p) { // if in range,
- break; // it's a match
- }
- }
-
- l = p;
- if (c == p) { // if char matches
- break; // move on
- }
- }
-
- // skip to end of match char set
- while (p && p != ']') {
- p = *Pattern;
- Pattern += 1;
- }
-
- String += 1;
- break;
-
- default:
- c = *String;
- if (c != p) {
- return FALSE;
- }
-
- String += 1;
- break;
- }
- }
-}
-
-
-BOOLEAN
-LibStubMetaiMatch (
- IN EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *String,
- IN CHAR16 *Pattern
- )
-{
- return MetaMatch (String, Pattern);
-}
-
-
-BOOLEAN
-MetaiMatch (
- IN CHAR16 *String,
- IN CHAR16 *Pattern
- )
-{
- return UnicodeInterface->MetaiMatch(UnicodeInterface, String, Pattern);
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/data.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/data.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/data.c (nonexistent)
@@ -1,154 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- data.c
-
-Abstract:
-
- EFI library global data
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-//
-// LibInitialized - TRUE once InitializeLib() is called for the first time
-//
-
-BOOLEAN LibInitialized = FALSE;
-
-//
-// ST - pointer to the EFI system table
-//
-
-EFI_SYSTEM_TABLE *ST;
-
-//
-// BS - pointer to the boot services table
-//
-
-EFI_BOOT_SERVICES *BS;
-
-
-//
-// Default pool allocation type
-//
-
-EFI_MEMORY_TYPE PoolAllocationType = EfiBootServicesData;
-
-//
-// Unicode collation functions that are in use
-//
-
-EFI_UNICODE_COLLATION_INTERFACE LibStubUnicodeInterface = {
- LibStubStriCmp,
- LibStubMetaiMatch,
- LibStubStrLwrUpr,
- LibStubStrLwrUpr,
- NULL, // FatToStr
- NULL, // StrToFat
- NULL // SupportedLanguages
-};
-
-EFI_UNICODE_COLLATION_INTERFACE *UnicodeInterface = &LibStubUnicodeInterface;
-
-//
-// Root device path
-//
-
-EFI_DEVICE_PATH RootDevicePath[] = {
- {END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH,0}}
-};
-
-EFI_DEVICE_PATH EndDevicePath[] = {
- {END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH, 0}}
-};
-
-EFI_DEVICE_PATH EndInstanceDevicePath[] = {
- {END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH, 0}}
-};
-
-
-//
-// EFI IDs
-//
-
-EFI_GUID EfiGlobalVariable = EFI_GLOBAL_VARIABLE;
-EFI_GUID NullGuid = { 0,0,0,{0,0,0,0,0,0,0,0} };
-
-//
-// Protocol IDs
-//
-
-EFI_GUID DevicePathProtocol = DEVICE_PATH_PROTOCOL;
-EFI_GUID LoadedImageProtocol = LOADED_IMAGE_PROTOCOL;
-EFI_GUID TextInProtocol = SIMPLE_TEXT_INPUT_PROTOCOL;
-EFI_GUID TextOutProtocol = SIMPLE_TEXT_OUTPUT_PROTOCOL;
-EFI_GUID BlockIoProtocol = BLOCK_IO_PROTOCOL;
-EFI_GUID DiskIoProtocol = DISK_IO_PROTOCOL;
-EFI_GUID FileSystemProtocol = SIMPLE_FILE_SYSTEM_PROTOCOL;
-EFI_GUID LoadFileProtocol = LOAD_FILE_PROTOCOL;
-EFI_GUID DeviceIoProtocol = DEVICE_IO_PROTOCOL;
-EFI_GUID UnicodeCollationProtocol = UNICODE_COLLATION_PROTOCOL;
-EFI_GUID SerialIoProtocol = SERIAL_IO_PROTOCOL;
-EFI_GUID SimpleNetworkProtocol = EFI_SIMPLE_NETWORK_PROTOCOL;
-EFI_GUID PxeBaseCodeProtocol = EFI_PXE_BASE_CODE_PROTOCOL;
-EFI_GUID PxeCallbackProtocol = EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL;
-EFI_GUID NetworkInterfaceIdentifierProtocol = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL;
-EFI_GUID UiProtocol = EFI_UI_PROTOCOL;
-//
-// File system information IDs
-//
-
-EFI_GUID GenericFileInfo = EFI_FILE_INFO_ID;
-EFI_GUID FileSystemInfo = EFI_FILE_SYSTEM_INFO_ID;
-EFI_GUID FileSystemVolumeLabelInfo = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID;
-
-//
-// Reference implementation public protocol IDs
-//
-
-EFI_GUID InternalShellProtocol = INTERNAL_SHELL_GUID;
-EFI_GUID VariableStoreProtocol = VARIABLE_STORE_PROTOCOL;
-EFI_GUID LegacyBootProtocol = LEGACY_BOOT_PROTOCOL;
-EFI_GUID VgaClassProtocol = VGA_CLASS_DRIVER_PROTOCOL;
-
-EFI_GUID TextOutSpliterProtocol = TEXT_OUT_SPLITER_PROTOCOL;
-EFI_GUID ErrorOutSpliterProtocol = ERROR_OUT_SPLITER_PROTOCOL;
-EFI_GUID TextInSpliterProtocol = TEXT_IN_SPLITER_PROTOCOL;
-
-EFI_GUID AdapterDebugProtocol = ADAPTER_DEBUG_PROTOCOL;
-
-//
-// Device path media protocol IDs
-//
-EFI_GUID PcAnsiProtocol = DEVICE_PATH_MESSAGING_PC_ANSI;
-EFI_GUID Vt100Protocol = DEVICE_PATH_MESSAGING_VT_100;
-
-//
-// EFI GPT Partition Type GUIDs
-//
-EFI_GUID EfiPartTypeSystemPartitionGuid = EFI_PART_TYPE_EFI_SYSTEM_PART_GUID;
-EFI_GUID EfiPartTypeLegacyMbrGuid = EFI_PART_TYPE_LEGACY_MBR_GUID;
-
-
-//
-// Reference implementation Vendor Device Path Guids
-//
-EFI_GUID UnknownDevice = UNKNOWN_DEVICE_GUID;
-
-//
-// Configuration Table GUIDs
-//
-
-EFI_GUID MpsTableGuid = MPS_TABLE_GUID;
-EFI_GUID AcpiTableGuid = ACPI_TABLE_GUID;
-EFI_GUID SMBIOSTableGuid = SMBIOS_TABLE_GUID;
-EFI_GUID SalSystemTableGuid = SAL_SYSTEM_TABLE_GUID;
Index: g5/boot/arch/ia64/loader/gefi/lib/hand.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/hand.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/hand.c (nonexistent)
@@ -1,620 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- hand.c
-
-Abstract:
-
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-#include "efistdarg.h" // !!!
-
-
-EFI_STATUS
-LibLocateProtocol (
- IN EFI_GUID *ProtocolGuid,
- OUT VOID **Interface
- )
-//
-// Find the first instance of this Protocol in the system and return it's interface
-//
-{
- EFI_STATUS Status;
- UINTN NumberHandles, Index;
- EFI_HANDLE *Handles;
-
-
- *Interface = NULL;
- Status = LibLocateHandle (ByProtocol, ProtocolGuid, NULL, &NumberHandles, &Handles);
- if (EFI_ERROR(Status)) {
- DEBUG((D_INFO, "LibLocateProtocol: Handle not found\n"));
- return Status;
- }
-
- for (Index=0; Index < NumberHandles; Index++) {
- Status = BS->HandleProtocol (Handles[Index], ProtocolGuid, Interface);
- if (!EFI_ERROR(Status)) {
- break;
- }
- }
-
- if (Handles) {
- FreePool (Handles);
- }
-
- return Status;
-}
-
-EFI_STATUS
-LibLocateHandle (
- IN EFI_LOCATE_SEARCH_TYPE SearchType,
- IN EFI_GUID *Protocol OPTIONAL,
- IN VOID *SearchKey OPTIONAL,
- IN OUT UINTN *NoHandles,
- OUT EFI_HANDLE **Buffer
- )
-
-{
- EFI_STATUS Status;
- UINTN BufferSize;
-
- //
- // Initialize for GrowBuffer loop
- //
-
- Status = EFI_SUCCESS;
- *Buffer = NULL;
- BufferSize = 50 * sizeof(EFI_HANDLE);
-
- //
- // Call the real function
- //
-
- while (GrowBuffer (&Status, (VOID **) Buffer, BufferSize)) {
-
- Status = BS->LocateHandle (
- SearchType,
- Protocol,
- SearchKey,
- &BufferSize,
- *Buffer
- );
-
- }
-
- *NoHandles = BufferSize / sizeof (EFI_HANDLE);
- if (EFI_ERROR(Status)) {
- *NoHandles = 0;
- }
-
- return Status;
-}
-
-EFI_STATUS
-LibLocateHandleByDiskSignature (
- IN UINT8 MBRType,
- IN UINT8 SignatureType,
- IN VOID *Signature,
- IN OUT UINTN *NoHandles,
- OUT EFI_HANDLE **Buffer
- )
-
-{
- EFI_STATUS Status;
- UINTN BufferSize;
- UINTN NoBlockIoHandles;
- EFI_HANDLE *BlockIoBuffer;
- EFI_DEVICE_PATH *DevicePath;
- UINTN Index;
- EFI_DEVICE_PATH *Start, *Next, *DevPath;
- HARDDRIVE_DEVICE_PATH *HardDriveDevicePath;
- BOOLEAN Match;
- BOOLEAN PreviousNodeIsHardDriveDevicePath;
-
- //
- // Initialize for GrowBuffer loop
- //
-
- BlockIoBuffer = NULL;
- BufferSize = 50 * sizeof(EFI_HANDLE);
-
- //
- // Call the real function
- //
-
- while (GrowBuffer (&Status, (VOID **)&BlockIoBuffer, BufferSize)) {
-
- //
- // Get list of device handles that support the BLOCK_IO Protocol.
- //
-
- Status = BS->LocateHandle (
- ByProtocol,
- &BlockIoProtocol,
- NULL,
- &BufferSize,
- BlockIoBuffer
- );
-
- }
-
- NoBlockIoHandles = BufferSize / sizeof (EFI_HANDLE);
- if (EFI_ERROR(Status)) {
- NoBlockIoHandles = 0;
- }
-
- //
- // If there was an error or there are no device handles that support
- // the BLOCK_IO Protocol, then return.
- //
-
- if (NoBlockIoHandles == 0) {
- FreePool(BlockIoBuffer);
- *NoHandles = 0;
- *Buffer = NULL;
- return Status;
- }
-
- //
- // Loop through all the device handles that support the BLOCK_IO Protocol
- //
-
- *NoHandles = 0;
-
- for(Index=0;Index<NoBlockIoHandles;Index++) {
-
- Status = BS->HandleProtocol (BlockIoBuffer[Index],
- &DevicePathProtocol,
- (VOID*)&DevicePath
- );
-
- //
- // Search DevicePath for a Hard Drive Media Device Path node.
- // If one is found, then see if it matches the signature that was
- // passed in. If it does match, and the next node is the End of the
- // device path, and the previous node is not a Hard Drive Media Device
- // Path, then we have found a match.
- //
-
- Match = FALSE;
-
- if (DevicePath != NULL) {
-
- PreviousNodeIsHardDriveDevicePath = FALSE;
-
- DevPath = DevicePath;
- Start = DevPath;
-
- //
- // Check for end of device path type
- //
-
- for (; ;) {
-
- if ((DevicePathType(DevPath) == MEDIA_DEVICE_PATH) &&
- (DevicePathSubType(DevPath) == MEDIA_HARDDRIVE_DP)) {
-
- HardDriveDevicePath = (HARDDRIVE_DEVICE_PATH *)(DevPath);
-
- if (PreviousNodeIsHardDriveDevicePath == FALSE) {
-
- Next = NextDevicePathNode(DevPath);
- if (IsDevicePathEndType(Next)) {
- if ((HardDriveDevicePath->MBRType == MBRType) &&
- (HardDriveDevicePath->SignatureType == SignatureType)) {
- switch(SignatureType) {
- case SIGNATURE_TYPE_MBR:
- if (*((UINT32 *)(Signature)) == *(UINT32 *)(&(HardDriveDevicePath->Signature[0]))) {
- Match = TRUE;
- }
- break;
- case SIGNATURE_TYPE_GUID:
- if (CompareGuid((EFI_GUID *)Signature,(EFI_GUID *)(&(HardDriveDevicePath->Signature[0]))) == 0) {
- Match = TRUE;
- }
- break;
- }
- }
- }
- }
- PreviousNodeIsHardDriveDevicePath = TRUE;
- } else {
- PreviousNodeIsHardDriveDevicePath = FALSE;
- }
-
- if (IsDevicePathEnd(DevPath)) {
- break;
- }
-
- DevPath = NextDevicePathNode(DevPath);
- }
-
- }
-
- if (Match == FALSE) {
- BlockIoBuffer[Index] = NULL;
- } else {
- *NoHandles = *NoHandles + 1;
- }
- }
-
- //
- // If there are no matches, then return
- //
-
- if (*NoHandles == 0) {
- FreePool(BlockIoBuffer);
- *NoHandles = 0;
- *Buffer = NULL;
- return EFI_SUCCESS;
- }
-
- //
- // Allocate space for the return buffer of device handles.
- //
-
- *Buffer = AllocatePool(*NoHandles * sizeof(EFI_HANDLE));
-
- if (*Buffer == NULL) {
- FreePool(BlockIoBuffer);
- *NoHandles = 0;
- *Buffer = NULL;
- return EFI_OUT_OF_RESOURCES;
- }
-
- //
- // Build list of matching device handles.
- //
-
- *NoHandles = 0;
- for(Index=0;Index<NoBlockIoHandles;Index++) {
- if (BlockIoBuffer[Index] != NULL) {
- (*Buffer)[*NoHandles] = BlockIoBuffer[Index];
- *NoHandles = *NoHandles + 1;
- }
- }
-
- FreePool(BlockIoBuffer);
-
- return EFI_SUCCESS;
-}
-
-EFI_FILE_HANDLE
-LibOpenRoot (
- IN EFI_HANDLE DeviceHandle
- )
-{
- EFI_STATUS Status;
- EFI_FILE_IO_INTERFACE *Volume;
- EFI_FILE_HANDLE File;
-
-
- //
- // File the file system interface to the device
- //
-
- Status = BS->HandleProtocol (DeviceHandle, &FileSystemProtocol, (VOID*)&Volume);
-
- //
- // Open the root directory of the volume
- //
-
- if (!EFI_ERROR(Status)) {
- Status = Volume->OpenVolume(Volume, &File);
- }
-
- //
- // Done
- //
-
- return EFI_ERROR(Status) ? NULL : File;
-}
-
-EFI_FILE_INFO *
-LibFileInfo (
- IN EFI_FILE_HANDLE FHand
- )
-{
- EFI_STATUS Status;
- EFI_FILE_INFO *Buffer;
- UINTN BufferSize;
-
- //
- // Initialize for GrowBuffer loop
- //
-
- Buffer = NULL;
- BufferSize = SIZE_OF_EFI_FILE_INFO + 200;
-
- //
- // Call the real function
- //
-
- while (GrowBuffer (&Status, (VOID **) &Buffer, BufferSize)) {
- Status = FHand->GetInfo (
- FHand,
- &GenericFileInfo,
- &BufferSize,
- Buffer
- );
- }
-
- return Buffer;
-}
-
-
-EFI_FILE_SYSTEM_INFO *
-LibFileSystemInfo (
- IN EFI_FILE_HANDLE FHand
- )
-{
- EFI_STATUS Status;
- EFI_FILE_SYSTEM_INFO *Buffer;
- UINTN BufferSize;
-
- //
- // Initialize for GrowBuffer loop
- //
-
- Buffer = NULL;
- BufferSize = SIZE_OF_EFI_FILE_SYSTEM_INFO + 200;
-
- //
- // Call the real function
- //
-
- while (GrowBuffer (&Status, (VOID **) &Buffer, BufferSize)) {
- Status = FHand->GetInfo (
- FHand,
- &FileSystemInfo,
- &BufferSize,
- Buffer
- );
- }
-
- return Buffer;
-}
-
-EFI_FILE_SYSTEM_VOLUME_LABEL_INFO *
-LibFileSystemVolumeLabelInfo (
- IN EFI_FILE_HANDLE FHand
- )
-{
- EFI_STATUS Status;
- EFI_FILE_SYSTEM_VOLUME_LABEL_INFO *Buffer;
- UINTN BufferSize;
-
- //
- // Initialize for GrowBuffer loop
- //
-
- Buffer = NULL;
- BufferSize = SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO + 200;
-
- //
- // Call the real function
- //
-
- while (GrowBuffer (&Status, (VOID **) &Buffer, BufferSize)) {
- Status = FHand->GetInfo (
- FHand,
- &FileSystemVolumeLabelInfo,
- &BufferSize,
- Buffer
- );
- }
-
- return Buffer;
-}
-
-
-
-EFI_STATUS
-LibInstallProtocolInterfaces (
- IN OUT EFI_HANDLE *Handle,
- ...
- )
-{
- va_list args;
- EFI_STATUS Status;
- EFI_GUID *Protocol;
- VOID *Interface;
- EFI_TPL OldTpl;
- UINTN Index;
- EFI_HANDLE OldHandle;
-
- //
- // Syncronize with notifcations
- //
-
- OldTpl = BS->RaiseTPL(TPL_NOTIFY);
- OldHandle = *Handle;
-
- //
- // Install the protocol interfaces
- //
-
- Index = 0;
- Status = EFI_SUCCESS;
- va_start (args, Handle);
-
- while (!EFI_ERROR(Status)) {
-
- //
- // If protocol is NULL, then it's the end of the list
- //
-
- Protocol = va_arg(args, EFI_GUID *);
- if (!Protocol) {
- break;
- }
-
- Interface = va_arg(args, VOID *);
-
- //
- // Install it
- //
-
- DEBUG((D_INFO, "LibInstallProtocolInterface: %d %x\n", Protocol, Interface));
- Status = BS->InstallProtocolInterface (Handle, Protocol, EFI_NATIVE_INTERFACE, Interface);
- if (EFI_ERROR(Status)) {
- break;
- }
-
- Index += 1;
- }
-
- //
- // If there was an error, remove all the interfaces that were
- // installed without any errors
- //
-
- if (EFI_ERROR(Status)) {
- va_start (args, Handle);
- while (Index) {
-
- Protocol = va_arg(args, EFI_GUID *);
- Interface = va_arg(args, VOID *);
- BS->UninstallProtocolInterface (*Handle, Protocol, Interface);
-
- Index -= 1;
- }
-
- *Handle = OldHandle;
- }
-
- //
- // Done
- //
-
- BS->RestoreTPL(OldTpl);
- return Status;
-}
-
-
-VOID
-LibUninstallProtocolInterfaces (
- IN EFI_HANDLE Handle,
- ...
- )
-{
- va_list args;
- EFI_STATUS Status;
- EFI_GUID *Protocol;
- VOID *Interface;
-
-
- va_start (args, Handle);
- for (; ;) {
-
- //
- // If protocol is NULL, then it's the end of the list
- //
-
- Protocol = va_arg(args, EFI_GUID *);
- if (!Protocol) {
- break;
- }
-
- Interface = va_arg(args, VOID *);
-
- //
- // Uninstall it
- //
-
- Status = BS->UninstallProtocolInterface (Handle, Protocol, Interface);
- if (EFI_ERROR(Status)) {
- DEBUG((D_ERROR, "LibUninstallProtocolInterfaces: failed %g, %r\n", Protocol, Handle));
- }
- }
-}
-
-
-EFI_STATUS
-LibReinstallProtocolInterfaces (
- IN OUT EFI_HANDLE *Handle,
- ...
- )
-{
- va_list args;
- EFI_STATUS Status;
- EFI_GUID *Protocol;
- VOID *OldInterface, *NewInterface;
- EFI_TPL OldTpl;
- UINTN Index;
-
- //
- // Syncronize with notifcations
- //
-
- OldTpl = BS->RaiseTPL(TPL_NOTIFY);
-
- //
- // Install the protocol interfaces
- //
-
- Index = 0;
- Status = EFI_SUCCESS;
- va_start (args, Handle);
-
- while (!EFI_ERROR(Status)) {
-
- //
- // If protocol is NULL, then it's the end of the list
- //
-
- Protocol = va_arg(args, EFI_GUID *);
- if (!Protocol) {
- break;
- }
-
- OldInterface = va_arg(args, VOID *);
- NewInterface = va_arg(args, VOID *);
-
- //
- // Reinstall it
- //
-
- Status = BS->ReinstallProtocolInterface (Handle, Protocol, OldInterface, NewInterface);
- if (EFI_ERROR(Status)) {
- break;
- }
-
- Index += 1;
- }
-
- //
- // If there was an error, undo all the interfaces that were
- // reinstalled without any errors
- //
-
- if (EFI_ERROR(Status)) {
- va_start (args, Handle);
- while (Index) {
-
- Protocol = va_arg(args, EFI_GUID *);
- OldInterface = va_arg(args, VOID *);
- NewInterface = va_arg(args, VOID *);
-
- BS->ReinstallProtocolInterface (Handle, Protocol, NewInterface, OldInterface);
-
- Index -= 1;
- }
- }
-
- //
- // Done
- //
-
- BS->RestoreTPL(OldTpl);
- return Status;
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/lib.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/lib.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/lib.h (nonexistent)
@@ -1,88 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- lib.h
-
-Abstract:
-
- EFI library header files
-
-
-
-Revision History
-
---*/
-
-
-#include "efi.h"
-#include "efilib.h"
-#include "efirtlib.h"
-
-//
-// Include non architectural protocols
-//
-#include "efivar.h"
-#include "legacyboot.h"
-#include "intload.h"
-#include "vgaclass.h"
-#include "eficonsplit.h"
-#include "adapterdebug.h"
-#include "intload.h"
-
-#include "efigpt.h"
-#include "libsmbios.h"
-
-//
-// Prototypes
-//
-
-VOID
-InitializeGuid (
- VOID
- );
-
-INTN
-LibStubStriCmp (
- IN EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *S1,
- IN CHAR16 *S2
- );
-
-BOOLEAN
-LibStubMetaiMatch (
- IN EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *String,
- IN CHAR16 *Pattern
- );
-
-VOID
-LibStubStrLwrUpr (
- IN EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *Str
- );
-
-BOOLEAN
-LibMatchDevicePaths (
- IN EFI_DEVICE_PATH *Multi,
- IN EFI_DEVICE_PATH *Single
- );
-
-EFI_DEVICE_PATH *
-LibDuplicateDevicePathInstance (
- IN EFI_DEVICE_PATH *DevPath
- );
-
-
-//
-// Globals
-//
-extern BOOLEAN LibInitialized;
-extern BOOLEAN LibFwInstance;
-extern SIMPLE_TEXT_OUTPUT_INTERFACE *LibRuntimeDebugOut;
-extern EFI_UNICODE_COLLATION_INTERFACE *UnicodeInterface;
-extern EFI_UNICODE_COLLATION_INTERFACE LibStubUnicodeInterface;
-extern EFI_RAISE_TPL LibRuntimeRaiseTPL;
-extern EFI_RESTORE_TPL LibRuntimeRestoreTPL;
Index: g5/boot/arch/ia64/loader/gefi/lib/ia32/initplat.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/ia32/initplat.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/ia32/initplat.c (nonexistent)
@@ -1,28 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- initplat.c
-
-Abstract:
-
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-VOID
-InitializeLibPlatform (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-
-{
-}
-
Index: g5/boot/arch/ia64/loader/gefi/lib/ia32/math.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/ia32/math.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/ia32/math.c (nonexistent)
@@ -1,179 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- math.c
-
-Abstract:
-
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-//
-// Declare runtime functions
-//
-
-#ifdef RUNTIME_CODE
-#pragma RUNTIME_CODE(LShiftU64)
-#pragma RUNTIME_CODE(RShiftU64)
-#pragma RUNTIME_CODE(MultU64x32)
-#pragma RUNTIME_CODE(DivU64x32)
-#endif
-
-//
-//
-//
-
-UINT64
-LShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
- )
-// Left shift 64bit by 32bit and get a 64bit result
-{
-#ifdef __GNUC__
- return Operand << Count;
-#else
- UINT64 Result;
- _asm {
- mov eax, dword ptr Operand[0]
- mov edx, dword ptr Operand[4]
- mov ecx, Count
- and ecx, 63
-
- shld edx, eax, cl
- shl eax, cl
-
- cmp ecx, 32
- jc short ls10
-
- mov edx, eax
- xor eax, eax
-
-ls10:
- mov dword ptr Result[0], eax
- mov dword ptr Result[4], edx
- }
-
- return Result;
-#endif
-}
-
-UINT64
-RShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
- )
-// Right shift 64bit by 32bit and get a 64bit result
-{
-#ifdef __GNUC__
- return Operand >> Count;
-#else
- UINT64 Result;
- _asm {
- mov eax, dword ptr Operand[0]
- mov edx, dword ptr Operand[4]
- mov ecx, Count
- and ecx, 63
-
- shrd eax, edx, cl
- shr edx, cl
-
- cmp ecx, 32
- jc short rs10
-
- mov eax, edx
- xor edx, edx
-
-rs10:
- mov dword ptr Result[0], eax
- mov dword ptr Result[4], edx
- }
-
- return Result;
-#endif
-}
-
-
-UINT64
-MultU64x32 (
- IN UINT64 Multiplicand,
- IN UINTN Multiplier
- )
-// Multiple 64bit by 32bit and get a 64bit result
-{
-#ifdef __GNUC__
- return Multiplicand * Multiplier;
-#else
- UINT64 Result;
- _asm {
- mov eax, dword ptr Multiplicand[0]
- mul Multiplier
- mov dword ptr Result[0], eax
- mov dword ptr Result[4], edx
- mov eax, dword ptr Multiplicand[4]
- mul Multiplier
- add dword ptr Result[4], eax
- }
-
- return Result;
-#endif
-}
-
-UINT64
-DivU64x32 (
- IN UINT64 Dividend,
- IN UINTN Divisor,
- OUT UINTN *Remainder OPTIONAL
- )
-// divide 64bit by 32bit and get a 64bit result
-// N.B. only works for 31bit divisors!!
-{
-#ifdef __GNUC__
- if (Remainder)
- *Remainder = Dividend % Divisor;
- return Dividend / Divisor;
-#else
- UINT32 Rem;
- UINT32 bit;
-
- ASSERT (Divisor != 0);
- ASSERT ((Divisor >> 31) == 0);
-
- //
- // For each bit in the dividend
- //
-
- Rem = 0;
- for (bit=0; bit < 64; bit++) {
- _asm {
- shl dword ptr Dividend[0], 1 ; shift rem:dividend left one
- rcl dword ptr Dividend[4], 1
- rcl dword ptr Rem, 1
-
- mov eax, Rem
- cmp eax, Divisor ; Is Rem >= Divisor?
- cmc ; No - do nothing
- sbb eax, eax ; Else,
- sub dword ptr Dividend[0], eax ; set low bit in dividen
- and eax, Divisor ; and
- sub Rem, eax ; subtract divisor
- }
- }
-
- if (Remainder) {
- *Remainder = Rem;
- }
-
- return Dividend;
-#endif
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/hw.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/hw.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/hw.c (nonexistent)
@@ -1,132 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- hw.c
-
-Abstract:
-
- Debug library functions for Hardware IO access
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-EFI_STATUS
-InitializeGlobalIoDevice (
- IN EFI_DEVICE_PATH *DevicePath,
- IN EFI_GUID *Protocol,
- IN CHAR8 *ErrorStr,
- OUT EFI_DEVICE_IO_INTERFACE **GlobalIoFncs
- )
-/*++
-
-Routine Description:
-
- Check to see if DevicePath exists for a given Protocol. Return Error if it
- exists. Return GlobalIoFuncs set match the DevicePath
-
- Arguments:
-
- DevicePath - to operate on
- Protocol - to check the DevicePath against
- ErrorStr - ASCII string to display on error
- GlobalIoFncs - Returned with DeviceIoProtocol for the DevicePath
-
-Returns:
-
- Pass or Fail based on wether GlobalIoFncs where found
-
---*/
-{
- EFI_STATUS Status;
- EFI_HANDLE Handle;
-
- //
- // Check to see if this device path already has Protocol on it.
- // if so we are loading recursivly and should exit with an error
- //
- Status = BS->LocateDevicePath (Protocol, &DevicePath, &Handle);
- if (!EFI_ERROR(Status)) {
- DEBUG ((D_INIT, "Device Already Loaded for %a device\n", ErrorStr));
- return EFI_LOAD_ERROR;
- }
-
- Status = BS->LocateDevicePath (&DeviceIoProtocol, &DevicePath, &Handle);
- if (!EFI_ERROR(Status)) {
- Status = BS->HandleProtocol (Handle, &DeviceIoProtocol, (VOID*)GlobalIoFncs);
- }
-
- ASSERT (!EFI_ERROR(Status));
- return Status;
-}
-
-UINT32
-ReadPort (
- IN EFI_DEVICE_IO_INTERFACE *GlobalIoFncs,
- IN EFI_IO_WIDTH Width,
- IN UINTN Port
- )
-{
- UINT32 Data;
- EFI_STATUS Status;
-
- Status = GlobalIoFncs->Io.Read (GlobalIoFncs, Width, (UINT64)Port, 1, &Data);
- ASSERT(!EFI_ERROR(Status));
- return Data;
-}
-
-UINT32
-WritePort (
- IN EFI_DEVICE_IO_INTERFACE *GlobalIoFncs,
- IN EFI_IO_WIDTH Width,
- IN UINTN Port,
- IN UINTN Data
- )
-{
- EFI_STATUS Status;
-
- Status = GlobalIoFncs->Io.Write (GlobalIoFncs, Width, (UINT64)Port, 1, &Data);
- ASSERT(!EFI_ERROR(Status));
- return (UINT32)Data;
-}
-
-UINT32
-ReadPciConfig (
- IN EFI_DEVICE_IO_INTERFACE *GlobalIoFncs,
- IN EFI_IO_WIDTH Width,
- IN UINTN Address
- )
-{
- UINT32 Data;
- EFI_STATUS Status;
-
- Status = GlobalIoFncs->Pci.Read (GlobalIoFncs, Width, (UINT64)Address, 1, &Data);
- ASSERT(!EFI_ERROR(Status));
- return Data;
-}
-
-UINT32
-WritePciConfig (
- IN EFI_DEVICE_IO_INTERFACE *GlobalIoFncs,
- IN EFI_IO_WIDTH Width,
- IN UINTN Address,
- IN UINTN Data
- )
-{
- EFI_STATUS Status;
-
- Status = GlobalIoFncs->Pci.Write (GlobalIoFncs, Width, (UINT64)Address, 1, &Data);
- ASSERT(!EFI_ERROR(Status));
- return (UINT32)Data;
-}
-
-
-
Index: g5/boot/arch/ia64/loader/gefi/lib/event.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/event.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/event.c (nonexistent)
@@ -1,149 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- event.c
-
-Abstract:
-
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-EFI_EVENT
-LibCreateProtocolNotifyEvent (
- IN EFI_GUID *ProtocolGuid,
- IN EFI_TPL NotifyTpl,
- IN EFI_EVENT_NOTIFY NotifyFunction,
- IN VOID *NotifyContext,
- OUT VOID *Registration
- )
-{
- EFI_STATUS Status;
- EFI_EVENT Event;
-
- //
- // Create the event
- //
-
- Status = BS->CreateEvent (
- EVT_NOTIFY_SIGNAL,
- NotifyTpl,
- NotifyFunction,
- NotifyContext,
- &Event
- );
- ASSERT (!EFI_ERROR(Status));
-
- //
- // Register for protocol notifactions on this event
- //
-
- Status = BS->RegisterProtocolNotify (
- ProtocolGuid,
- Event,
- Registration
- );
-
- ASSERT (!EFI_ERROR(Status));
-
- //
- // Kick the event so we will perform an initial pass of
- // current installed drivers
- //
-
- BS->SignalEvent (Event);
- return Event;
-}
-
-
-EFI_STATUS
-WaitForSingleEvent (
- IN EFI_EVENT Event,
- IN UINT64 Timeout OPTIONAL
- )
-{
- EFI_STATUS Status;
- UINTN Index;
- EFI_EVENT TimerEvent;
- EFI_EVENT WaitList[2];
-
- if (Timeout) {
- //
- // Create a timer event
- //
-
- Status = BS->CreateEvent (EVT_TIMER, 0, NULL, NULL, &TimerEvent);
- if (!EFI_ERROR(Status)) {
-
- //
- // Set the timer event
- //
-
- BS->SetTimer (TimerEvent, TimerRelative, Timeout);
-
- //
- // Wait for the original event or the timer
- //
-
- WaitList[0] = Event;
- WaitList[1] = TimerEvent;
- Status = BS->WaitForEvent (2, WaitList, &Index);
- BS->CloseEvent (TimerEvent);
-
- //
- // If the timer expired, change the return to timed out
- //
-
- if (!EFI_ERROR(Status) && Index == 1) {
- Status = EFI_TIMEOUT;
- }
- }
-
- } else {
-
- //
- // No timeout... just wait on the event
- //
-
- Status = BS->WaitForEvent (1, &Event, &Index);
- ASSERT (!EFI_ERROR(Status));
- ASSERT (Index == 0);
- }
-
- return Status;
-}
-
-VOID
-WaitForEventWithTimeout (
- IN EFI_EVENT Event,
- IN UINTN Timeout,
- IN UINTN Row,
- IN UINTN Column,
- IN CHAR16 *String,
- IN EFI_INPUT_KEY TimeoutKey,
- OUT EFI_INPUT_KEY *Key
- )
-{
- EFI_STATUS Status;
-
- do {
- PrintAt (Column, Row, String, Timeout);
- Status = WaitForSingleEvent (Event, 10000000);
- if (Status == EFI_SUCCESS) {
- if (!EFI_ERROR(ST->ConIn->ReadKeyStroke (ST->ConIn, Key))) {
- return;
- }
- }
- } while (Timeout > 0);
- *Key = TimeoutKey;
-}
-
Index: g5/boot/arch/ia64/loader/gefi/lib/ia64/math.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/ia64/math.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/ia64/math.c (nonexistent)
@@ -1,86 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- math.c
-
-Abstract:
-
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-//
-// Declare runtime functions
-//
-
-#ifdef RUNTIME_CODE
-#pragma RUNTIME_CODE(LShiftU64)
-#pragma RUNTIME_CODE(RShiftU64)
-#pragma RUNTIME_CODE(MultU64x32)
-#pragma RUNTIME_CODE(DivU64x32)
-#endif
-
-//
-//
-//
-
-
-
-
-UINT64
-LShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
- )
-// Left shift 64bit by 32bit and get a 64bit result
-{
- return Operand << Count;
-}
-
-UINT64
-RShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
- )
-// Right shift 64bit by 32bit and get a 64bit result
-{
- return Operand >> Count;
-}
-
-
-UINT64
-MultU64x32 (
- IN UINT64 Multiplicand,
- IN UINTN Multiplier
- )
-// Multiple 64bit by 32bit and get a 64bit result
-{
- return Multiplicand * Multiplier;
-}
-
-UINT64
-DivU64x32 (
- IN UINT64 Dividend,
- IN UINTN Divisor,
- OUT UINTN *Remainder OPTIONAL
- )
-// divide 64bit by 32bit and get a 64bit result
-// N.B. only works for 31bit divisors!!
-{
- ASSERT (Divisor != 0);
-
- if (Remainder) {
- *Remainder = Dividend % Divisor;
- }
-
- return Dividend / Divisor;
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/ia64/salpal.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/ia64/salpal.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/ia64/salpal.c (nonexistent)
@@ -1,335 +0,0 @@
-/*++
-
-Copyright (c) 1999 Intel Corporation
-
-Module Name:
-
- salpal.c
-
-Abstract:
-
- Functions to make SAL and PAL proc calls
-
-Revision History
-
---*/
-#include "lib.h"
-#include "palproc.h"
-#include "salproc.h"
-/*++
-
-Copyright (c) 1999 Intel Corporation
-
-Module Name:
-
- EfiRtLib.h
-
-Abstract:
-
- EFI Runtime library functions
-
-
-
-Revision History
-
---*/
-
-#include "efi.h"
-#include "efilib.h"
-
-rArg
-MakeStaticPALCall (
- IN UINT64 PALPROCPtr,
- IN UINT64 Arg1,
- IN UINT64 Arg2,
- IN UINT64 Arg3,
- IN UINT64 Arg4
- );
-
-rArg
-MakeStackedPALCall (
- IN UINT64 PALPROCPtr,
- IN UINT64 Arg1,
- IN UINT64 Arg2,
- IN UINT64 Arg3,
- IN UINT64 Arg4
- );
-
-
-PLABEL SalProcPlabel;
-PLABEL PalProcPlabel;
-CALL_SAL_PROC GlobalSalProc;
-CALL_PAL_PROC GlobalPalProc;
-
-VOID
-LibInitSalAndPalProc (
- OUT PLABEL *SalPlabel,
- OUT UINT64 *PalEntry
- )
-{
- SAL_SYSTEM_TABLE_ASCENDING_ORDER *SalSystemTable;
- EFI_STATUS Status;
-
- GlobalSalProc = NULL;
- GlobalPalProc = NULL;
-
- Status = LibGetSystemConfigurationTable(&SalSystemTableGuid, (VOID **)&SalSystemTable);
- if (EFI_ERROR(Status)) {
- return;
- }
-
- //
- // BugBug: Add code to test checksum on the Sal System Table
- //
- if (SalSystemTable->Entry0.Type != 0) {
- return;
- }
-
- SalProcPlabel.ProcEntryPoint = SalSystemTable->Entry0.SalProcEntry;
- SalProcPlabel.GP = SalSystemTable->Entry0.GlobalDataPointer;
- GlobalSalProc = (CALL_SAL_PROC)&SalProcPlabel.ProcEntryPoint;
-
- //
- // Need to check the PAL spec to make sure I'm not responsible for
- // storing more state.
- // We are passing in a Plabel that should be ignorred by the PAL. Call
- // this way will cause use to retore our gp after the PAL returns.
- //
- PalProcPlabel.ProcEntryPoint = SalSystemTable->Entry0.PalProcEntry;
- PalProcPlabel.GP = SalSystemTable->Entry0.GlobalDataPointer;
- GlobalPalProc = (CALL_PAL_PROC)PalProcPlabel.ProcEntryPoint;
-
- *PalEntry = PalProcPlabel.ProcEntryPoint;
- *SalPlabel = SalProcPlabel;
-}
-
-EFI_STATUS
-LibGetSalIoPortMapping (
- OUT UINT64 *IoPortMapping
- )
-/*++
-
- Get the IO Port Map from the SAL System Table.
- DO NOT USE THIS TO DO YOU OWN IO's!!!!!!!!!!!!
- Only use this for getting info, or initing the built in EFI IO abstraction.
- Always use the EFI Device IO protoocl to access IO space.
-
---*/
-{
- SAL_SYSTEM_TABLE_ASCENDING_ORDER *SalSystemTable;
- SAL_ST_MEMORY_DESCRIPTOR_ENTRY *SalMemDesc;
- EFI_STATUS Status;
-
- Status = LibGetSystemConfigurationTable(&SalSystemTableGuid, (VOID **)&SalSystemTable);
- if (EFI_ERROR(Status)) {
- return EFI_UNSUPPORTED;
- }
-
- //
- // BugBug: Add code to test checksum on the Sal System Table
- //
- if (SalSystemTable->Entry0.Type != 0) {
- return EFI_UNSUPPORTED;
- }
-
- //
- // The SalSystemTable pointer includes the Type 0 entry.
- // The SalMemDesc is Type 1 so it comes next.
- //
- SalMemDesc = (SAL_ST_MEMORY_DESCRIPTOR_ENTRY *)(SalSystemTable + 1);
- while (SalMemDesc->Type == SAL_ST_MEMORY_DESCRIPTOR) {
- if (SalMemDesc->MemoryType == SAL_IO_PORT_MAPPING) {
- *IoPortMapping = SalMemDesc->PhysicalMemoryAddress;
- return EFI_SUCCESS;
- }
- SalMemDesc++;
- }
- return EFI_UNSUPPORTED;
-}
-
-EFI_STATUS
-LibGetSalIpiBlock (
- OUT UINT64 *IpiBlock
- )
-/*++
-
- Get the IPI block from the SAL system table
-
---*/
-{
- SAL_SYSTEM_TABLE_ASCENDING_ORDER *SalSystemTable;
- SAL_ST_MEMORY_DESCRIPTOR_ENTRY *SalMemDesc;
- EFI_STATUS Status;
-
- Status = LibGetSystemConfigurationTable(&SalSystemTableGuid, (VOID*)&SalSystemTable);
- if (EFI_ERROR(Status)) {
- return EFI_UNSUPPORTED;
- }
-
- //
- // BugBug: Add code to test checksum on the Sal System Table
- //
- if (SalSystemTable->Entry0.Type != 0) {
- return EFI_UNSUPPORTED;
- }
-
- //
- // The SalSystemTable pointer includes the Type 0 entry.
- // The SalMemDesc is Type 1 so it comes next.
- //
- SalMemDesc = (SAL_ST_MEMORY_DESCRIPTOR_ENTRY *)(SalSystemTable + 1);
- while (SalMemDesc->Type == SAL_ST_MEMORY_DESCRIPTOR) {
- if (SalMemDesc->MemoryType == SAL_SAPIC_IPI_BLOCK ) {
- *IpiBlock = SalMemDesc->PhysicalMemoryAddress;
- return EFI_SUCCESS;
- }
- SalMemDesc++;
- }
- return EFI_UNSUPPORTED;
-}
-
-EFI_STATUS
-LibGetSalWakeupVector (
- OUT UINT64 *WakeVector
- )
-/*++
-
-Get the wakeup vector from the SAL system table
-
---*/
-{
- SAL_ST_AP_WAKEUP_DECRIPTOR *ApWakeUp;
-
- ApWakeUp = LibSearchSalSystemTable (SAL_ST_AP_WAKEUP);
- if (!ApWakeUp) {
- *WakeVector = -1;
- return EFI_UNSUPPORTED;
- }
- *WakeVector = ApWakeUp->ExternalInterruptVector;
- return EFI_SUCCESS;
-}
-
-VOID *
-LibSearchSalSystemTable (
- IN UINT8 EntryType
- )
-{
- EFI_STATUS Status;
- UINT8 *SalTableHack;
- SAL_SYSTEM_TABLE_ASCENDING_ORDER *SalSystemTable;
- UINT16 EntryCount;
- UINT16 Count;
-
- Status = LibGetSystemConfigurationTable(&SalSystemTableGuid, (VOID*)&SalSystemTable);
- if (EFI_ERROR(Status)) {
- return NULL;
- }
-
- EntryCount = SalSystemTable->Header.EntryCount;
- if (EntryCount == 0) {
- return NULL;
- }
- //
- // BugBug: Add code to test checksum on the Sal System Table
- //
-
- SalTableHack = (UINT8 *)&SalSystemTable->Entry0;
- for (Count = 0; Count < EntryCount ;Count++) {
- if (*SalTableHack == EntryType) {
- return (VOID *)SalTableHack;
- }
- switch (*SalTableHack) {
- case SAL_ST_ENTRY_POINT:
- SalTableHack += 48;
- break;
- case SAL_ST_MEMORY_DESCRIPTOR:
- SalTableHack += 32;
- break;
- case SAL_ST_PLATFORM_FEATURES:
- SalTableHack += 16;
- break;
- case SAL_ST_TR_USAGE:
- SalTableHack += 32;
- break;
- case SAL_ST_PTC:
- SalTableHack += 16;
- break;
- case SAL_ST_AP_WAKEUP:
- SalTableHack += 16;
- break;
- default:
- ASSERT(FALSE);
- break;
- }
- }
- return NULL;
-}
-
-VOID
-LibSalProc (
- IN UINT64 Arg1,
- IN UINT64 Arg2,
- IN UINT64 Arg3,
- IN UINT64 Arg4,
- IN UINT64 Arg5,
- IN UINT64 Arg6,
- IN UINT64 Arg7,
- IN UINT64 Arg8,
- OUT rArg *Results OPTIONAL
- )
-{
- rArg ReturnValue;
-
- ReturnValue.p0 = -3; // SAL status return completed with error
- if (GlobalSalProc) {
- ReturnValue = GlobalSalProc(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8);
- }
-
- if (Results) {
- CopyMem (Results, &ReturnValue, sizeof(rArg));
- }
-}
-
-VOID
-LibPalProc (
- IN UINT64 Arg1, // Pal Proc index
- IN UINT64 Arg2,
- IN UINT64 Arg3,
- IN UINT64 Arg4,
- OUT rArg *Results OPTIONAL
- )
-{
-
- rArg ReturnValue;
-
- ReturnValue.p0 = -3; // PAL status return completed with error
-
- //
- // check for valid PalProc entry point
- //
-
- if (!GlobalPalProc) {
- if (Results)
- CopyMem (Results, &ReturnValue, sizeof(rArg));
- return;
- }
-
- //
- // check if index falls within stacked or static register calling conventions
- // and call appropriate Pal stub call
- //
-
- if (((Arg1 >=255) && (Arg1 <=511)) ||
- ((Arg1 >=768) && (Arg1 <=1023))) {
- ReturnValue = MakeStackedPALCall((UINT64)GlobalPalProc,Arg1,Arg2,Arg3,Arg4);
- }
- else {
- ReturnValue = MakeStaticPALCall((UINT64)GlobalPalProc,Arg1,Arg2,Arg3,Arg4);
- }
-
- if (Results)
- CopyMem (Results, &ReturnValue, sizeof(rArg));
-
- return;
-}
-
Index: g5/boot/arch/ia64/loader/gefi/lib/ia64/palproc.S
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/ia64/palproc.S (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/ia64/palproc.S (nonexistent)
@@ -1,170 +0,0 @@
-//++
-// Copyright (c) 1996-99 Intel Corp.
-// All Rights Reserved
-//
-// INTEL CORPORATION PROPRIETARY INFORMATION
-//
-// This software is supplied under the terms of a license
-// agreement or nondisclosure agreement with Intel Corpo-
-// ration and may not be copied or disclosed except in
-// accordance with the terms of that agreement.
-//
-//
-//
-// Module Name:
-//
-// palproc.s
-//
-// Abstract:
-//
-// Contains an implementation for making PAL PROC calls on
-// IA-64 architecture.
-//
-//
-//
-// Revision History:
-//
-//--
-
- .file "palproc.s"
-
-#include "palproc.h"
-
-
-//-----------------------------------------------------------------------------
-//++
-// MakeStaticPALCall
-//
-// This routine is called whenever an architected static calling convention
-// based PAL call is to be made. This call does use RSE actually, but our policy
-// in making static PAL calls before memory is available is to make sure that
-// we do not nest too deep and allocate beyond 96 banked registers. In other
-// words we carefully code calls and control flow before memory is available.
-//
-// Arguments : All parameters set up to do static PAL call.
-//
-// On Entry :
-//
-// Return Value:
-//
-// As per static calling conventions.
-//
-//--
-//---------------------------------------------------------------------------
-PROCEDURE_ENTRY(MakeStaticPALCall)
-
- NESTED_SETUP (5,8,0,0)
- mov loc3 = b5
- mov loc4 = r2
- mov loc7 = r1;;
-
- movl loc6 = PAL_MC_CLEAR_LOG
- mov r2 = psr;;
- mov loc5 = r2
-
- cmp.eq p6,p7 = r28,loc6;;
- (p7)movl loc6 = PAL_MC_DYNAMIC_STATE;;
- (p7)cmp.eq p6,p7 = r28,loc6;;
-
- (p7)movl loc6 = PAL_MC_ERROR_INFO;;
- (p7)cmp.eq p6,p7 = r28,loc6;;
-
- (p7)movl loc6 = PAL_MC_RESUME;;
- (p7)cmp.eq p6,p7 = r28,loc6
-
- mov loc6 = 0x1;;
- (p7)dep r2 = loc6,r2,13,1;; // psr.ic = 1
-
-// p6 will be true, if it is one of the MCHK calls. There has been lots of debate
-// on psr.ic for these values. For now, do not do any thing to psr.ic
-
-// (p6)dep r2 = r0,r2,13,1;; // psr.ic = 0
- dep r2 = r0,r2,14,1;; // psr.i = 0
-
- mov psr.l = r2
- srlz.d;; // Needs data serailization.
- srlz.i;; // Needs instruction serailization.
-
-StaticGetPALLocalIP:
- mov loc2 = ip;;
- add loc2 = StaticComeBackFromPALCall - StaticGetPALLocalIP,loc2;;
- mov b0 = loc2 // return address after Pal call
- mov r28 = in1 // get the input parameters to PAL call
- mov r29 = in2
- mov r30 = in3;;
- mov r31 = in4
- mov b5 = in0;; // get the PalProcEntrypt from input
- br.sptk b5 // Take the plunge.
-
-StaticComeBackFromPALCall:
-
- mov psr.l = loc5;;
- srlz.d;; // Needs data serailization.
- srlz.i;; // Needs instruction serailization.
-
- mov b5 = loc3
- mov r2 = loc4
- mov r1 = loc7
-
- NESTED_RETURN
-
-PROCEDURE_EXIT(MakeStaticPALCall)
-
-
-//-----------------------------------------------------------------------------
-//++
-// MakeStackedPALCall
-//
-// This routine is called whenever an architected stacked calling convention
-// based PAL call is to be made. This call is made after memory is available.
-// Although stacked calls could be made directly from 'C', there is a PAL
-// requirement which forces the index to be in GR28 and hence this stub is
-// needed
-//
-// Arguments : All parameters set up to do stacted PAL call.
-//
-// On Entry :
-// in0: PAL_PROC entrypoint
-// in1-in4 : PAL_PROC arguments
-//
-// Return Value:
-//
-// As per stacked calling conventions.
-//
-//--
-//---------------------------------------------------------------------------
-PROCEDURE_ENTRY(MakeStackedPALCall)
-
- NESTED_SETUP (5,8,4,0)
- mov loc3 = b5
- mov loc4 = r2
- mov loc7 = r1
- mov r2 = psr;;
- mov loc5 = r2;;
- dep r2 = r0,r2,14,1;; // psr.i = 0
- mov psr.l = r2
- srlz.d;; // Needs data serailization.
- srlz.i;; // Needs instruction serailization.
-
-StackedGetPALLocalIP:
- mov r28 = in1 // get the input parameters to PAL call
- mov out0 = in1
- mov out1 = in2;;
- mov out2 = in3
- mov out3 = in4
- mov b5 = in0;; // get the PalProcEntrypt from input
- br.call.dpnt b0=b5;; // Take the plunge.
-
-StackedComeBackFromPALCall:
-
- mov psr.l = loc5;;
- srlz.d;; // Needs data serailization.
- srlz.i;; // Needs instruction serailization.
- mov b5 = loc3
- mov r2 = loc4
- mov r1 = loc7
-
- NESTED_RETURN
-
-PROCEDURE_EXIT(MakeStackedPALCall)
-
Index: g5/boot/arch/ia64/loader/gefi/lib/ia64/initplat.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/ia64/initplat.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/ia64/initplat.c (nonexistent)
@@ -1,31 +0,0 @@
-/*++
-
-Copyright (c) 1999 Intel Corporation
-
-Module Name:
-
- initplat.c
-
-Abstract:
-
- Functions to make SAL and PAL proc calls
-
-Revision History
-
---*/
-#include "lib.h"
-
-//#include "palproc.h"
-
-VOID
-InitializeLibPlatform (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-
-{
- PLABEL SalPlabel;
- UINT64 PalEntry;
-
- LibInitSalAndPalProc (&SalPlabel, &PalEntry);
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/ia64/palproc.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/ia64/palproc.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/ia64/palproc.h (nonexistent)
@@ -1,60 +0,0 @@
-//
-//
-// Copyright (c) 1996-99 Intel Corp.
-// All Rights Reserved
-//
-// INTEL CORPORATION PROPRIETARY INFORMATION
-//
-// This software is supplied under the terms of a license
-// agreement or nondisclosure agreement with Intel Corpo-
-// ration and may not be copied or disclosed except in
-// accordance with the terms of that agreement.
-//
-//
-//
-//Module Name:
-//
-// palproc.h
-//
-//Abstract:
-//
-// This module contains generic macros for an IA64 assembly writer.
-//
-//
-//Revision History
-//
-
-#ifndef _PALPROC_H
-#define _PALPROC_H
-
-#define PROCEDURE_ENTRY(name) .##text; \
- .##type name, @function; \
- .##global name; \
- .##proc name; \
-name:
-
-#define PROCEDURE_EXIT(name) .##endp name
-
-// Note: use of NESTED_SETUP requires number of locals (l) >= 3
-
-#define NESTED_SETUP(i,l,o,r) \
- alloc loc1=ar##.##pfs,i,l,o,r ;\
- mov loc0=b0
-
-#define NESTED_RETURN \
- mov b0=loc0 ;\
- mov ar##.##pfs=loc1 ;;\
- br##.##ret##.##dpnt b0;;
-
-
-// defines needed in palproc.s
-
-#define PAL_MC_CLEAR_LOG 0x0015
-#define PAL_MC_DRAIN 0x0016
-#define PAL_MC_EXPECTED 0x0017
-#define PAL_MC_DYNAMIC_STATE 0x0018
-#define PAL_MC_ERROR_INFO 0x0019
-#define PAL_MC_RESUME 0x001a
-#define PAL_MC_REGISTER_MEM 0x001b
-
-#endif // _PALPROC_H
Index: g5/boot/arch/ia64/loader/gefi/lib/debug.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/debug.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/debug.c (nonexistent)
@@ -1,43 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- debug.c
-
-Abstract:
-
- Debug library functions
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-
-//
-// Declare runtime functions
-//
-
-//
-//
-//
-
-INTN
-DbgAssert (
- IN CHAR8 *FileName,
- IN INTN LineNo,
- IN CHAR8 *Description
- )
-{
- DbgPrint (D_ERROR, (CHAR8 *)"%EASSERT FAILED: %a(%d): %a%N\n", FileName, LineNo, Description);
-
- BREAKPOINT();
- return 0;
-}
-
Index: g5/boot/arch/ia64/loader/gefi/lib/lock.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/lock.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/lock.c (nonexistent)
@@ -1,107 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- lock.c
-
-Abstract:
-
- Implements FLOCK
-
-
-
-Revision History
-
---*/
-
-
-#include "lib.h"
-
-
-VOID
-InitializeLock (
- IN OUT FLOCK *Lock,
- IN EFI_TPL Priority
- )
-/*++
-
-Routine Description:
-
- Initialize a basic mutual exclusion lock. Each lock
- provides mutual exclusion access at it's task priority
- level. Since there is no-premption (at any TPL) or
- multiprocessor support, acquiring the lock only consists
- of raising to the locks TPL.
-
- Note on a debug build the lock is acquired and released
- to help ensure proper usage.
-
-Arguments:
-
- Lock - The FLOCK structure to initialize
-
- Priority - The task priority level of the lock
-
-
-Returns:
-
- An initialized F Lock structure.
-
---*/
-{
- Lock->Tpl = Priority;
- Lock->OwnerTpl = 0;
- Lock->Lock = 0;
-}
-
-
-VOID
-AcquireLock (
- IN FLOCK *Lock
- )
-/*++
-
-Routine Description:
-
- Raising to the task priority level of the mutual exclusion
- lock, and then acquires ownership of the lock.
-
-Arguments:
-
- Lock - The lock to acquire
-
-Returns:
-
- Lock owned
-
---*/
-{
- RtAcquireLock (Lock);
-}
-
-
-VOID
-ReleaseLock (
- IN FLOCK *Lock
- )
-/*++
-
-Routine Description:
-
- Releases ownership of the mutual exclusion lock, and
- restores the previous task priority level.
-
-Arguments:
-
- Lock - The lock to release
-
-Returns:
-
- Lock unowned
-
---*/
-{
- RtReleaseLock (Lock);
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/guid.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/guid.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/guid.c (nonexistent)
@@ -1,175 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- misc.c
-
-Abstract:
-
- Misc EFI support functions
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-//
-// Additional Known guids
-//
-
-#define SHELL_INTERFACE_PROTOCOL \
- { 0x47c7b223, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-#define ENVIRONMENT_VARIABLE_ID \
- { 0x47c7b224, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-#define DEVICE_PATH_MAPPING_ID \
- { 0x47c7b225, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-#define PROTOCOL_ID_ID \
- { 0x47c7b226, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-#define ALIAS_ID \
- { 0x47c7b227, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-static EFI_GUID ShellInterfaceProtocol = SHELL_INTERFACE_PROTOCOL;
-static EFI_GUID SEnvId = ENVIRONMENT_VARIABLE_ID;
-static EFI_GUID SMapId = DEVICE_PATH_MAPPING_ID;
-static EFI_GUID SProtId = PROTOCOL_ID_ID;
-static EFI_GUID SAliasId = ALIAS_ID;
-
-static struct {
- EFI_GUID *Guid;
- WCHAR *GuidName;
-} KnownGuids[] = {
- { &NullGuid, L"G0"},
- { &EfiGlobalVariable, L"Efi"},
-
- { &VariableStoreProtocol, L"varstore"},
- { &DevicePathProtocol, L"dpath"},
- { &LoadedImageProtocol, L"image"},
- { &TextInProtocol, L"txtin"},
- { &TextOutProtocol, L"txtout"},
- { &BlockIoProtocol, L"blkio"},
- { &DiskIoProtocol, L"diskio"},
- { &FileSystemProtocol, L"fs"},
- { &LoadFileProtocol, L"load"},
- { &DeviceIoProtocol, L"DevIo"},
-
- { &GenericFileInfo, L"GenFileInfo"},
- { &FileSystemInfo, L"FileSysInfo"},
-
- { &UnicodeCollationProtocol, L"unicode"},
- { &LegacyBootProtocol, L"LegacyBoot"},
- { &SerialIoProtocol, L"serialio"},
- { &VgaClassProtocol, L"vgaclass"},
- { &SimpleNetworkProtocol, L"net"},
- { &NetworkInterfaceIdentifierProtocol, L"nii"},
- { &PxeBaseCodeProtocol, L"pxebc"},
- { &PxeCallbackProtocol, L"pxecb"},
-
- { &VariableStoreProtocol, L"varstore"},
- { &LegacyBootProtocol, L"LegacyBoot"},
- { &VgaClassProtocol, L"VgaClass"},
- { &TextOutSpliterProtocol, L"TxtOutSplit"},
- { &ErrorOutSpliterProtocol, L"ErrOutSplit"},
- { &TextInSpliterProtocol, L"TxtInSplit"},
- { &PcAnsiProtocol, L"PcAnsi"},
- { &Vt100Protocol, L"Vt100"},
- { &UnknownDevice, L"Unknown Device"},
-
- { &EfiPartTypeSystemPartitionGuid, L"ESP"},
- { &EfiPartTypeLegacyMbrGuid, L"GPT MBR"},
-
- { &ShellInterfaceProtocol, L"ShellInt"},
- { &SEnvId, L"SEnv"},
- { &SProtId, L"ShellProtId"},
- { &SMapId, L"ShellDevPathMap"},
- { &SAliasId, L"ShellAlias"},
-
- { NULL }
-};
-
-//
-//
-//
-
-LIST_ENTRY GuidList;
-
-
-VOID
-InitializeGuid (
- VOID
- )
-{
-}
-
-INTN
-CompareGuid(
- IN EFI_GUID *Guid1,
- IN EFI_GUID *Guid2
- )
-/*++
-
-Routine Description:
-
- Compares to GUIDs
-
-Arguments:
-
- Guid1 - guid to compare
- Guid2 - guid to compare
-
-Returns:
- = 0 if Guid1 == Guid2
-
---*/
-{
- return RtCompareGuid (Guid1, Guid2);
-}
-
-
-VOID
-GuidToString (
- OUT CHAR16 *Buffer,
- IN EFI_GUID *Guid
- )
-{
-
- UINTN Index;
-
- //
- // Else, (for now) use additional internal function for mapping guids
- //
-
- for (Index=0; KnownGuids[Index].Guid; Index++) {
- if (CompareGuid(Guid, KnownGuids[Index].Guid) == 0) {
- SPrint (Buffer, 0, KnownGuids[Index].GuidName);
- return ;
- }
- }
-
- //
- // Else dump it
- //
-
- SPrint (Buffer, 0, L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
- Guid->Data1,
- Guid->Data2,
- Guid->Data3,
- Guid->Data4[0],
- Guid->Data4[1],
- Guid->Data4[2],
- Guid->Data4[3],
- Guid->Data4[4],
- Guid->Data4[5],
- Guid->Data4[6],
- Guid->Data4[7]
- );
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/error.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/error.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/error.c (nonexistent)
@@ -1,76 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- error.c
-
-Abstract:
-
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-struct {
- EFI_STATUS Code;
- WCHAR *Desc;
-} ErrorCodeTable[] = {
- { EFI_SUCCESS, L"Success"},
- { EFI_LOAD_ERROR, L"Load Error"},
- { EFI_INVALID_PARAMETER, L"Invalid Parameter"},
- { EFI_UNSUPPORTED, L"Unsupported"},
- { EFI_BAD_BUFFER_SIZE, L"Bad Buffer Size"},
- { EFI_BUFFER_TOO_SMALL, L"Buffer Too Small"},
- { EFI_NOT_READY, L"Not Ready"},
- { EFI_DEVICE_ERROR, L"Device Error"},
- { EFI_WRITE_PROTECTED, L"Write Protected"},
- { EFI_OUT_OF_RESOURCES, L"Out of Resources"},
- { EFI_VOLUME_CORRUPTED, L"Volume Corrupt"},
- { EFI_VOLUME_FULL, L"Volume Full"},
- { EFI_NO_MEDIA, L"No Media"},
- { EFI_MEDIA_CHANGED, L"Media changed"},
- { EFI_NOT_FOUND, L"Not Found"},
- { EFI_ACCESS_DENIED, L"Access Denied"},
- { EFI_NO_RESPONSE, L"No Response"},
- { EFI_NO_MAPPING, L"No mapping"},
- { EFI_TIMEOUT, L"Time out"},
- { EFI_NOT_STARTED, L"Not started"},
- { EFI_ALREADY_STARTED, L"Already started"},
- { EFI_ABORTED, L"Aborted"},
- { EFI_ICMP_ERROR, L"ICMP Error"},
- { EFI_TFTP_ERROR, L"TFTP Error"},
- { EFI_PROTOCOL_ERROR, L"Protocol Error"},
-
- // warnings
- { EFI_WARN_UNKOWN_GLYPH, L"Warning Unknown Glyph"},
- { EFI_WARN_DELETE_FAILURE, L"Warning Delete Failure"},
- { EFI_WARN_WRITE_FAILURE, L"Warning Write Failure"},
- { EFI_WARN_BUFFER_TOO_SMALL, L"Warning Buffer Too Small"},
- { 0, NULL}
-} ;
-
-
-VOID
-StatusToString (
- OUT CHAR16 *Buffer,
- IN EFI_STATUS Status
- )
-{
- UINTN Index;
-
- for (Index = 0; ErrorCodeTable[Index].Desc; Index +=1) {
- if (ErrorCodeTable[Index].Code == Status) {
- StrCpy (Buffer, ErrorCodeTable[Index].Desc);
- return;
- }
- }
-
- SPrint (Buffer, 0, L"%X", Status);
-}
Index: g5/boot/arch/ia64/loader/gefi/lib/misc.c
===================================================================
--- g5/boot/arch/ia64/loader/gefi/lib/misc.c (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/lib/misc.c (nonexistent)
@@ -1,514 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- misc.c
-
-Abstract:
-
-
-
-
-Revision History
-
---*/
-
-#include "lib.h"
-
-
-//
-//
-//
-
-VOID *
-AllocatePool (
- IN UINTN Size
- )
-{
- EFI_STATUS Status;
- VOID *p;
-
- Status = BS->AllocatePool (PoolAllocationType, Size, &p);
- if (EFI_ERROR(Status)) {
- DEBUG((D_ERROR, "AllocatePool: out of pool %x\n", Status));
- p = NULL;
- }
- return p;
-}
-
-VOID *
-AllocateZeroPool (
- IN UINTN Size
- )
-{
- VOID *p;
-
- p = AllocatePool (Size);
- if (p) {
- ZeroMem (p, Size);
- }
-
- return p;
-}
-
-VOID *
-ReallocatePool (
- IN VOID *OldPool,
- IN UINTN OldSize,
- IN UINTN NewSize
- )
-{
- VOID *NewPool;
-
- NewPool = NULL;
- if (NewSize) {
- NewPool = AllocatePool (NewSize);
- }
-
- if (OldPool) {
- if (NewPool) {
- CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
- }
-
- FreePool (OldPool);
- }
-
- return NewPool;
-}
-
-
-VOID
-FreePool (
- IN VOID *Buffer
- )
-{
- BS->FreePool (Buffer);
-}
-
-
-
-VOID
-ZeroMem (
- IN VOID *Buffer,
- IN UINTN Size
- )
-{
- RtZeroMem (Buffer, Size);
-}
-
-VOID
-SetMem (
- IN VOID *Buffer,
- IN UINTN Size,
- IN UINT8 Value
- )
-{
- RtSetMem (Buffer, Size, Value);
-}
-
-VOID
-CopyMem (
- IN VOID *Dest,
- IN VOID *Src,
- IN UINTN len
- )
-{
- RtCopyMem (Dest, Src, len);
-}
-
-INTN
-CompareMem (
- IN VOID *Dest,
- IN VOID *Src,
- IN UINTN len
- )
-{
- return RtCompareMem (Dest, Src, len);
-}
-
-BOOLEAN
-GrowBuffer(
- IN OUT EFI_STATUS *Status,
- IN OUT VOID **Buffer,
- IN UINTN BufferSize
- )
-/*++
-
-Routine Description:
-
- Helper function called as part of the code needed
- to allocate the proper sized buffer for various
- EFI interfaces.
-
-Arguments:
-
- Status - Current status
-
- Buffer - Current allocated buffer, or NULL
-
- BufferSize - Current buffer size needed
-
-Returns:
-
- TRUE - if the buffer was reallocated and the caller
- should try the API again.
-
---*/
-{
- BOOLEAN TryAgain;
-
- //
- // If this is an initial request, buffer will be null with a new buffer size
- //
-
- if (!*Buffer && BufferSize) {
- *Status = EFI_BUFFER_TOO_SMALL;
- }
-
- //
- // If the status code is "buffer too small", resize the buffer
- //
-
- TryAgain = FALSE;
- if (*Status == EFI_BUFFER_TOO_SMALL) {
-
- if (*Buffer) {
- FreePool (*Buffer);
- }
-
- *Buffer = AllocatePool (BufferSize);
-
- if (*Buffer) {
- TryAgain = TRUE;
- } else {
- *Status = EFI_OUT_OF_RESOURCES;
- }
- }
-
- //
- // If there's an error, free the buffer
- //
-
- if (!TryAgain && EFI_ERROR(*Status) && *Buffer) {
- FreePool (*Buffer);
- *Buffer = NULL;
- }
-
- return TryAgain;
-}
-
-
-EFI_MEMORY_DESCRIPTOR *
-LibMemoryMap (
- OUT UINTN *NoEntries,
- OUT UINTN *MapKey,
- OUT UINTN *DescriptorSize,
- OUT UINT32 *DescriptorVersion
- )
-{
- EFI_STATUS Status;
- EFI_MEMORY_DESCRIPTOR *Buffer;
- UINTN BufferSize;
-
- //
- // Initialize for GrowBuffer loop
- //
-
- Buffer = NULL;
- BufferSize = sizeof(EFI_MEMORY_DESCRIPTOR);
-
- //
- // Call the real function
- //
-
- while (GrowBuffer (&Status, (VOID **) &Buffer, BufferSize)) {
- Status = BS->GetMemoryMap (&BufferSize, Buffer, MapKey, DescriptorSize, DescriptorVersion);
- }
-
- //
- // Convert buffer size to NoEntries
- //
-
- if (!EFI_ERROR(Status)) {
- *NoEntries = BufferSize / *DescriptorSize;
- }
-
- return Buffer;
-}
-
-VOID *
-LibGetVariableAndSize (
- IN CHAR16 *Name,
- IN EFI_GUID *VendorGuid,
- OUT UINTN *VarSize
- )
-{
- EFI_STATUS Status;
- VOID *Buffer;
- UINTN BufferSize;
-
- //
- // Initialize for GrowBuffer loop
- //
-
- Buffer = NULL;
- BufferSize = 100;
-
- //
- // Call the real function
- //
-
- while (GrowBuffer (&Status, &Buffer, BufferSize)) {
- Status = RT->GetVariable (
- Name,
- VendorGuid,
- NULL,
- &BufferSize,
- Buffer
- );
- }
- if (Buffer) {
- *VarSize = BufferSize;
- } else {
- *VarSize = 0;
- }
- return Buffer;
-}
-
-VOID *
-LibGetVariable (
- IN CHAR16 *Name,
- IN EFI_GUID *VendorGuid
- )
-{
- UINTN VarSize;
-
- return LibGetVariableAndSize (Name, VendorGuid, &VarSize);
-}
-
-EFI_STATUS
-LibDeleteVariable (
- IN CHAR16 *VarName,
- IN EFI_GUID *VarGuid
- )
-{
- VOID *VarBuf;
- EFI_STATUS Status;
-
- VarBuf = LibGetVariable(VarName,VarGuid);
-
- Status = EFI_NOT_FOUND;
-
- if (VarBuf) {
- //
- // Delete variable from Storage
- //
- Status = RT->SetVariable (
- VarName, VarGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
- 0, NULL
- );
- ASSERT (!EFI_ERROR(Status));
- FreePool(VarBuf);
- }
-
- return (Status);
-}
-
-EFI_STATUS
-LibInsertToTailOfBootOrder (
- IN UINT16 BootOption,
- IN BOOLEAN OnlyInsertIfEmpty
- )
-{
- UINT16 *BootOptionArray;
- UINT16 *NewBootOptionArray;
- UINTN VarSize;
- UINTN Index;
- EFI_STATUS Status;
-
- BootOptionArray = LibGetVariableAndSize (VarBootOrder, &EfiGlobalVariable, &VarSize);
- if (VarSize != 0 && OnlyInsertIfEmpty) {
- if (BootOptionArray) {
- FreePool (BootOptionArray);
- }
- return EFI_UNSUPPORTED;
- }
-
- VarSize += sizeof(UINT16);
- NewBootOptionArray = AllocatePool (VarSize);
-
- for (Index = 0; Index < ((VarSize/sizeof(UINT16)) - 1); Index++) {
- NewBootOptionArray[Index] = BootOptionArray[Index];
- }
- //
- // Insert in the tail of the array
- //
- NewBootOptionArray[Index] = BootOption;
-
- Status = RT->SetVariable (
- VarBootOrder, &EfiGlobalVariable,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
- VarSize, (VOID*) NewBootOptionArray
- );
-
- if (NewBootOptionArray) {
- FreePool (NewBootOptionArray);
- }
- if (BootOptionArray) {
- FreePool (BootOptionArray);
- }
- return Status;
-}
-
-
-BOOLEAN
-ValidMBR(
- IN MASTER_BOOT_RECORD *Mbr,
- IN EFI_BLOCK_IO *BlkIo
- )
-{
- UINT32 StartingLBA, EndingLBA;
- UINT32 NewEndingLBA;
- INTN i, j;
- BOOLEAN ValidMbr;
-
- if (Mbr->Signature != MBR_SIGNATURE) {
- //
- // The BPB also has this signature, so it can not be used alone.
- //
- return FALSE;
- }
-
- ValidMbr = FALSE;
- for (i=0; i<MAX_MBR_PARTITIONS; i++) {
- if ( Mbr->Partition[i].OSIndicator == 0x00 || EXTRACT_UINT32(Mbr->Partition[i].SizeInLBA) == 0 ) {
- continue;
- }
- ValidMbr = TRUE;
- StartingLBA = EXTRACT_UINT32(Mbr->Partition[i].StartingLBA);
- EndingLBA = StartingLBA + EXTRACT_UINT32(Mbr->Partition[i].SizeInLBA) - 1;
- if (EndingLBA > BlkIo->Media->LastBlock) {
- //
- // Compatability Errata:
- // Some systems try to hide drive space with thier INT 13h driver
- // This does not hide space from the OS driver. This means the MBR
- // that gets created from DOS is smaller than the MBR created from
- // a real OS (NT & Win98). This leads to BlkIo->LastBlock being
- // wrong on some systems FDISKed by the OS.
- //
- //
- if (BlkIo->Media->LastBlock < MIN_MBR_DEVICE_SIZE) {
- //
- // If this is a very small device then trust the BlkIo->LastBlock
- //
- return FALSE;
- }
-
- if (EndingLBA > (BlkIo->Media->LastBlock + MBR_ERRATA_PAD)) {
- return FALSE;
- }
-
- }
- for (j=i+1; j<MAX_MBR_PARTITIONS; j++) {
- if (Mbr->Partition[j].OSIndicator == 0x00 || EXTRACT_UINT32(Mbr->Partition[j].SizeInLBA) == 0) {
- continue;
- }
- if ( EXTRACT_UINT32(Mbr->Partition[j].StartingLBA) >= StartingLBA &&
- EXTRACT_UINT32(Mbr->Partition[j].StartingLBA) <= EndingLBA ) {
- //
- // The Start of this region overlaps with the i'th region
- //
- return FALSE;
- }
- NewEndingLBA = EXTRACT_UINT32(Mbr->Partition[j].StartingLBA) + EXTRACT_UINT32(Mbr->Partition[j].SizeInLBA) - 1;
- if ( NewEndingLBA >= StartingLBA && NewEndingLBA <= EndingLBA ) {
- //
- // The End of this region overlaps with the i'th region
- //
- return FALSE;
- }
- }
- }
- //
- // Non of the regions overlapped so MBR is O.K.
- //
- return ValidMbr;
-}
-
-
-UINT8
-DecimaltoBCD(
- IN UINT8 DecValue
- )
-{
- return RtDecimaltoBCD (DecValue);
-}
-
-
-UINT8
-BCDtoDecimal(
- IN UINT8 BcdValue
- )
-{
- return RtBCDtoDecimal (BcdValue);
-}
-
-EFI_STATUS
-LibGetSystemConfigurationTable(
- IN EFI_GUID *TableGuid,
- IN OUT VOID **Table
- )
-
-{
- UINTN Index;
-
- for(Index=0;Index<ST->NumberOfTableEntries;Index++) {
- if (CompareGuid(TableGuid,&(ST->ConfigurationTable[Index].VendorGuid))==0) {
- *Table = ST->ConfigurationTable[Index].VendorTable;
- return EFI_SUCCESS;
- }
- }
- return EFI_NOT_FOUND;
-}
-
-
-CHAR16 *
-LibGetUiString (
- IN EFI_HANDLE Handle,
- IN UI_STRING_TYPE StringType,
- IN ISO_639_2 *LangCode,
- IN BOOLEAN ReturnDevicePathStrOnMismatch
- )
-{
- UI_INTERFACE *Ui;
- UI_STRING_TYPE Index;
- UI_STRING_ENTRY *Array;
- EFI_STATUS Status;
-
- Status = BS->HandleProtocol (Handle, &UiProtocol, (VOID *)&Ui);
- if (EFI_ERROR(Status)) {
- return (ReturnDevicePathStrOnMismatch) ? DevicePathToStr(DevicePathFromHandle(Handle)) : NULL;
- }
-
- //
- // Skip the first strings
- //
- for (Index = UiDeviceString, Array = Ui->Entry; Index < StringType; Index++, Array++) {
- while (Array->LangCode) {
- Array++;
- }
- }
-
- //
- // Search for the match
- //
- while (Array->LangCode) {
- if (strcmpa (Array->LangCode, LangCode) == 0) {
- return Array->UiString;
- }
- }
- return (ReturnDevicePathStrOnMismatch) ? DevicePathToStr(DevicePathFromHandle(Handle)) : NULL;
-}
Index: g5/boot/arch/ia64/loader/gefi/ChangeLog
===================================================================
--- g5/boot/arch/ia64/loader/gefi/ChangeLog (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/ChangeLog (nonexistent)
@@ -1,193 +0,0 @@
-
-2006-03-21 Stephane Eranian <eranian@hpl.hp.com>
- * merged patch to support gcc-4.1 submitted by
- Raymund Will from Novell/SuSE
-
-2006-03-20 Stephane Eranian <eranian@hpl.hp.com>
- * updated ia-64 and ia-32 linker scripts to
- match latest gcc. The new gcc may put functions in
- .text* sections. patch submitted by H.J. Lu from Intel.
-
-2004-11-19 Stephane Eranian <eranian@hpl.hp.com>
- * added patch to ignore .eh_frame section for IA-32. Patch
- submitted by Jim Wilson
-
-2004-09-23 Stephane Eranian <eranian@hpl.hp.com>
- * added patch to discard unwind sections, newer toolchains
- complained about them. Patch submitted by Jesse Barnes from SGI.
-
-2003-09-29 Stephane Eranian <eranian@hpl.hp.com>
- * updated elf_ia64_efi.lds to reflect new data sections
- created by gcc-3.3. Patch provided by Andreas Schwab from Suse.
-
-2003-06-20 Stephane Eranian <eranian@hpl.hp.com>
- * updated elf_ia64_efi.lds and elf_ia32_efi.lds to include
- new types data sections produced by recent version of gcc-3.x
-
-2002-02-22 Stephane Eranian <eranian@hpl.hp.com>
- * release 3.0a
- * modified both IA-64 and IA-32 loader scripts to add support for the
- new .rodata sections names (such as rodata.str2.8). Required
- for new versions of gcc3.x.
-
-2001-06-20 Stephane Eranian <eranian@hpl.hp.com>
- * release 3.0
- * split gnu-efi package in two different packages: the libary+include+crt and the bootloader.
- * removed W2U() hack and related files to get from wide-char to unicode.
- * Use -fshort-wchar option for unicode.
- * restructured Makefiles now install under INSTALLROOT.
-
-2001-04-06 Stephane Eranian <eranian@hpl.hp.com>
-
- * incorporated patches from David and Michael Johnston at Intel
- to get the package to compile for IA-32 linux target.
-
- * Fixed ELILO to compile for Ia-32 (does not execute yet, though):
- Makefile and start_kernel() function.
-
-2001-04-06 Andreas Schwab <schwab@suse.de>
-
- * Fixed config.c to
- get the timeout directive to do something. implemented the global
- root= directive.
-
- * Fix the efi_main() to deal with the -C option properly
-
-2001-04-05 Stephane Eranian <eranian@hpl.hp.com>
-
- * update efi library to latest EFI toolkit 1.02 as distributed
- by Intel. Fixed header + library files to compile with GCC
-
- * merged ELI and LILO (as of gnu-efi-1.1) together, mostly
- taking the config file feature of ELI.
-
- * renamed LILO to ELILO to make the distinction
-
- * restructured code to make it easier to understand and maintain
-
- * fixed FPSWA driver checking and loading: we try all possible
- files and let the driver itself figure out if it is the most
- recent.
- * added support for compression (gzip) but keep support for plain
- ELF image. ELILO autodetects the format
-
- * change the way the kernel is invoked. Now we call it in
- physical memory mode. This breaks the dependency between the
- kernel code and the loader. No more lilo_start.c madness.
-
- * changed the way the boot_params are passed. We don't use the
- ZERO_PAGE_ADDR trick anymore. Instead we use EFI runtime memory.
- The address of the structure is passed to the kernel in r28
- by our convention.
-
- * released as gnu-efi-2.0
-
-2001-04-03 David Mosberger <davidm@hpl.hp.com>
-
- * gnuefi/reloc_ia32.c (_relocate): Change return type from "void"
- to "int". Return error status if relocation fails for some
- reason.
-
- * gnuefi/elf_ia32_efi.lds: Drop unneeded ".rel.reloc" section.
-
- * gnuefi/crt0-efi-ia32.S (_start): Exit if _relocate() returns with
- non-zero exit status.
-
- * inc/ia32/efibind.h [__GNUC__]: Force 8-byte alignment for 64-bit
- types as that is what EFI appears to be expecting, despite the
- "#pragma pack()" at the beginning of the file!
-
-2001-03-29 David Mosberger <davidm@hpl.hp.com>
-
- * gnuefi/reloc_ia32.c: Add a couple of defines to work around
- libc/efilib collision on uint64_t et al.
- (_relocate): Use ELF32_R_TYPE() instead of ELFW(R_TYPE)().
-
- * gnuefi/crt0-efi-ia32.S (dummy): Add a dummy relocation entry.
-
-2001-03-29 David Mosberger <davidm@hpl.hp.com>
-
- * gnuefi/reloc_ia32.c: Add a couple of defines to work around
- libc/efilib collision on uint64_t et al.
- (_relocate): Use ELF32_R_TYPE() instead of ELFW(R_TYPE)().
-
- * gnuefi/crt0-efi-ia32.S (dummy): Add a dummy relocation entry.
-
-2000-10-26 David Mosberger <davidm@hpl.hp.com>
-
- * gnuefi/elf_ia64_efi.lds: Mention .rela.sdata.
-
- * Make.defaults (CFLAGS): Remove -nostdinc flags so we can pick
- up the C compiler's stdarg.h.
-
- * inc/stdarg.h: Remove this file. It's not correct for gcc (nor
- most other optimizing compilers).
-
-2000-10-10 Stephane Eranian <eranian@hpl.hp.com>
-
- * cleaned up the error message and printing of those.
- * added support to load the FPSWA from a file in case support is not
- present in the firmware already
- * fixed split_args() to do the right thing when you have leading spaces
- before kernel name
- * changed the argify() function to rely on \0 instead of LoadOptionSize
- as the field seems to be broken with current firmware
- * bumped version to 1.0
-
-2000-10-04 David Mosberger <davidm@hpl.hp.com>
-
- * gnuefi/reloc_ia64.S: Reserve space for up to 750 function descriptors.
-
- * gnuefi/elf_ia64_efi.lds: Add .sdata section for small data and
- put __gp in the "middle" of it.
-
- * gnuefi/crt0-efi-ia64.S (_start): Use movl/add to load
- gp-relative addresses that could be out of the range of the addl
- offset.
- * gnuefi/reloc_ia64.S (_relocate): Ditto.
-
- * apps/Makefile: Remove standard rules and include Make.rules instead.
- * lilo/Makefile: Ditto.
-
- * Make.rules: New file.
-
-2000-08-04 Stephane Eranian <eranian@hpl.hp.com>
- * released version 0.9
- * incorporated ACPI changes for Asuza by NEC < kouchi@hpc.bs1.fc.nec.co.jp>
- * added support for initrd (-i option) original ELI code from Bill Nottingham <notting@redhat.com>)
- * lots of cleanups
- * got rid of #ifdef LILO_DEBUG and uses macro instead
- * fix a few extra memory leaks in create_boot_params()
- * added exit capability just before starting the kernel
-
-2000-06-22 David Mosberger <davidm@hpl.hp.com>
-
- * gnuefi/elf_ia64_efi.lds: Add .srodata, .ctors, .IA64.unwind,
- .IA64.unwind_info to .data section and .rela.ctors to .rela
- section.
-
-2000-04-03 David Mosberger <davidm@hpl.hp.com>
-
- * lilo/lilo.c (LILO_VERSION): Up version number to 0.9.
-
- * gnuefi/elf_ia64_efi.lds: Include .IA_64.unwind and
- .IA_64.unwind_info in .data segment to avoid EFI load error
- "ImageAddress: pointer outside of image" error due to the .dynsym
- relocations against these sections.
-
- * ChangeLog: Moved from lilo/ChangeLogs.
-
- * gnuefi/reloc_ia64.S: fixed typo: .space directive had constant
- 100 hardcoded instead of using MAX_FUNCTION_DESCRIPTORS
- macro. Duh.
-
-Fri Mar 17 15:19:18 PST 2000 Stephane Eranian <eranian@hpl.hp.com>
-
- * Released 0.8
- * replace the getopt.c with new version free with better license
- * created a documentation file
- * fix a couple of memory leaks
- * code cleanups
- * created a separate directory for lilo in the gnu-efi package.
- * added support for the BOOT_IMAGE argument to kernel
- * default is to build natively now
Index: g5/boot/arch/ia64/loader/gefi/inc/efifs.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/efifs.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/efifs.h (nonexistent)
@@ -1,116 +0,0 @@
-#ifndef _EFI_FS_H
-#define _EFI_FS_H
-
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- efifs.h
-
-Abstract:
-
- EFI File System structures
-
-
-
-Revision History
-
---*/
-
-
-//
-// EFI Partition header (normaly starts in LBA 1)
-//
-
-#define EFI_PARTITION_SIGNATURE 0x5053595320494249
-#define EFI_PARTITION_REVISION 0x00010001
-#define MIN_EFI_PARTITION_BLOCK_SIZE 512
-#define EFI_PARTITION_LBA 1
-
-typedef struct _EFI_PARTITION_HEADER {
- EFI_TABLE_HEADER Hdr;
- UINT32 DirectoryAllocationNumber;
- UINT32 BlockSize;
- EFI_LBA FirstUsableLba;
- EFI_LBA LastUsableLba;
- EFI_LBA UnusableSpace;
- EFI_LBA FreeSpace;
- EFI_LBA RootFile;
- EFI_LBA SecutiryFile;
-} EFI_PARTITION_HEADER;
-
-
-//
-// File header
-//
-
-#define EFI_FILE_HEADER_SIGNATURE 0x454c494620494249
-#define EFI_FILE_HEADER_REVISION 0x00010000
-#define EFI_FILE_STRING_SIZE 260
-
-typedef struct _EFI_FILE_HEADER {
- EFI_TABLE_HEADER Hdr;
- UINT32 Class;
- UINT32 LBALOffset;
- EFI_LBA Parent;
- UINT64 FileSize;
- UINT64 FileAttributes;
- EFI_TIME FileCreateTime;
- EFI_TIME FileModificationTime;
- EFI_GUID VendorGuid;
- CHAR16 FileString[EFI_FILE_STRING_SIZE];
-} EFI_FILE_HEADER;
-
-
-//
-// Return the file's first LBAL which is in the same
-// logical block as the file header
-//
-
-#define EFI_FILE_LBAL(a) ((EFI_LBAL *) (((CHAR8 *) (a)) + (a)->LBALOffset))
-
-#define EFI_FILE_CLASS_FREE_SPACE 1
-#define EFI_FILE_CLASS_EMPTY 2
-#define EFI_FILE_CLASS_NORMAL 3
-
-
-//
-// Logical Block Address List - the fundemental block
-// description structure
-//
-
-#define EFI_LBAL_SIGNATURE 0x4c41424c20494249
-#define EFI_LBAL_REVISION 0x00010000
-
-typedef struct _EFI_LBAL {
- EFI_TABLE_HEADER Hdr;
- UINT32 Class;
- EFI_LBA Parent;
- EFI_LBA Next;
- UINT32 ArraySize;
- UINT32 ArrayCount;
-} EFI_LBAL;
-
-// Array size
-#define EFI_LBAL_ARRAY_SIZE(lbal,offs,blks) \
- (((blks) - (offs) - (lbal)->Hdr.HeaderSize) / sizeof(EFI_RL))
-
-//
-// Logical Block run-length
-//
-
-typedef struct {
- EFI_LBA Start;
- UINT64 Length;
-} EFI_RL;
-
-//
-// Return the run-length structure from an LBAL header
-//
-
-#define EFI_LBAL_RL(a) ((EFI_RL*) (((CHAR8 *) (a)) + (a)->Hdr.HeaderSize))
-
-#endif
-
Index: g5/boot/arch/ia64/loader/gefi/inc/romload.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/romload.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/romload.h (nonexistent)
@@ -1,41 +0,0 @@
-#ifndef _EFI_ROMLOAD_H
-#define _EFI_ROMLOAD_H
-
-#define ROM_SIGNATURE 0xaa55
-#define PCIDS_SIGNATURE "PCIR"
-#pragma pack(push)
-#pragma pack(1)
-typedef struct
-{
- UINT8 Pcids_Sig[4];
- UINT16 VendId;
- UINT16 DevId;
- UINT16 Vpd_Off;
- UINT16 Size;
- UINT8 Rev;
- UINT8 Class_Code[3];
- UINT16 Image_Len;
- UINT16 Rev_Lvl;
- UINT8 Code_Type;
- UINT8 Indi;
- UINT16 Rsvd;
-}PciDataStructure;
-typedef struct
-{
- UINT16 Size;
- UINT32 Header_Sig;
- UINT16 SubSystem;
- UINT16 MachineType;
- UINT8 Resvd[10];
- UINT16 EfiOffset;
-}ArchData;
-typedef struct
-{
- UINT16 Rom_Sig;
- ArchData Arch_Data;
- UINT16 Pcids_Off;
- UINT8 resvd[38];
-}RomHeader;
-#pragma pack(pop)
-
-#endif
Index: g5/boot/arch/ia64/loader/gefi/inc/efiapi.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/efiapi.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/efiapi.h (nonexistent)
@@ -1,720 +0,0 @@
-#ifndef _EFI_API_H
-#define _EFI_API_H
-
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- efiapi.h
-
-Abstract:
-
- Global EFI runtime & boot service interfaces
-
-
-
-
-Revision History
-
---*/
-
-//
-// EFI Specification Revision
-//
-
-#define EFI_SPECIFICATION_MAJOR_REVISION 1
-#define EFI_SPECIFICATION_MINOR_REVISION 02
-
-//
-// Declare forward referenced data structures
-//
-
-INTERFACE_DECL(_EFI_SYSTEM_TABLE);
-
-//
-// EFI Memory
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_ALLOCATE_PAGES) (
- IN EFI_ALLOCATE_TYPE Type,
- IN EFI_MEMORY_TYPE MemoryType,
- IN UINTN NoPages,
- OUT EFI_PHYSICAL_ADDRESS *Memory
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FREE_PAGES) (
- IN EFI_PHYSICAL_ADDRESS Memory,
- IN UINTN NoPages
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_MEMORY_MAP) (
- IN OUT UINTN *MemoryMapSize,
- IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
- OUT UINTN *MapKey,
- OUT UINTN *DescriptorSize,
- OUT UINT32 *DescriptorVersion
- );
-
-#define NextMemoryDescriptor(Ptr,Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) Ptr) + Size))
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_ALLOCATE_POOL) (
- IN EFI_MEMORY_TYPE PoolType,
- IN UINTN Size,
- OUT VOID **Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FREE_POOL) (
- IN VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) (
- IN UINTN MemoryMapSize,
- IN UINTN DescriptorSize,
- IN UINT32 DescriptorVersion,
- IN EFI_MEMORY_DESCRIPTOR *VirtualMap
- );
-
-
-#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
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CONVERT_POINTER) (
- IN UINTN DebugDisposition,
- IN OUT VOID **Address
- );
-
-
-//
-// EFI Events
-//
-
-
-
-#define EVT_TIMER 0x80000000
-#define EVT_RUNTIME 0x40000000
-#define EVT_RUNTIME_CONTEXT 0x20000000
-
-#define EVT_NOTIFY_WAIT 0x00000100
-#define EVT_NOTIFY_SIGNAL 0x00000200
-
-#define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
-#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
-
-#define EVT_EFI_SIGNAL_MASK 0x000000FF
-#define EVT_EFI_SIGNAL_MAX 2
-
-typedef
-VOID
-(EFIAPI *EFI_EVENT_NOTIFY) (
- IN EFI_EVENT Event,
- IN VOID *Context
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CREATE_EVENT) (
- IN UINT32 Type,
- IN EFI_TPL NotifyTpl,
- IN EFI_EVENT_NOTIFY NotifyFunction,
- IN VOID *NotifyContext,
- OUT EFI_EVENT *Event
- );
-
-typedef enum {
- TimerCancel,
- TimerPeriodic,
- TimerRelative,
- TimerTypeMax
-} EFI_TIMER_DELAY;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_TIMER) (
- IN EFI_EVENT Event,
- IN EFI_TIMER_DELAY Type,
- IN UINT64 TriggerTime
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIGNAL_EVENT) (
- IN EFI_EVENT Event
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_WAIT_FOR_EVENT) (
- IN UINTN NumberOfEvents,
- IN EFI_EVENT *Event,
- OUT UINTN *Index
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CLOSE_EVENT) (
- IN EFI_EVENT Event
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CHECK_EVENT) (
- IN EFI_EVENT Event
- );
-
-//
-// Task priority level
-//
-
-#define TPL_APPLICATION 4
-#define TPL_CALLBACK 8
-#define TPL_NOTIFY 16
-#define TPL_HIGH_LEVEL 31
-
-typedef
-EFI_TPL
-(EFIAPI *EFI_RAISE_TPL) (
- IN EFI_TPL NewTpl
- );
-
-typedef
-VOID
-(EFIAPI *EFI_RESTORE_TPL) (
- IN EFI_TPL OldTpl
- );
-
-
-//
-// EFI platform varibles
-//
-
-#define EFI_GLOBAL_VARIABLE \
- { 0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} }
-
-// Variable attributes
-#define EFI_VARIABLE_NON_VOLATILE 0x00000001
-#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
-#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
-
-// Variable size limitation
-#define EFI_MAXIMUM_VARIABLE_SIZE 1024
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_VARIABLE) (
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid,
- OUT UINT32 *Attributes OPTIONAL,
- IN OUT UINTN *DataSize,
- OUT VOID *Data
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) (
- IN OUT UINTN *VariableNameSize,
- IN OUT CHAR16 *VariableName,
- IN OUT EFI_GUID *VendorGuid
- );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_VARIABLE) (
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid,
- IN UINT32 Attributes,
- IN UINTN DataSize,
- IN VOID *Data
- );
-
-
-//
-// EFI Time
-//
-
-typedef struct {
- UINT32 Resolution; // 1e-6 parts per million
- UINT32 Accuracy; // hertz
- BOOLEAN SetsToZero; // Set clears sub-second time
-} EFI_TIME_CAPABILITIES;
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_TIME) (
- OUT EFI_TIME *Time,
- OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_TIME) (
- IN EFI_TIME *Time
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_WAKEUP_TIME) (
- OUT BOOLEAN *Enabled,
- OUT BOOLEAN *Pending,
- OUT EFI_TIME *Time
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_WAKEUP_TIME) (
- IN BOOLEAN Enable,
- IN EFI_TIME *Time OPTIONAL
- );
-
-
-//
-// Image functions
-//
-
-
-// PE32+ Subsystem type for EFI images
-
-#if !defined(IMAGE_SUBSYSTEM_EFI_APPLICATION)
-#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
-#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
-#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
-#endif
-
-// PE32+ Machine type for EFI images
-
-#if !defined(EFI_IMAGE_MACHINE_IA32)
-#define EFI_IMAGE_MACHINE_IA32 0x014c
-#endif
-
-#if !defined(EFI_IMAGE_MACHINE_IA64)
-#define EFI_IMAGE_MACHINE_IA64 0x0200
-#endif
-
-// Image Entry prototype
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_ENTRY_POINT) (
- IN EFI_HANDLE ImageHandle,
- IN struct _EFI_SYSTEM_TABLE *SystemTable
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_LOAD) (
- IN BOOLEAN BootPolicy,
- IN EFI_HANDLE ParentImageHandle,
- IN EFI_DEVICE_PATH *FilePath,
- IN VOID *SourceBuffer OPTIONAL,
- IN UINTN SourceSize,
- OUT EFI_HANDLE *ImageHandle
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_START) (
- IN EFI_HANDLE ImageHandle,
- OUT UINTN *ExitDataSize,
- OUT CHAR16 **ExitData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_EXIT) (
- IN EFI_HANDLE ImageHandle,
- IN EFI_STATUS ExitStatus,
- IN UINTN ExitDataSize,
- IN CHAR16 *ExitData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_UNLOAD) (
- IN EFI_HANDLE ImageHandle
- );
-
-
-// Image handle
-#define LOADED_IMAGE_PROTOCOL \
- { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
-
-#define EFI_IMAGE_INFORMATION_REVISION 0x1000
-typedef struct {
- UINT32 Revision;
- EFI_HANDLE ParentHandle;
- struct _EFI_SYSTEM_TABLE *SystemTable;
-
- // Source location of image
- EFI_HANDLE DeviceHandle;
- EFI_DEVICE_PATH *FilePath;
- VOID *Reserved;
-
- // Images load options
- UINT32 LoadOptionsSize;
- VOID *LoadOptions;
-
- // 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
- EFI_IMAGE_UNLOAD Unload;
-
-} EFI_LOADED_IMAGE;
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_EXIT_BOOT_SERVICES) (
- IN EFI_HANDLE ImageHandle,
- IN UINTN MapKey
- );
-
-//
-// Misc
-//
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_STALL) (
- IN UINTN Microseconds
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_WATCHDOG_TIMER) (
- IN UINTN Timeout,
- IN UINT64 WatchdogCode,
- IN UINTN DataSize,
- IN CHAR16 *WatchdogData OPTIONAL
- );
-
-
-typedef enum {
- EfiResetCold,
- EfiResetWarm
-} EFI_RESET_TYPE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_RESET_SYSTEM) (
- IN EFI_RESET_TYPE ResetType,
- IN EFI_STATUS ResetStatus,
- IN UINTN DataSize,
- IN CHAR16 *ResetData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT) (
- OUT UINT64 *Count
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) (
- OUT UINT32 *HighCount
- );
-
-//
-// Protocol handler functions
-//
-
-typedef enum {
- EFI_NATIVE_INTERFACE,
- EFI_PCODE_INTERFACE
-} EFI_INTERFACE_TYPE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE) (
- IN OUT EFI_HANDLE *Handle,
- IN EFI_GUID *Protocol,
- IN EFI_INTERFACE_TYPE InterfaceType,
- IN VOID *Interface
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE) (
- IN EFI_HANDLE Handle,
- IN EFI_GUID *Protocol,
- IN VOID *OldInterface,
- IN VOID *NewInterface
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE) (
- IN EFI_HANDLE Handle,
- IN EFI_GUID *Protocol,
- IN VOID *Interface
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HANDLE_PROTOCOL) (
- IN EFI_HANDLE Handle,
- IN EFI_GUID *Protocol,
- OUT VOID **Interface
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) (
- IN EFI_GUID *Protocol,
- IN EFI_EVENT Event,
- OUT VOID **Registration
- );
-
-typedef enum {
- AllHandles,
- ByRegisterNotify,
- ByProtocol
-} EFI_LOCATE_SEARCH_TYPE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOCATE_HANDLE) (
- IN EFI_LOCATE_SEARCH_TYPE SearchType,
- IN EFI_GUID *Protocol OPTIONAL,
- IN VOID *SearchKey OPTIONAL,
- IN OUT UINTN *BufferSize,
- OUT EFI_HANDLE *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOCATE_DEVICE_PATH) (
- IN EFI_GUID *Protocol,
- IN OUT EFI_DEVICE_PATH **DevicePath,
- OUT EFI_HANDLE *Device
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE) (
- IN EFI_GUID *Guid,
- IN VOID *Table
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_RESERVED_SERVICE) (
- );
-
-//
-// Standard EFI table header
-//
-
-typedef struct _EFI_TABLE_HEARDER {
- UINT64 Signature;
- UINT32 Revision;
- UINT32 HeaderSize;
- UINT32 CRC32;
- UINT32 Reserved;
-} EFI_TABLE_HEADER;
-
-
-//
-// EFI Runtime Serivces Table
-//
-
-#define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552
-#define EFI_RUNTIME_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
-
-typedef struct {
- EFI_TABLE_HEADER Hdr;
-
- //
- // Time services
- //
-
- EFI_GET_TIME GetTime;
- EFI_SET_TIME SetTime;
- EFI_GET_WAKEUP_TIME GetWakeupTime;
- EFI_SET_WAKEUP_TIME SetWakeupTime;
-
- //
- // Virtual memory services
- //
-
- EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
- EFI_CONVERT_POINTER ConvertPointer;
-
- //
- // Variable serviers
- //
-
- EFI_GET_VARIABLE GetVariable;
- EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
- EFI_SET_VARIABLE SetVariable;
-
- //
- // Misc
- //
-
- EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
- EFI_RESET_SYSTEM ResetSystem;
-
-} EFI_RUNTIME_SERVICES;
-
-
-//
-// EFI Boot Services Table
-//
-
-#define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42
-#define EFI_BOOT_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
-
-typedef struct _EFI_BOOT_SERVICES {
-
- 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;
-
- //
- // Event & timer 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;
-
- //
- // Protocol handler functions
- //
-
- 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;
-
- //
- // Image functions
- //
-
- EFI_IMAGE_LOAD LoadImage;
- EFI_IMAGE_START StartImage;
- EFI_EXIT Exit;
- EFI_IMAGE_UNLOAD UnloadImage;
- EFI_EXIT_BOOT_SERVICES ExitBootServices;
-
- //
- // Misc functions
- //
-
- EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
- EFI_STALL Stall;
- EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
-
-} EFI_BOOT_SERVICES;
-
-
-//
-// EFI Configuration Table and GUID definitions
-//
-
-#define MPS_TABLE_GUID \
- { 0xeb9d2d2f, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define ACPI_TABLE_GUID \
- { 0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define ACPI_20_TABLE_GUID \
- { 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
-
-#define SMBIOS_TABLE_GUID \
- { 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define SAL_SYSTEM_TABLE_GUID \
- { 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-
-typedef struct _EFI_CONFIGURATION_TABLE {
- EFI_GUID VendorGuid;
- VOID *VendorTable;
-} EFI_CONFIGURATION_TABLE;
-
-
-//
-// EFI System Table
-//
-
-
-
-
-#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249
-#define EFI_SYSTEM_TABLE_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
-
-typedef struct _EFI_SYSTEM_TABLE {
- EFI_TABLE_HEADER Hdr;
-
- CHAR16 *FirmwareVendor;
- UINT32 FirmwareRevision;
-
- EFI_HANDLE ConsoleInHandle;
- SIMPLE_INPUT_INTERFACE *ConIn;
-
- EFI_HANDLE ConsoleOutHandle;
- SIMPLE_TEXT_OUTPUT_INTERFACE *ConOut;
-
- EFI_HANDLE StandardErrorHandle;
- SIMPLE_TEXT_OUTPUT_INTERFACE *StdErr;
-
- EFI_RUNTIME_SERVICES *RuntimeServices;
- EFI_BOOT_SERVICES *BootServices;
-
- UINTN NumberOfTableEntries;
- EFI_CONFIGURATION_TABLE *ConfigurationTable;
-
-} EFI_SYSTEM_TABLE;
-
-#endif
-
Index: g5/boot/arch/ia64/loader/gefi/inc/efirtlib.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/efirtlib.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/efirtlib.h (nonexistent)
@@ -1,141 +0,0 @@
-#ifndef _EFI_RT_LIB_INCLUDE_
-#define _EFI_RT_LIB_INCLUDE_
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- efilib.h
-
-Abstract:
-
- EFI Runtime library functions
-
-
-
-Revision History
-
---*/
-
-#include "efidebug.h"
-#include "efipart.h"
-#include "efilibplat.h"
-
-
-VOID
-RUNTIMEFUNCTION
-RtZeroMem (
- IN VOID *Buffer,
- IN UINTN Size
- );
-
-VOID
-RUNTIMEFUNCTION
-RtSetMem (
- IN VOID *Buffer,
- IN UINTN Size,
- IN UINT8 Value
- );
-
-VOID
-RUNTIMEFUNCTION
-RtCopyMem (
- IN VOID *Dest,
- IN VOID *Src,
- IN UINTN len
- );
-
-INTN
-RUNTIMEFUNCTION
-RtCompareMem (
- IN VOID *Dest,
- IN VOID *Src,
- IN UINTN len
- );
-
-INTN
-RUNTIMEFUNCTION
-RtStrCmp (
- IN CHAR16 *s1,
- IN CHAR16 *s2
- );
-
-
-VOID
-RUNTIMEFUNCTION
-RtStrCpy (
- IN CHAR16 *Dest,
- IN CHAR16 *Src
- );
-
-VOID
-RUNTIMEFUNCTION
-RtStrCat (
- IN CHAR16 *Dest,
- IN CHAR16 *Src
- );
-
-UINTN
-RUNTIMEFUNCTION
-RtStrLen (
- IN CHAR16 *s1
- );
-
-UINTN
-RUNTIMEFUNCTION
-RtStrSize (
- IN CHAR16 *s1
- );
-
-INTN
-RUNTIMEFUNCTION
-RtCompareGuid (
- IN EFI_GUID *Guid1,
- IN EFI_GUID *Guid2
- );
-
-UINT8
-RUNTIMEFUNCTION
-RtDecimaltoBCD(
- IN UINT8 BcdValue
- );
-
-UINT8
-RUNTIMEFUNCTION
-RtBCDtoDecimal(
- IN UINT8 BcdValue
- );
-
-//
-// Virtual mapping transition support. (Only used during
-// the virtual address change transisition)
-//
-
-VOID
-RUNTIMEFUNCTION
-RtLibEnableVirtualMappings (
- VOID
- );
-
-VOID
-RUNTIMEFUNCTION
-RtConvertList (
- IN UINTN DebugDisposition,
- IN OUT LIST_ENTRY *ListHead
- );
-
-VOID
-RUNTIMEFUNCTION
-RtAcquireLock (
- IN FLOCK *Lock
- );
-
-VOID
-RUNTIMEFUNCTION
-RtReleaseLock (
- IN FLOCK *Lock
- );
-
-
-#endif
Index: g5/boot/arch/ia64/loader/gefi/inc/efiui.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/efiui.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/efiui.h (nonexistent)
@@ -1,54 +0,0 @@
-#ifndef _EFI_UI_H
-#define _EFI_UI_H
-
-/*++
-
-Copyright (c) 200 Intel Corporation
-
-Module Name:
-
- EfiUi.h
-
-Abstract:
- Protocol used to build User Interface (UI) stuff.
-
- This protocol is just data. It is a multi dimentional array.
- For each string there is an array of UI_STRING_ENTRY. Each string
- is for a different language translation of the same string. The list
- is terminated by a NULL UiString. There can be any number of
- UI_STRING_ENTRY arrays. A NULL array terminates the list. A NULL array
- entry contains all zeros.
-
- Thus the shortest possible EFI_UI_PROTOCOL has three UI_STRING_ENTRY.
- The String, it's NULL terminator, and the NULL terminator for the entire
- thing.
-
-
-Revision History
-
---*/
-
-#define EFI_UI_PROTOCOL \
- { 0x32dd7981, 0x2d27, 0x11d4, {0xbc, 0x8b, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
-
-
-typedef enum {
- UiDeviceString,
- UiVendorString,
- UiMaxString
-} UI_STRING_TYPE;
-
-typedef struct {
- ISO_639_2 *LangCode;
- CHAR16 *UiString;
-} UI_STRING_ENTRY;
-
-#define EFI_UI_VERSION 0x00010000
-
-typedef struct _UI_INTERFACE {
- UINT32 Version;
- UI_STRING_ENTRY *Entry;
-} UI_INTERFACE;
-
-
-#endif
Index: g5/boot/arch/ia64/loader/gefi/inc/make.inf
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/make.inf (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/make.inf (nonexistent)
@@ -1,29 +0,0 @@
-#
-#
-#
-
-[sources]
- efi.h
- efiapi.h
- eficon.h
- efidebug.h
- efidef.h
- efidevp.h
- efierr.h
- efifs.h
- efilib.h
- efipart.h
- efiprot.h
- efipxebc.h
- efistdarg.h
- efinet.h
-
-[ia32sources]
- efibind.h
- pe.h
- efilibplat.h
-
-[ia64sources]
- efibind.h
- pe.h
- efilibplat.h
Index: g5/boot/arch/ia64/loader/gefi/inc/efi_nii.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/efi_nii.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/efi_nii.h (nonexistent)
@@ -1,74 +0,0 @@
-#ifndef _EFI_NII_H
-#define _EFI_NII_H
-
-/*++
-Copyright (c) 2000 Intel Corporation
-
-Module name:
- efi_nii.h
-
-Abstract:
-
-Revision history:
- 2000-Feb-18 M(f)J GUID updated.
- Structure order changed for machine word alignment.
- Added StringId[4] to structure.
-
- 2000-Feb-14 M(f)J Genesis.
---*/
-
-#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL \
- { 0xE18541CD, 0xF755, 0x4f73, {0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29} }
-
-#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION 0x00010000
-
-typedef enum {
- EfiNetworkInterfaceUndi = 1
-} EFI_NETWORK_INTERFACE_TYPE;
-
-typedef struct {
-
- UINT64 Revision;
- // Revision of the network interface identifier protocol interface.
-
- 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.
-
- 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.
-
- 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.
-
- 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".
-
- 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
-} EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE;
-
-extern EFI_GUID NetworkInterfaceIdentifierProtocol;
-
-#endif // _EFI_NII_H
Index: g5/boot/arch/ia64/loader/gefi/inc/efi.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/efi.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/efi.h (nonexistent)
@@ -1,49 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- efi.h
-
-Abstract:
-
- Public EFI header files
-
-
-
-Revision History
-
---*/
-
-//
-// 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_REVISION ((EFI_FIRMWARE_MAJOR_REVISION <<16) | (EFI_FIRMWARE_MINOR_REVISION))
-
-#include "efibind.h"
-#include "efidef.h"
-#include "efidevp.h"
-#include "efiprot.h"
-#include "eficon.h"
-#include "efiser.h"
-#include "efi_nii.h"
-#include "efipxebc.h"
-#include "efinet.h"
-#include "efiapi.h"
-#include "efifs.h"
-#include "efierr.h"
-#include "efiui.h"
-
-#endif
Index: g5/boot/arch/ia64/loader/gefi/inc/makefile.hdr
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/makefile.hdr (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/makefile.hdr (nonexistent)
@@ -1,44 +0,0 @@
-
-#
-# This is a machine generated file - DO NOT EDIT
-# Generated by genmake.exe
-# Generated from make.inf
-# Copyright (c) 1998 Intel Corporation
-#
-
-INC_DEPS = $(INC_DEPS) \
- $(SDK_INSTALL_DIR)\include\efi\efi.h \
- $(SDK_INSTALL_DIR)\include\efi\efiapi.h \
- $(SDK_INSTALL_DIR)\include\efi\eficon.h \
- $(SDK_INSTALL_DIR)\include\efi\efidebug.h \
- $(SDK_INSTALL_DIR)\include\efi\efidef.h \
- $(SDK_INSTALL_DIR)\include\efi\efidevp.h \
- $(SDK_INSTALL_DIR)\include\efi\efierr.h \
- $(SDK_INSTALL_DIR)\include\efi\efifs.h \
- $(SDK_INSTALL_DIR)\include\efi\efilib.h \
- $(SDK_INSTALL_DIR)\include\efi\efipart.h \
- $(SDK_INSTALL_DIR)\include\efi\efiprot.h \
- $(SDK_INSTALL_DIR)\include\efi\efipxebc.h \
- $(SDK_INSTALL_DIR)\include\efi\efistdarg.h \
- $(SDK_INSTALL_DIR)\include\efi\efinet.h \
-
-
-!IF "$(PROCESSOR)" == "Ia32"
-INC_DEPS = $(INC_DEPS) \
- $(SDK_INSTALL_DIR)\include\efi\Ia32\efibind.h \
- $(SDK_INSTALL_DIR)\include\efi\Ia32\pe.h \
- $(SDK_INSTALL_DIR)\include\efi\Ia32\efilibplat.h \
-
-
-!ENDIF
-
-
-!IF "$(PROCESSOR)" == "Ia64"
-INC_DEPS = $(INC_DEPS) \
- $(SDK_INSTALL_DIR)\include\efi\Ia64\efibind.h \
- $(SDK_INSTALL_DIR)\include\efi\Ia64\pe.h \
- $(SDK_INSTALL_DIR)\include\efi\Ia64\efilibplat.h \
-
-
-!ENDIF
-
Index: g5/boot/arch/ia64/loader/gefi/inc/eficon.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/eficon.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/eficon.h (nonexistent)
@@ -1,302 +0,0 @@
-#ifndef _EFI_CON_H
-#define _EFI_CON_H
-
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- eficon.h
-
-Abstract:
-
- EFI console protocols
-
-
-
-Revision History
-
---*/
-
-//
-// Text output protocol
-//
-
-#define SIMPLE_TEXT_OUTPUT_PROTOCOL \
- { 0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_SIMPLE_TEXT_OUTPUT_INTERFACE);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_RESET) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN BOOLEAN ExtendedVerification
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_OUTPUT_STRING) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN CHAR16 *String
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_TEST_STRING) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN CHAR16 *String
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_QUERY_MODE) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN UINTN ModeNumber,
- OUT UINTN *Columns,
- OUT UINTN *Rows
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_SET_MODE) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN UINTN ModeNumber
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_SET_ATTRIBUTE) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN UINTN Attribute
- );
-
-#define EFI_BLACK 0x00
-#define EFI_BLUE 0x01
-#define EFI_GREEN 0x02
-#define EFI_CYAN (EFI_BLUE | EFI_GREEN)
-#define EFI_RED 0x04
-#define EFI_MAGENTA (EFI_BLUE | EFI_RED)
-#define EFI_BROWN (EFI_GREEN | EFI_RED)
-#define EFI_LIGHTGRAY (EFI_BLUE | EFI_GREEN | EFI_RED)
-#define EFI_BRIGHT 0x08
-#define EFI_DARKGRAY (EFI_BRIGHT)
-#define EFI_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT)
-#define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT)
-#define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT)
-#define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT)
-#define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT)
-#define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT)
-#define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
-
-#define EFI_TEXT_ATTR(f,b) ((f) | ((b) << 4))
-
-#define EFI_BACKGROUND_BLACK 0x00
-#define EFI_BACKGROUND_BLUE 0x10
-#define EFI_BACKGROUND_GREEN 0x20
-#define EFI_BACKGROUND_CYAN (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN)
-#define EFI_BACKGROUND_RED 0x40
-#define EFI_BACKGROUND_MAGENTA (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_RED)
-#define EFI_BACKGROUND_BROWN (EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
-#define EFI_BACKGROUND_LIGHTGRAY (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_CLEAR_SCREEN) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_SET_CURSOR_POSITION) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN UINTN Column,
- IN UINTN Row
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_ENABLE_CURSOR) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN BOOLEAN Enable
- );
-
-typedef struct {
- INT32 MaxMode;
- // current settings
- INT32 Mode;
- INT32 Attribute;
- INT32 CursorColumn;
- INT32 CursorRow;
- BOOLEAN CursorVisible;
-} SIMPLE_TEXT_OUTPUT_MODE;
-
-typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE {
- EFI_TEXT_RESET Reset;
-
- EFI_TEXT_OUTPUT_STRING OutputString;
- EFI_TEXT_TEST_STRING TestString;
-
- EFI_TEXT_QUERY_MODE QueryMode;
- EFI_TEXT_SET_MODE SetMode;
- EFI_TEXT_SET_ATTRIBUTE SetAttribute;
-
- EFI_TEXT_CLEAR_SCREEN ClearScreen;
- EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition;
- EFI_TEXT_ENABLE_CURSOR EnableCursor;
-
- // Current mode
- SIMPLE_TEXT_OUTPUT_MODE *Mode;
-} SIMPLE_TEXT_OUTPUT_INTERFACE;
-
-//
-// Define's for required EFI Unicode Box Draw character
-//
-
-#define BOXDRAW_HORIZONTAL 0x2500
-#define BOXDRAW_VERTICAL 0x2502
-#define BOXDRAW_DOWN_RIGHT 0x250c
-#define BOXDRAW_DOWN_LEFT 0x2510
-#define BOXDRAW_UP_RIGHT 0x2514
-#define BOXDRAW_UP_LEFT 0x2518
-#define BOXDRAW_VERTICAL_RIGHT 0x251c
-#define BOXDRAW_VERTICAL_LEFT 0x2524
-#define BOXDRAW_DOWN_HORIZONTAL 0x252c
-#define BOXDRAW_UP_HORIZONTAL 0x2534
-#define BOXDRAW_VERTICAL_HORIZONTAL 0x253c
-
-#define BOXDRAW_DOUBLE_HORIZONTAL 0x2550
-#define BOXDRAW_DOUBLE_VERTICAL 0x2551
-#define BOXDRAW_DOWN_RIGHT_DOUBLE 0x2552
-#define BOXDRAW_DOWN_DOUBLE_RIGHT 0x2553
-#define BOXDRAW_DOUBLE_DOWN_RIGHT 0x2554
-
-#define BOXDRAW_DOWN_LEFT_DOUBLE 0x2555
-#define BOXDRAW_DOWN_DOUBLE_LEFT 0x2556
-#define BOXDRAW_DOUBLE_DOWN_LEFT 0x2557
-
-#define BOXDRAW_UP_RIGHT_DOUBLE 0x2558
-#define BOXDRAW_UP_DOUBLE_RIGHT 0x2559
-#define BOXDRAW_DOUBLE_UP_RIGHT 0x255a
-
-#define BOXDRAW_UP_LEFT_DOUBLE 0x255b
-#define BOXDRAW_UP_DOUBLE_LEFT 0x255c
-#define BOXDRAW_DOUBLE_UP_LEFT 0x255d
-
-#define BOXDRAW_VERTICAL_RIGHT_DOUBLE 0x255e
-#define BOXDRAW_VERTICAL_DOUBLE_RIGHT 0x255f
-#define BOXDRAW_DOUBLE_VERTICAL_RIGHT 0x2560
-
-#define BOXDRAW_VERTICAL_LEFT_DOUBLE 0x2561
-#define BOXDRAW_VERTICAL_DOUBLE_LEFT 0x2562
-#define BOXDRAW_DOUBLE_VERTICAL_LEFT 0x2563
-
-#define BOXDRAW_DOWN_HORIZONTAL_DOUBLE 0x2564
-#define BOXDRAW_DOWN_DOUBLE_HORIZONTAL 0x2565
-#define BOXDRAW_DOUBLE_DOWN_HORIZONTAL 0x2566
-
-#define BOXDRAW_UP_HORIZONTAL_DOUBLE 0x2567
-#define BOXDRAW_UP_DOUBLE_HORIZONTAL 0x2568
-#define BOXDRAW_DOUBLE_UP_HORIZONTAL 0x2569
-
-#define BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE 0x256a
-#define BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL 0x256b
-#define BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL 0x256c
-
-//
-// EFI Required Block Elements Code Chart
-//
-
-#define BLOCKELEMENT_FULL_BLOCK 0x2588
-#define BLOCKELEMENT_LIGHT_SHADE 0x2591
-//
-// EFI Required Geometric Shapes Code Chart
-//
-
-#define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2
-#define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba
-#define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc
-#define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4
-
-//
-// EFI Required Arrow shapes
-//
-
-#define ARROW_UP 0x2191
-#define ARROW_DOWN 0x2193
-
-//
-// Text input protocol
-//
-
-#define SIMPLE_TEXT_INPUT_PROTOCOL \
- { 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_SIMPLE_INPUT_INTERFACE);
-
-typedef struct {
- UINT16 ScanCode;
- CHAR16 UnicodeChar;
-} EFI_INPUT_KEY;
-
-//
-// Baseline unicode control chars
-//
-
-#define CHAR_NULL 0x0000
-#define CHAR_BACKSPACE 0x0008
-#define CHAR_TAB 0x0009
-#define CHAR_LINEFEED 0x000A
-#define CHAR_CARRIAGE_RETURN 0x000D
-
-//
-// Scan codes for base line keys
-//
-
-#define SCAN_NULL 0x0000
-#define SCAN_UP 0x0001
-#define SCAN_DOWN 0x0002
-#define SCAN_RIGHT 0x0003
-#define SCAN_LEFT 0x0004
-#define SCAN_HOME 0x0005
-#define SCAN_END 0x0006
-#define SCAN_INSERT 0x0007
-#define SCAN_DELETE 0x0008
-#define SCAN_PAGE_UP 0x0009
-#define SCAN_PAGE_DOWN 0x000A
-#define SCAN_F1 0x000B
-#define SCAN_F2 0x000C
-#define SCAN_F3 0x000D
-#define SCAN_F4 0x000E
-#define SCAN_F5 0x000F
-#define SCAN_F6 0x0010
-#define SCAN_F7 0x0011
-#define SCAN_F8 0x0012
-#define SCAN_F9 0x0013
-#define SCAN_F10 0x0014
-#define SCAN_ESC 0x0017
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INPUT_RESET) (
- IN struct _SIMPLE_INPUT_INTERFACE *This,
- IN BOOLEAN ExtendedVerification
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INPUT_READ_KEY) (
- IN struct _SIMPLE_INPUT_INTERFACE *This,
- OUT EFI_INPUT_KEY *Key
- );
-
-typedef struct _SIMPLE_INPUT_INTERFACE {
- EFI_INPUT_RESET Reset;
- EFI_INPUT_READ_KEY ReadKeyStroke;
- EFI_EVENT WaitForKey;
-} SIMPLE_INPUT_INTERFACE;
-
-#endif
-
Index: g5/boot/arch/ia64/loader/gefi/inc/efiprot.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/efiprot.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/efiprot.h (nonexistent)
@@ -1,558 +0,0 @@
-#ifndef _EFI_PROT_H
-#define _EFI_PROT_H
-
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- efiprot.h
-
-Abstract:
-
- EFI Protocols
-
-
-
-Revision History
-
---*/
-
-//
-// FPSWA library protocol
-//
-#define FPSWA_PROTOCOL \
- { 0xc41b6531, 0x97b9, 0x11d3, {0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-//
-// Device Path protocol
-//
-
-#define DEVICE_PATH_PROTOCOL \
- { 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-
-//
-// Block IO protocol
-//
-
-#define BLOCK_IO_PROTOCOL \
- { 0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-#define EFI_BLOCK_IO_INTERFACE_REVISION 0x00010000
-
-INTERFACE_DECL(_EFI_BLOCK_IO);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_RESET) (
- IN struct _EFI_BLOCK_IO *This,
- IN BOOLEAN ExtendedVerification
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_READ) (
- IN struct _EFI_BLOCK_IO *This,
- IN UINT32 MediaId,
- IN EFI_LBA LBA,
- IN UINTN BufferSize,
- OUT VOID *Buffer
- );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_WRITE) (
- IN struct _EFI_BLOCK_IO *This,
- IN UINT32 MediaId,
- IN EFI_LBA LBA,
- IN UINTN BufferSize,
- IN VOID *Buffer
- );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_FLUSH) (
- IN struct _EFI_BLOCK_IO *This
- );
-
-
-
-typedef struct {
- UINT32 MediaId;
- BOOLEAN RemovableMedia;
- BOOLEAN MediaPresent;
-
- BOOLEAN LogicalPartition;
- BOOLEAN ReadOnly;
- BOOLEAN WriteCaching;
-
- UINT32 BlockSize;
- UINT32 IoAlign;
-
- EFI_LBA LastBlock;
-} EFI_BLOCK_IO_MEDIA;
-
-typedef struct _EFI_BLOCK_IO {
- UINT64 Revision;
-
- EFI_BLOCK_IO_MEDIA *Media;
-
- EFI_BLOCK_RESET Reset;
- EFI_BLOCK_READ ReadBlocks;
- EFI_BLOCK_WRITE WriteBlocks;
- EFI_BLOCK_FLUSH FlushBlocks;
-
-} EFI_BLOCK_IO;
-
-
-
-//
-// Disk Block IO protocol
-//
-
-#define DISK_IO_PROTOCOL \
- { 0xce345171, 0xba0b, 0x11d2, {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-#define EFI_DISK_IO_INTERFACE_REVISION 0x00010000
-
-INTERFACE_DECL(_EFI_DISK_IO);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DISK_READ) (
- IN struct _EFI_DISK_IO *This,
- IN UINT32 MediaId,
- IN UINT64 Offset,
- IN UINTN BufferSize,
- OUT VOID *Buffer
- );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DISK_WRITE) (
- IN struct _EFI_DISK_IO *This,
- IN UINT32 MediaId,
- IN UINT64 Offset,
- IN UINTN BufferSize,
- IN VOID *Buffer
- );
-
-
-typedef struct _EFI_DISK_IO {
- UINT64 Revision;
- EFI_DISK_READ ReadDisk;
- EFI_DISK_WRITE WriteDisk;
-} EFI_DISK_IO;
-
-
-//
-// Simple file system protocol
-//
-
-#define SIMPLE_FILE_SYSTEM_PROTOCOL \
- { 0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_EFI_FILE_IO_INTERFACE);
-INTERFACE_DECL(_EFI_FILE_HANDLE);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_VOLUME_OPEN) (
- IN struct _EFI_FILE_IO_INTERFACE *This,
- OUT struct _EFI_FILE_HANDLE **Root
- );
-
-#define EFI_FILE_IO_INTERFACE_REVISION 0x00010000
-
-typedef struct _EFI_FILE_IO_INTERFACE {
- UINT64 Revision;
- EFI_VOLUME_OPEN OpenVolume;
-} EFI_FILE_IO_INTERFACE;
-
-//
-//
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_OPEN) (
- IN struct _EFI_FILE_HANDLE *File,
- OUT struct _EFI_FILE_HANDLE **NewHandle,
- IN CHAR16 *FileName,
- IN UINT64 OpenMode,
- IN UINT64 Attributes
- );
-
-// Open modes
-#define EFI_FILE_MODE_READ 0x0000000000000001
-#define EFI_FILE_MODE_WRITE 0x0000000000000002
-#define EFI_FILE_MODE_CREATE 0x8000000000000000
-
-// File attributes
-#define EFI_FILE_READ_ONLY 0x0000000000000001
-#define EFI_FILE_HIDDEN 0x0000000000000002
-#define EFI_FILE_SYSTEM 0x0000000000000004
-#define EFI_FILE_RESERVIED 0x0000000000000008
-#define EFI_FILE_DIRECTORY 0x0000000000000010
-#define EFI_FILE_ARCHIVE 0x0000000000000020
-#define EFI_FILE_VALID_ATTR 0x0000000000000037
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_CLOSE) (
- IN struct _EFI_FILE_HANDLE *File
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_DELETE) (
- IN struct _EFI_FILE_HANDLE *File
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_READ) (
- IN struct _EFI_FILE_HANDLE *File,
- IN OUT UINTN *BufferSize,
- OUT VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_WRITE) (
- IN struct _EFI_FILE_HANDLE *File,
- IN OUT UINTN *BufferSize,
- IN VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_SET_POSITION) (
- IN struct _EFI_FILE_HANDLE *File,
- IN UINT64 Position
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_GET_POSITION) (
- IN struct _EFI_FILE_HANDLE *File,
- OUT UINT64 *Position
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_GET_INFO) (
- IN struct _EFI_FILE_HANDLE *File,
- IN EFI_GUID *InformationType,
- IN OUT UINTN *BufferSize,
- OUT VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_SET_INFO) (
- IN struct _EFI_FILE_HANDLE *File,
- IN EFI_GUID *InformationType,
- IN UINTN BufferSize,
- IN VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_FLUSH) (
- IN struct _EFI_FILE_HANDLE *File
- );
-
-
-
-#define EFI_FILE_HANDLE_REVISION 0x00010000
-typedef struct _EFI_FILE_HANDLE {
- UINT64 Revision;
- EFI_FILE_OPEN Open;
- EFI_FILE_CLOSE Close;
- EFI_FILE_DELETE Delete;
- EFI_FILE_READ Read;
- EFI_FILE_WRITE Write;
- EFI_FILE_GET_POSITION GetPosition;
- EFI_FILE_SET_POSITION SetPosition;
- EFI_FILE_GET_INFO GetInfo;
- EFI_FILE_SET_INFO SetInfo;
- EFI_FILE_FLUSH Flush;
-} EFI_FILE, *EFI_FILE_HANDLE;
-
-
-//
-// File information types
-//
-
-#define EFI_FILE_INFO_ID \
- { 0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-typedef struct {
- UINT64 Size;
- UINT64 FileSize;
- UINT64 PhysicalSize;
- EFI_TIME CreateTime;
- EFI_TIME LastAccessTime;
- EFI_TIME ModificationTime;
- UINT64 Attribute;
- CHAR16 FileName[1];
-} EFI_FILE_INFO;
-
-//
-// The FileName field of the EFI_FILE_INFO data structure is variable length.
-// Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
-// be the size of the data structure without the FileName field. The following macro
-// computes this size correctly no matter how big the FileName array is declared.
-// This is required to make the EFI_FILE_INFO data structure ANSI compilant.
-//
-
-#define SIZE_OF_EFI_FILE_INFO EFI_FIELD_OFFSET(EFI_FILE_INFO,FileName)
-
-#define EFI_FILE_SYSTEM_INFO_ID \
- { 0x9576e93, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-typedef struct {
- UINT64 Size;
- BOOLEAN ReadOnly;
- UINT64 VolumeSize;
- UINT64 FreeSpace;
- UINT32 BlockSize;
- CHAR16 VolumeLabel[1];
-} EFI_FILE_SYSTEM_INFO;
-
-//
-// The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
-// Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
-// to be the size of the data structure without the VolumeLable field. The following macro
-// computes this size correctly no matter how big the VolumeLable array is declared.
-// This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
-//
-
-#define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_INFO,VolumeLabel)
-
-#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID \
- { 0xDB47D7D3,0xFE81, 0x11d3, {0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
-
-typedef struct {
- CHAR16 VolumeLabel[1];
-} EFI_FILE_SYSTEM_VOLUME_LABEL_INFO;
-
-#define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL_INFO,VolumeLabel)
-
-//
-// Load file protocol
-//
-
-
-#define LOAD_FILE_PROTOCOL \
- { 0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
-
-INTERFACE_DECL(_EFI_LOAD_FILE_INTERFACE);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOAD_FILE) (
- IN struct _EFI_LOAD_FILE_INTERFACE *This,
- IN EFI_DEVICE_PATH *FilePath,
- IN BOOLEAN BootPolicy,
- IN OUT UINTN *BufferSize,
- IN VOID *Buffer OPTIONAL
- );
-
-typedef struct _EFI_LOAD_FILE_INTERFACE {
- EFI_LOAD_FILE LoadFile;
-} EFI_LOAD_FILE_INTERFACE;
-
-
-//
-// Device IO protocol
-//
-
-#define DEVICE_IO_PROTOCOL \
- { 0xaf6ac311, 0x84c3, 0x11d2, {0x8e, 0x3c, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_EFI_DEVICE_IO_INTERFACE);
-
-typedef enum {
- IO_UINT8,
- IO_UINT16,
- IO_UINT32,
- IO_UINT64,
-//
-// Specification Change: Copy from MMIO to MMIO vs. MMIO to buffer, buffer to MMIO
-//
- MMIO_COPY_UINT8,
- MMIO_COPY_UINT16,
- MMIO_COPY_UINT32,
- MMIO_COPY_UINT64
-} EFI_IO_WIDTH;
-
-#define EFI_PCI_ADDRESS(_bus,_dev,_func) \
- ( (UINT64) ( (((UINTN)_bus) << 24) + (((UINTN)_dev) << 16) + (((UINTN)_func) << 8) ) )
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DEVICE_IO) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN EFI_IO_WIDTH Width,
- IN UINT64 Address,
- IN UINTN Count,
- IN OUT VOID *Buffer
- );
-
-typedef struct {
- EFI_DEVICE_IO Read;
- EFI_DEVICE_IO Write;
-} EFI_IO_ACCESS;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_DEVICE_PATH) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN UINT64 Address,
- IN OUT EFI_DEVICE_PATH **PciDevicePath
- );
-
-typedef enum {
- EfiBusMasterRead,
- EfiBusMasterWrite,
- EfiBusMasterCommonBuffer
-} EFI_IO_OPERATION_TYPE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_MAP) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN EFI_IO_OPERATION_TYPE Operation,
- IN EFI_PHYSICAL_ADDRESS *HostAddress,
- IN OUT UINTN *NumberOfBytes,
- OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
- OUT VOID **Mapping
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_UNMAP) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN VOID *Mapping
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_ALLOCATE_BUFFER) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN EFI_ALLOCATE_TYPE Type,
- IN EFI_MEMORY_TYPE MemoryType,
- IN UINTN Pages,
- IN OUT EFI_PHYSICAL_ADDRESS *HostAddress
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_FLUSH) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_FREE_BUFFER) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN UINTN Pages,
- IN EFI_PHYSICAL_ADDRESS HostAddress
- );
-
-typedef struct _EFI_DEVICE_IO_INTERFACE {
- EFI_IO_ACCESS Mem;
- EFI_IO_ACCESS Io;
- EFI_IO_ACCESS Pci;
- EFI_IO_MAP Map;
- EFI_PCI_DEVICE_PATH PciDevicePath;
- EFI_IO_UNMAP Unmap;
- EFI_IO_ALLOCATE_BUFFER AllocateBuffer;
- EFI_IO_FLUSH Flush;
- EFI_IO_FREE_BUFFER FreeBuffer;
-} EFI_DEVICE_IO_INTERFACE;
-
-
-//
-// Unicode Collation protocol
-//
-
-#define UNICODE_COLLATION_PROTOCOL \
- { 0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define UNICODE_BYTE_ORDER_MARK (CHAR16)(0xfeff)
-
-INTERFACE_DECL(_EFI_UNICODE_COLLATION_INTERFACE);
-
-typedef
-INTN
-(EFIAPI *EFI_UNICODE_STRICOLL) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *s1,
- IN CHAR16 *s2
- );
-
-typedef
-BOOLEAN
-(EFIAPI *EFI_UNICODE_METAIMATCH) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *String,
- IN CHAR16 *Pattern
- );
-
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_STRLWR) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN OUT CHAR16 *Str
- );
-
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_STRUPR) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN OUT CHAR16 *Str
- );
-
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_FATTOSTR) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN UINTN FatSize,
- IN CHAR8 *Fat,
- OUT CHAR16 *String
- );
-
-typedef
-BOOLEAN
-(EFIAPI *EFI_UNICODE_STRTOFAT) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *String,
- IN UINTN FatSize,
- OUT CHAR8 *Fat
- );
-
-
-typedef struct _EFI_UNICODE_COLLATION_INTERFACE {
-
- // general
- EFI_UNICODE_STRICOLL StriColl;
- EFI_UNICODE_METAIMATCH MetaiMatch;
- EFI_UNICODE_STRLWR StrLwr;
- EFI_UNICODE_STRUPR StrUpr;
-
- // for supporting fat volumes
- EFI_UNICODE_FATTOSTR FatToStr;
- EFI_UNICODE_STRTOFAT StrToFat;
-
- CHAR8 *SupportedLanguages;
-} EFI_UNICODE_COLLATION_INTERFACE;
-
-#endif
-
Index: g5/boot/arch/ia64/loader/gefi/inc/ia32/efilibplat.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/ia32/efilibplat.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/ia32/efilibplat.h (nonexistent)
@@ -1,26 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- efilibplat.h
-
-Abstract:
-
- EFI to compile bindings
-
-
-
-
-Revision History
-
---*/
-
-VOID
-InitializeLibPlatform (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- );
-
-
Index: g5/boot/arch/ia64/loader/gefi/inc/ia32/efibind.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/ia32/efibind.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/ia32/efibind.h (nonexistent)
@@ -1,263 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- efefind.h
-
-Abstract:
-
- EFI to compile bindings
-
-
-
-
-Revision History
-
---*/
-
-#ifndef __GNUC__
-#pragma pack()
-#endif
-
-//
-// Basic int types of various widths
-//
-
-#if (__STDC_VERSION__ < 199901L )
-
- // No ANSI C 1999/2000 stdint.h integer width declarations
-
- #if _MSC_EXTENSIONS
-
- // Use Microsoft C compiler integer width declarations
-
- typedef unsigned __int64 uint64_t;
- typedef __int64 int64_t;
- typedef unsigned __int32 uint32_t;
- typedef __int32 int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #elif defined(__GNUC__)
- typedef unsigned long long uint64_t __attribute__((aligned (8)));
- typedef long long int64_t __attribute__((aligned (8)));
- typedef unsigned int uint32_t;
- typedef int int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #elif defined(UNIX_LP64)
-
- /* Use LP64 programming model from C_FLAGS for integer width declarations */
-
- typedef unsigned long uint64_t;
- typedef long int64_t;
- typedef unsigned int uint32_t;
- typedef int int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #else
-
- /* Assume P64 programming model from C_FLAGS for integer width declarations */
-
- typedef unsigned long long uint64_t __attribute__((aligned (8)));
- typedef long long int64_t __attribute__((aligned (8)));
- typedef unsigned int uint32_t;
- typedef int int32_t;
- typedef unsigned short uint16_t;
- typedef short int16_t;
- typedef unsigned char uint8_t;
- typedef char int8_t;
- #endif
-#endif
-
-//
-// Basic EFI types of various widths
-//
-
-#ifndef __WCHAR_TYPE__
-# define __WCHAR_TYPE__ short
-#endif
-
-typedef uint64_t UINT64;
-typedef int64_t INT64;
-
-#ifndef _BASETSD_H_
- typedef uint32_t UINT32;
- typedef int32_t INT32;
-#endif
-
-typedef uint16_t UINT16;
-typedef int16_t INT16;
-typedef uint8_t UINT8;
-typedef int8_t INT8;
-typedef __WCHAR_TYPE__ WCHAR;
-
-#undef VOID
-#define VOID void
-
-
-typedef int32_t INTN;
-typedef uint32_t UINTN;
-
-#ifdef EFI_NT_EMULATOR
- #define POST_CODE(_Data)
-#else
- #ifdef EFI_DEBUG
-#define POST_CODE(_Data) __asm mov eax,(_Data) __asm out 0x80,al
- #else
- #define POST_CODE(_Data)
- #endif
-#endif
-
-#define EFIERR(a) (0x80000000 | a)
-#define EFI_ERROR_MASK 0x80000000
-#define EFIERR_OEM(a) (0xc0000000 | a)
-
-
-#define BAD_POINTER 0xFBFBFBFB
-#define MAX_ADDRESS 0xFFFFFFFF
-
-#ifdef EFI_NT_EMULATOR
- #define BREAKPOINT() __asm { int 3 }
-#else
- #define BREAKPOINT() while (TRUE); // Make it hang on Bios[Dbg]32
-#endif
-
-//
-// Pointers must be aligned to these address to function
-//
-
-#define MIN_ALIGNMENT_SIZE 4
-
-#define ALIGN_VARIABLE(Value ,Adjustment) \
- (UINTN)Adjustment = 0; \
- if((UINTN)Value % MIN_ALIGNMENT_SIZE) \
- (UINTN)Adjustment = MIN_ALIGNMENT_SIZE - ((UINTN)Value % MIN_ALIGNMENT_SIZE); \
- Value = (UINTN)Value + (UINTN)Adjustment
-
-
-//
-// Define macros to build data structure signatures from characters.
-//
-
-#define EFI_SIGNATURE_16(A,B) ((A) | (B<<8))
-#define EFI_SIGNATURE_32(A,B,C,D) (EFI_SIGNATURE_16(A,B) | (EFI_SIGNATURE_16(C,D) << 16))
-#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32))
-//
-// To export & import functions in the EFI emulator environment
-//
-
-#if EFI_NT_EMULATOR
- #define EXPORTAPI __declspec( dllexport )
-#else
- #define EXPORTAPI
-#endif
-
-
-//
-// EFIAPI - prototype calling convention for EFI function pointers
-// BOOTSERVICE - prototype for implementation of a boot service interface
-// RUNTIMESERVICE - prototype for implementation of a runtime service interface
-// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service
-// RUNTIME_CODE - pragma macro for declaring runtime code
-//
-
-#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
- #if _MSC_EXTENSIONS
- #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
- #else
- #define EFIAPI // Substitute expresion to force C calling convention
- #endif
-#endif
-
-#define BOOTSERVICE
-//#define RUNTIMESERVICE(proto,a) alloc_text("rtcode",a); proto a
-//#define RUNTIMEFUNCTION(proto,a) alloc_text("rtcode",a); proto a
-#define RUNTIMESERVICE
-#define RUNTIMEFUNCTION
-
-
-#define RUNTIME_CODE(a) alloc_text("rtcode", a)
-#define BEGIN_RUNTIME_DATA() data_seg("rtdata")
-#define END_RUNTIME_DATA() data_seg("")
-
-#define VOLATILE volatile
-
-#define MEMORY_FENCE()
-
-#ifdef EFI_NT_EMULATOR
-
-//
-// To help ensure proper coding of integrated drivers, they are
-// compiled as DLLs. In NT they require a dll init entry pointer.
-// The macro puts a stub entry point into the DLL so it will load.
-//
-
-#define EFI_DRIVER_ENTRY_POINT(InitFunction) \
- UINTN \
- __stdcall \
- _DllMainCRTStartup ( \
- UINTN Inst, \
- UINTN reason_for_call, \
- VOID *rserved \
- ) \
- { \
- return 1; \
- } \
- \
- int \
- EXPORTAPI \
- __cdecl \
- InitializeDriver ( \
- void *ImageHandle, \
- void *SystemTable \
- ) \
- { \
- return InitFunction(ImageHandle, SystemTable); \
- }
-
-
- #define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
- (_if)->LoadInternal(type, name, NULL)
-
-#else // EFI_NT_EMULATOR
-
-//
-// When build similiar to FW, then link everything together as
-// one big module.
-//
-
- #define EFI_DRIVER_ENTRY_POINT(InitFunction)
-
- #define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
- (_if)->LoadInternal(type, name, entry)
-
-#endif // EFI_FW_NT
-
-//
-// Some compilers don't support the forward reference construct:
-// typedef struct XXXXX
-//
-// The following macro provide a workaround for such cases.
-//
-#ifdef NO_INTERFACE_DECL
-#define INTERFACE_DECL(x)
-#else
-#ifdef __GNUC__
-#define INTERFACE_DECL(x) struct x
-#else
-#define INTERFACE_DECL(x) typedef struct x
-#endif
-#endif
-
-#if _MSC_EXTENSIONS
-#pragma warning ( disable : 4731 ) // Suppress warnings about modification of EBP
-#endif
-
Index: g5/boot/arch/ia64/loader/gefi/inc/ia32/pe.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/ia32/pe.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/ia32/pe.h (nonexistent)
@@ -1,591 +0,0 @@
-/*
- PE32+ header file
- */
-#ifndef _PE_H
-#define _PE_H
-
-#define IMAGE_DOS_SIGNATURE 0x5A4D // MZ
-#define IMAGE_OS2_SIGNATURE 0x454E // NE
-#define IMAGE_OS2_SIGNATURE_LE 0x454C // LE
-#define IMAGE_NT_SIGNATURE 0x00004550 // PE00
-#define IMAGE_EDOS_SIGNATURE 0x44454550 // PEED
-
-
-typedef struct _IMAGE_DOS_HEADER { // DOS .EXE header
- UINT16 e_magic; // Magic number
- UINT16 e_cblp; // Bytes on last page of file
- UINT16 e_cp; // Pages in file
- UINT16 e_crlc; // Relocations
- UINT16 e_cparhdr; // Size of header in paragraphs
- UINT16 e_minalloc; // Minimum extra paragraphs needed
- UINT16 e_maxalloc; // Maximum extra paragraphs needed
- UINT16 e_ss; // Initial (relative) SS value
- UINT16 e_sp; // Initial SP value
- UINT16 e_csum; // Checksum
- UINT16 e_ip; // Initial IP value
- UINT16 e_cs; // Initial (relative) CS value
- UINT16 e_lfarlc; // File address of relocation table
- UINT16 e_ovno; // Overlay number
- UINT16 e_res[4]; // Reserved words
- UINT16 e_oemid; // OEM identifier (for e_oeminfo)
- UINT16 e_oeminfo; // OEM information; e_oemid specific
- UINT16 e_res2[10]; // Reserved words
- UINT32 e_lfanew; // File address of new exe header
- } IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
-
-typedef struct _IMAGE_OS2_HEADER { // OS/2 .EXE header
- UINT16 ne_magic; // Magic number
- UINT8 ne_ver; // Version number
- UINT8 ne_rev; // Revision number
- UINT16 ne_enttab; // Offset of Entry Table
- UINT16 ne_cbenttab; // Number of bytes in Entry Table
- UINT32 ne_crc; // Checksum of whole file
- UINT16 ne_flags; // Flag UINT16
- UINT16 ne_autodata; // Automatic data segment number
- UINT16 ne_heap; // Initial heap allocation
- UINT16 ne_stack; // Initial stack allocation
- UINT32 ne_csip; // Initial CS:IP setting
- UINT32 ne_sssp; // Initial SS:SP setting
- UINT16 ne_cseg; // Count of file segments
- UINT16 ne_cmod; // Entries in Module Reference Table
- UINT16 ne_cbnrestab; // Size of non-resident name table
- UINT16 ne_segtab; // Offset of Segment Table
- UINT16 ne_rsrctab; // Offset of Resource Table
- UINT16 ne_restab; // Offset of resident name table
- UINT16 ne_modtab; // Offset of Module Reference Table
- UINT16 ne_imptab; // Offset of Imported Names Table
- UINT32 ne_nrestab; // Offset of Non-resident Names Table
- UINT16 ne_cmovent; // Count of movable entries
- UINT16 ne_align; // Segment alignment shift count
- UINT16 ne_cres; // Count of resource segments
- UINT8 ne_exetyp; // Target Operating system
- UINT8 ne_flagsothers; // Other .EXE flags
- UINT16 ne_pretthunks; // offset to return thunks
- UINT16 ne_psegrefbytes; // offset to segment ref. bytes
- UINT16 ne_swaparea; // Minimum code swap area size
- UINT16 ne_expver; // Expected Windows version number
- } IMAGE_OS2_HEADER, *PIMAGE_OS2_HEADER;
-
-//
-// File header format.
-//
-
-typedef struct _IMAGE_FILE_HEADER {
- UINT16 Machine;
- UINT16 NumberOfSections;
- UINT32 TimeDateStamp;
- UINT32 PointerToSymbolTable;
- UINT32 NumberOfSymbols;
- UINT16 SizeOfOptionalHeader;
- UINT16 Characteristics;
-} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
-
-#define IMAGE_SIZEOF_FILE_HEADER 20
-
-#define IMAGE_FILE_RELOCS_STRIPPED 0x0001 // Relocation info stripped from file.
-#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references).
-#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file.
-#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file.
-#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed.
-#define IMAGE_FILE_32BIT_MACHINE 0x0100 // 32 bit word machine.
-#define IMAGE_FILE_DEBUG_STRIPPED 0x0200 // Debugging info stripped from file in .DBG file
-#define IMAGE_FILE_SYSTEM 0x1000 // System File.
-#define IMAGE_FILE_DLL 0x2000 // File is a DLL.
-#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000 // Bytes of machine word are reversed.
-
-#define IMAGE_FILE_MACHINE_UNKNOWN 0
-#define IMAGE_FILE_MACHINE_I386 0x14c // Intel 386.
-#define IMAGE_FILE_MACHINE_R3000 0x162 // MIPS little-endian, 0540 big-endian
-#define IMAGE_FILE_MACHINE_R4000 0x166 // MIPS little-endian
-#define IMAGE_FILE_MACHINE_ALPHA 0x184 // Alpha_AXP
-#define IMAGE_FILE_MACHINE_POWERPC 0x1F0 // IBM PowerPC Little-Endian
-#define IMAGE_FILE_MACHINE_TAHOE 0x7cc // Intel EM machine
-//
-// Directory format.
-//
-
-typedef struct _IMAGE_DATA_DIRECTORY {
- UINT32 VirtualAddress;
- UINT32 Size;
-} IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY;
-
-#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
-
-//
-// Optional header format.
-//
-
-typedef struct _IMAGE_OPTIONAL_HEADER {
- //
- // Standard fields.
- //
-
- UINT16 Magic;
- UINT8 MajorLinkerVersion;
- UINT8 MinorLinkerVersion;
- UINT32 SizeOfCode;
- UINT32 SizeOfInitializedData;
- UINT32 SizeOfUninitializedData;
- UINT32 AddressOfEntryPoint;
- UINT32 BaseOfCode;
- UINT32 BaseOfData;
-
- //
- // NT additional fields.
- //
-
- UINT32 ImageBase;
- UINT32 SectionAlignment;
- UINT32 FileAlignment;
- UINT16 MajorOperatingSystemVersion;
- UINT16 MinorOperatingSystemVersion;
- UINT16 MajorImageVersion;
- UINT16 MinorImageVersion;
- UINT16 MajorSubsystemVersion;
- UINT16 MinorSubsystemVersion;
- UINT32 Reserved1;
- UINT32 SizeOfImage;
- UINT32 SizeOfHeaders;
- UINT32 CheckSum;
- UINT16 Subsystem;
- UINT16 DllCharacteristics;
- UINT32 SizeOfStackReserve;
- UINT32 SizeOfStackCommit;
- UINT32 SizeOfHeapReserve;
- UINT32 SizeOfHeapCommit;
- UINT32 LoaderFlags;
- UINT32 NumberOfRvaAndSizes;
- IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
-} IMAGE_OPTIONAL_HEADER, *PIMAGE_OPTIONAL_HEADER;
-
-typedef struct _IMAGE_ROM_OPTIONAL_HEADER {
- UINT16 Magic;
- UINT8 MajorLinkerVersion;
- UINT8 MinorLinkerVersion;
- UINT32 SizeOfCode;
- UINT32 SizeOfInitializedData;
- UINT32 SizeOfUninitializedData;
- UINT32 AddressOfEntryPoint;
- UINT32 BaseOfCode;
- UINT32 BaseOfData;
- UINT32 BaseOfBss;
- UINT32 GprMask;
- UINT32 CprMask[4];
- UINT32 GpValue;
-} IMAGE_ROM_OPTIONAL_HEADER, *PIMAGE_ROM_OPTIONAL_HEADER;
-
-#define IMAGE_SIZEOF_ROM_OPTIONAL_HEADER 56
-#define IMAGE_SIZEOF_STD_OPTIONAL_HEADER 28
-#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER 224
-
-#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
-#define IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
-
-typedef struct _IMAGE_NT_HEADERS {
- UINT32 Signature;
- IMAGE_FILE_HEADER FileHeader;
- IMAGE_OPTIONAL_HEADER OptionalHeader;
-} IMAGE_NT_HEADERS, *PIMAGE_NT_HEADERS;
-
-typedef struct _IMAGE_ROM_HEADERS {
- IMAGE_FILE_HEADER FileHeader;
- IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;
-} IMAGE_ROM_HEADERS, *PIMAGE_ROM_HEADERS;
-
-#define IMAGE_FIRST_SECTION( ntheader ) ((PIMAGE_SECTION_HEADER) \
- ((UINT32)ntheader + \
- FIELD_OFFSET( IMAGE_NT_HEADERS, OptionalHeader ) + \
- ((PIMAGE_NT_HEADERS)(ntheader))->FileHeader.SizeOfOptionalHeader \
- ))
-
-
-// Subsystem Values
-
-#define IMAGE_SUBSYSTEM_UNKNOWN 0 // Unknown subsystem.
-#define IMAGE_SUBSYSTEM_NATIVE 1 // Image doesn't require a subsystem.
-#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2 // Image runs in the Windows GUI subsystem.
-#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3 // Image runs in the Windows character subsystem.
-#define IMAGE_SUBSYSTEM_OS2_CUI 5 // image runs in the OS/2 character subsystem.
-#define IMAGE_SUBSYSTEM_POSIX_CUI 7 // image run in the Posix character subsystem.
-
-
-// Directory Entries
-
-#define IMAGE_DIRECTORY_ENTRY_EXPORT 0 // Export Directory
-#define IMAGE_DIRECTORY_ENTRY_IMPORT 1 // Import Directory
-#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 // Resource Directory
-#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3 // Exception Directory
-#define IMAGE_DIRECTORY_ENTRY_SECURITY 4 // Security Directory
-#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 // Base Relocation Table
-#define IMAGE_DIRECTORY_ENTRY_DEBUG 6 // Debug Directory
-#define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7 // Description String
-#define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8 // Machine Value (MIPS GP)
-#define IMAGE_DIRECTORY_ENTRY_TLS 9 // TLS Directory
-#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10 // Load Configuration Directory
-
-//
-// Section header format.
-//
-
-#define IMAGE_SIZEOF_SHORT_NAME 8
-
-typedef struct _IMAGE_SECTION_HEADER {
- UINT8 Name[IMAGE_SIZEOF_SHORT_NAME];
- union {
- UINT32 PhysicalAddress;
- UINT32 VirtualSize;
- } Misc;
- UINT32 VirtualAddress;
- UINT32 SizeOfRawData;
- UINT32 PointerToRawData;
- UINT32 PointerToRelocations;
- UINT32 PointerToLinenumbers;
- UINT16 NumberOfRelocations;
- UINT16 NumberOfLinenumbers;
- UINT32 Characteristics;
-} IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
-
-#define IMAGE_SIZEOF_SECTION_HEADER 40
-
-#define IMAGE_SCN_TYPE_NO_PAD 0x00000008 // Reserved.
-
-#define IMAGE_SCN_CNT_CODE 0x00000020 // Section contains code.
-#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 // Section contains initialized data.
-#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 // Section contains uninitialized data.
-
-#define IMAGE_SCN_LNK_OTHER 0x00000100 // Reserved.
-#define IMAGE_SCN_LNK_INFO 0x00000200 // Section contains comments or some other type of information.
-#define IMAGE_SCN_LNK_REMOVE 0x00000800 // Section contents will not become part of image.
-#define IMAGE_SCN_LNK_COMDAT 0x00001000 // Section contents comdat.
-
-#define IMAGE_SCN_ALIGN_1BYTES 0x00100000 //
-#define IMAGE_SCN_ALIGN_2BYTES 0x00200000 //
-#define IMAGE_SCN_ALIGN_4BYTES 0x00300000 //
-#define IMAGE_SCN_ALIGN_8BYTES 0x00400000 //
-#define IMAGE_SCN_ALIGN_16BYTES 0x00500000 // Default alignment if no others are specified.
-#define IMAGE_SCN_ALIGN_32BYTES 0x00600000 //
-#define IMAGE_SCN_ALIGN_64BYTES 0x00700000 //
-
-#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 // Section can be discarded.
-#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 // Section is not cachable.
-#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 // Section is not pageable.
-#define IMAGE_SCN_MEM_SHARED 0x10000000 // Section is shareable.
-#define IMAGE_SCN_MEM_EXECUTE 0x20000000 // Section is executable.
-#define IMAGE_SCN_MEM_READ 0x40000000 // Section is readable.
-#define IMAGE_SCN_MEM_WRITE 0x80000000 // Section is writeable.
-
-//
-// Symbol format.
-//
-
-
-#define IMAGE_SIZEOF_SYMBOL 18
-
-//
-// Section values.
-//
-// Symbols have a section number of the section in which they are
-// defined. Otherwise, section numbers have the following meanings:
-//
-
-#define IMAGE_SYM_UNDEFINED (UINT16)0 // Symbol is undefined or is common.
-#define IMAGE_SYM_ABSOLUTE (UINT16)-1 // Symbol is an absolute value.
-#define IMAGE_SYM_DEBUG (UINT16)-2 // Symbol is a special debug item.
-
-//
-// Type (fundamental) values.
-//
-
-#define IMAGE_SYM_TYPE_NULL 0 // no type.
-#define IMAGE_SYM_TYPE_VOID 1 //
-#define IMAGE_SYM_TYPE_CHAR 2 // type character.
-#define IMAGE_SYM_TYPE_SHORT 3 // type short integer.
-#define IMAGE_SYM_TYPE_INT 4 //
-#define IMAGE_SYM_TYPE_LONG 5 //
-#define IMAGE_SYM_TYPE_FLOAT 6 //
-#define IMAGE_SYM_TYPE_DOUBLE 7 //
-#define IMAGE_SYM_TYPE_STRUCT 8 //
-#define IMAGE_SYM_TYPE_UNION 9 //
-#define IMAGE_SYM_TYPE_ENUM 10 // enumeration.
-#define IMAGE_SYM_TYPE_MOE 11 // member of enumeration.
-#define IMAGE_SYM_TYPE_BYTE 12 //
-#define IMAGE_SYM_TYPE_WORD 13 //
-#define IMAGE_SYM_TYPE_UINT 14 //
-#define IMAGE_SYM_TYPE_DWORD 15 //
-
-//
-// Type (derived) values.
-//
-
-#define IMAGE_SYM_DTYPE_NULL 0 // no derived type.
-#define IMAGE_SYM_DTYPE_POINTER 1 // pointer.
-#define IMAGE_SYM_DTYPE_FUNCTION 2 // function.
-#define IMAGE_SYM_DTYPE_ARRAY 3 // array.
-
-//
-// Storage classes.
-//
-
-#define IMAGE_SYM_CLASS_END_OF_FUNCTION (BYTE )-1
-#define IMAGE_SYM_CLASS_NULL 0
-#define IMAGE_SYM_CLASS_AUTOMATIC 1
-#define IMAGE_SYM_CLASS_EXTERNAL 2
-#define IMAGE_SYM_CLASS_STATIC 3
-#define IMAGE_SYM_CLASS_REGISTER 4
-#define IMAGE_SYM_CLASS_EXTERNAL_DEF 5
-#define IMAGE_SYM_CLASS_LABEL 6
-#define IMAGE_SYM_CLASS_UNDEFINED_LABEL 7
-#define IMAGE_SYM_CLASS_MEMBER_OF_STRUCT 8
-#define IMAGE_SYM_CLASS_ARGUMENT 9
-#define IMAGE_SYM_CLASS_STRUCT_TAG 10
-#define IMAGE_SYM_CLASS_MEMBER_OF_UNION 11
-#define IMAGE_SYM_CLASS_UNION_TAG 12
-#define IMAGE_SYM_CLASS_TYPE_DEFINITION 13
-#define IMAGE_SYM_CLASS_UNDEFINED_STATIC 14
-#define IMAGE_SYM_CLASS_ENUM_TAG 15
-#define IMAGE_SYM_CLASS_MEMBER_OF_ENUM 16
-#define IMAGE_SYM_CLASS_REGISTER_PARAM 17
-#define IMAGE_SYM_CLASS_BIT_FIELD 18
-#define IMAGE_SYM_CLASS_BLOCK 100
-#define IMAGE_SYM_CLASS_FUNCTION 101
-#define IMAGE_SYM_CLASS_END_OF_STRUCT 102
-#define IMAGE_SYM_CLASS_FILE 103
-// new
-#define IMAGE_SYM_CLASS_SECTION 104
-#define IMAGE_SYM_CLASS_WEAK_EXTERNAL 105
-
-// type packing constants
-
-#define N_BTMASK 017
-#define N_TMASK 060
-#define N_TMASK1 0300
-#define N_TMASK2 0360
-#define N_BTSHFT 4
-#define N_TSHIFT 2
-
-// MACROS
-
-//
-// Communal selection types.
-//
-
-#define IMAGE_COMDAT_SELECT_NODUPLICATES 1
-#define IMAGE_COMDAT_SELECT_ANY 2
-#define IMAGE_COMDAT_SELECT_SAME_SIZE 3
-#define IMAGE_COMDAT_SELECT_EXACT_MATCH 4
-#define IMAGE_COMDAT_SELECT_ASSOCIATIVE 5
-
-#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
-#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
-#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
-
-
-//
-// Relocation format.
-//
-
-typedef struct _IMAGE_RELOCATION {
- UINT32 VirtualAddress;
- UINT32 SymbolTableIndex;
- UINT16 Type;
-} IMAGE_RELOCATION;
-
-#define IMAGE_SIZEOF_RELOCATION 10
-
-//
-// I386 relocation types.
-//
-
-#define IMAGE_REL_I386_ABSOLUTE 0 // Reference is absolute, no relocation is necessary
-#define IMAGE_REL_I386_DIR16 01 // Direct 16-bit reference to the symbols virtual address
-#define IMAGE_REL_I386_REL16 02 // PC-relative 16-bit reference to the symbols virtual address
-#define IMAGE_REL_I386_DIR32 06 // Direct 32-bit reference to the symbols virtual address
-#define IMAGE_REL_I386_DIR32NB 07 // Direct 32-bit reference to the symbols virtual address, base not included
-#define IMAGE_REL_I386_SEG12 011 // Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address
-#define IMAGE_REL_I386_SECTION 012
-#define IMAGE_REL_I386_SECREL 013
-#define IMAGE_REL_I386_REL32 024 // PC-relative 32-bit reference to the symbols virtual address
-
-//
-// MIPS relocation types.
-//
-
-#define IMAGE_REL_MIPS_ABSOLUTE 0 // Reference is absolute, no relocation is necessary
-#define IMAGE_REL_MIPS_REFHALF 01
-#define IMAGE_REL_MIPS_REFWORD 02
-#define IMAGE_REL_MIPS_JMPADDR 03
-#define IMAGE_REL_MIPS_REFHI 04
-#define IMAGE_REL_MIPS_REFLO 05
-#define IMAGE_REL_MIPS_GPREL 06
-#define IMAGE_REL_MIPS_LITERAL 07
-#define IMAGE_REL_MIPS_SECTION 012
-#define IMAGE_REL_MIPS_SECREL 013
-#define IMAGE_REL_MIPS_REFWORDNB 042
-#define IMAGE_REL_MIPS_PAIR 045
-
-//
-// Alpha Relocation types.
-//
-
-#define IMAGE_REL_ALPHA_ABSOLUTE 0x0
-#define IMAGE_REL_ALPHA_REFLONG 0x1
-#define IMAGE_REL_ALPHA_REFQUAD 0x2
-#define IMAGE_REL_ALPHA_GPREL32 0x3
-#define IMAGE_REL_ALPHA_LITERAL 0x4
-#define IMAGE_REL_ALPHA_LITUSE 0x5
-#define IMAGE_REL_ALPHA_GPDISP 0x6
-#define IMAGE_REL_ALPHA_BRADDR 0x7
-#define IMAGE_REL_ALPHA_HINT 0x8
-#define IMAGE_REL_ALPHA_INLINE_REFLONG 0x9
-#define IMAGE_REL_ALPHA_REFHI 0xA
-#define IMAGE_REL_ALPHA_REFLO 0xB
-#define IMAGE_REL_ALPHA_PAIR 0xC
-#define IMAGE_REL_ALPHA_MATCH 0xD
-#define IMAGE_REL_ALPHA_SECTION 0xE
-#define IMAGE_REL_ALPHA_SECREL 0xF
-#define IMAGE_REL_ALPHA_REFLONGNB 0x10
-
-//
-// IBM PowerPC relocation types.
-//
-
-#define IMAGE_REL_PPC_ABSOLUTE 0x0000 // NOP
-#define IMAGE_REL_PPC_ADDR64 0x0001 // 64-bit address
-#define IMAGE_REL_PPC_ADDR32 0x0002 // 32-bit address
-#define IMAGE_REL_PPC_ADDR24 0x0003 // 26-bit address, shifted left 2 (branch absolute)
-#define IMAGE_REL_PPC_ADDR16 0x0004 // 16-bit address
-#define IMAGE_REL_PPC_ADDR14 0x0005 // 16-bit address, shifted left 2 (load doubleword)
-#define IMAGE_REL_PPC_REL24 0x0006 // 26-bit PC-relative offset, shifted left 2 (branch relative)
-#define IMAGE_REL_PPC_REL14 0x0007 // 16-bit PC-relative offset, shifted left 2 (br cond relative)
-#define IMAGE_REL_PPC_TOCREL16 0x0008 // 16-bit offset from TOC base
-#define IMAGE_REL_PPC_TOCREL14 0x0009 // 16-bit offset from TOC base, shifted left 2 (load doubleword)
-
-#define IMAGE_REL_PPC_ADDR32NB 0x000A // 32-bit addr w/o image base
-#define IMAGE_REL_PPC_SECREL 0x000B // va of containing section (as in an image sectionhdr)
-#define IMAGE_REL_PPC_SECTION 0x000C // sectionheader number
-#define IMAGE_REL_PPC_IFGLUE 0x000D // substitute TOC restore instruction iff symbol is glue code
-#define IMAGE_REL_PPC_IMGLUE 0x000E // symbol is glue code; virtual address is TOC restore instruction
-
-#define IMAGE_REL_PPC_TYPEMASK 0x00FF // mask to isolate above values in IMAGE_RELOCATION.Type
-
-// Flag bits in IMAGE_RELOCATION.TYPE
-
-#define IMAGE_REL_PPC_NEG 0x0100 // subtract reloc value rather than adding it
-#define IMAGE_REL_PPC_BRTAKEN 0x0200 // fix branch prediction bit to predict branch taken
-#define IMAGE_REL_PPC_BRNTAKEN 0x0400 // fix branch prediction bit to predict branch not taken
-#define IMAGE_REL_PPC_TOCDEFN 0x0800 // toc slot defined in file (or, data in toc)
-
-//
-// Based relocation format.
-//
-
-typedef struct _IMAGE_BASE_RELOCATION {
- UINT32 VirtualAddress;
- UINT32 SizeOfBlock;
-// UINT16 TypeOffset[1];
-} IMAGE_BASE_RELOCATION, *PIMAGE_BASE_RELOCATION;
-
-#define IMAGE_SIZEOF_BASE_RELOCATION 8
-
-//
-// Based relocation types.
-//
-
-#define IMAGE_REL_BASED_ABSOLUTE 0
-#define IMAGE_REL_BASED_HIGH 1
-#define IMAGE_REL_BASED_LOW 2
-#define IMAGE_REL_BASED_HIGHLOW 3
-#define IMAGE_REL_BASED_HIGHADJ 4
-#define IMAGE_REL_BASED_MIPS_JMPADDR 5
-#define IMAGE_REL_BASED_IA64_IMM64 9
-#define IMAGE_REL_BASED_DIR64 10
-
-//
-// Line number format.
-//
-
-typedef struct _IMAGE_LINENUMBER {
- union {
- UINT32 SymbolTableIndex; // Symbol table index of function name if Linenumber is 0.
- UINT32 VirtualAddress; // Virtual address of line number.
- } Type;
- UINT16 Linenumber; // Line number.
-} IMAGE_LINENUMBER;
-
-#define IMAGE_SIZEOF_LINENUMBER 6
-
-//
-// Archive format.
-//
-
-#define IMAGE_ARCHIVE_START_SIZE 8
-#define IMAGE_ARCHIVE_START "!<arch>\n"
-#define IMAGE_ARCHIVE_END "`\n"
-#define IMAGE_ARCHIVE_PAD "\n"
-#define IMAGE_ARCHIVE_LINKER_MEMBER "/ "
-#define IMAGE_ARCHIVE_LONGNAMES_MEMBER "// "
-
-typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER {
- UINT8 Name[16]; // File member name - `/' terminated.
- UINT8 Date[12]; // File member date - decimal.
- UINT8 UserID[6]; // File member user id - decimal.
- UINT8 GroupID[6]; // File member group id - decimal.
- UINT8 Mode[8]; // File member mode - octal.
- UINT8 Size[10]; // File member size - decimal.
- UINT8 EndHeader[2]; // String to end header.
-} IMAGE_ARCHIVE_MEMBER_HEADER, *PIMAGE_ARCHIVE_MEMBER_HEADER;
-
-#define IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
-
-//
-// DLL support.
-//
-
-//
-// Export Format
-//
-
-typedef struct _IMAGE_EXPORT_DIRECTORY {
- UINT32 Characteristics;
- UINT32 TimeDateStamp;
- UINT16 MajorVersion;
- UINT16 MinorVersion;
- UINT32 Name;
- UINT32 Base;
- UINT32 NumberOfFunctions;
- UINT32 NumberOfNames;
- UINT32 *AddressOfFunctions;
- UINT32 *AddressOfNames;
- UINT32 *AddressOfNameOrdinals;
-} IMAGE_EXPORT_DIRECTORY, *PIMAGE_EXPORT_DIRECTORY;
-
-//
-// Import Format
-//
-
-typedef struct _IMAGE_IMPORT_BY_NAME {
- UINT16 Hint;
- UINT8 Name[1];
-} IMAGE_IMPORT_BY_NAME, *PIMAGE_IMPORT_BY_NAME;
-
-typedef struct _IMAGE_THUNK_DATA {
- union {
- UINT32 Function;
- UINT32 Ordinal;
- PIMAGE_IMPORT_BY_NAME AddressOfData;
- } u1;
-} IMAGE_THUNK_DATA, *PIMAGE_THUNK_DATA;
-
-#define IMAGE_ORDINAL_FLAG 0x80000000
-#define IMAGE_SNAP_BY_ORDINAL(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG) != 0)
-#define IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff)
-
-typedef struct _IMAGE_IMPORT_DESCRIPTOR {
- UINT32 Characteristics;
- UINT32 TimeDateStamp;
- UINT32 ForwarderChain;
- UINT32 Name;
- PIMAGE_THUNK_DATA FirstThunk;
-} IMAGE_IMPORT_DESCRIPTOR, *PIMAGE_IMPORT_DESCRIPTOR;
-
-#endif
Index: g5/boot/arch/ia64/loader/gefi/inc/efistdarg.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/efistdarg.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/efistdarg.h (nonexistent)
@@ -1,33 +0,0 @@
-#ifndef _EFISTDARG_H_
-#define _EFISTDARG_H_
-
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- devpath.h
-
-Abstract:
-
- Defines for parsing the EFI Device Path structures
-
-
-
-Revision History
-
---*/
-#ifdef __GNUC__
-#include "stdarg.h"
-#else
-#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(UINTN) - 1) & ~(sizeof(UINTN) - 1) )
-
-typedef CHAR8 * va_list;
-
-#define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) )
-#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
-#define va_end(ap) ( ap = (va_list)0 )
-#endif
-
-#endif /* _INC_STDARG */
Index: g5/boot/arch/ia64/loader/gefi/inc/efidebug.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/efidebug.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/efidebug.h (nonexistent)
@@ -1,110 +0,0 @@
-#ifndef _EFI_DEBUG_H
-#define _EFI_DEBUG_H
-
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
- efidebug.h
-
-Abstract:
-
- EFI library debug functions
-
-
-
-Revision History
-
---*/
-
-extern UINTN EFIDebug;
-
-#if EFI_DEBUG
-
- #define DBGASSERT(a) DbgAssert(__FILE__, __LINE__, #a)
- #define DEBUG(a) DbgPrint a
-
-#else
-
- #define DBGASSERT(a)
- #define DEBUG(a)
-
-#endif
-
-#if EFI_DEBUG_CLEAR_MEMORY
-
- #define DBGSETMEM(a,l) SetMem(a,l,(CHAR8)BAD_POINTER)
-
-#else
-
- #define DBGSETMEM(a,l)
-
-#endif
-
-#define D_INIT 0x00000001 // Initialization style messages
-#define D_WARN 0x00000002 // Warnings
-#define D_LOAD 0x00000004 // Load events
-#define D_FS 0x00000008 // EFI File system
-#define D_POOL 0x00000010 // Alloc & Free's
-#define D_PAGE 0x00000020 // Alloc & Free's
-#define D_INFO 0x00000040 // Verbose
-#define D_VAR 0x00000100 // Variable
-#define D_PARSE 0x00000200 // Command parsing
-#define D_BM 0x00000400 // Boot manager
-#define D_BLKIO 0x00001000 // BlkIo Driver
-#define D_BLKIO_ULTRA 0x00002000 // BlkIo Driver
-#define D_NET 0x00004000 // SNI Driver
-#define D_NET_ULTRA 0x00008000 // SNI Driver
-#define D_TXTIN 0x00010000 // Simple Input Driver
-#define D_TXTOUT 0x00020000 // Simple Text Output Driver
-#define D_ERROR_ATA 0x00040000 // ATA error messages
-#define D_ERROR 0x80000000 // Error
-
-#define D_RESERVED 0x7fffC880 // Bits not reserved above
-
-//
-// Current Debug level of the system, value of EFIDebug
-//
-//#define EFI_DBUG_MASK (D_ERROR | D_WARN | D_LOAD | D_BLKIO | D_INIT)
-#define EFI_DBUG_MASK (D_ERROR)
-
-//
-//
-//
-
-#if EFI_DEBUG
-
- #define ASSERT(a) if(!(a)) DBGASSERT(a)
- #define ASSERT_LOCKED(l) if(!(l)->Lock) DBGASSERT(l not locked)
- #define ASSERT_STRUCT(p,t) DBGASSERT(t not structure), p
-
-#else
-
- #define ASSERT(a)
- #define ASSERT_LOCKED(l)
- #define ASSERT_STRUCT(p,t)
-
-#endif
-
-//
-// Prototypes
-//
-
-INTN
-DbgAssert (
- CHAR8 *file,
- INTN lineno,
- CHAR8 *string
- );
-
-INTN
-DbgPrint (
- INTN mask,
- CHAR8 *format,
- ...
- );
-
-#endif
-
Index: g5/boot/arch/ia64/loader/gefi/inc/efinet.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/efinet.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/efinet.h (nonexistent)
@@ -1,340 +0,0 @@
-#ifndef _EFINET_H
-#define _EFINET_H
-
-
-/*++
-Copyright (c) 1999 Intel Corporation
-
-Module Name:
- efinet.h
-
-Abstract:
- EFI Simple Network protocol
-
-Revision History
---*/
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Simple Network Protocol
-//
-
-#define EFI_SIMPLE_NETWORK_PROTOCOL \
- { 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
-
-
-INTERFACE_DECL(_EFI_SIMPLE_NETWORK);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef struct {
- //
- // Total number of frames received. Includes frames with errors and
- // dropped frames.
- //
- UINT64 RxTotalFrames;
-
- //
- // Number of valid frames received and copied into receive buffers.
- //
- UINT64 RxGoodFrames;
-
- //
- // Number of frames below the minimum length for the media.
- // This would be <64 for ethernet.
- //
- UINT64 RxUndersizeFrames;
-
- //
- // Number of frames longer than the maxminum length for the
- // media. This would be >1500 for ethernet.
- //
- UINT64 RxOversizeFrames;
-
- //
- // Valid frames that were dropped because receive buffers were full.
- //
- UINT64 RxDroppedFrames;
-
- //
- // Number of valid unicast frames received and not dropped.
- //
- UINT64 RxUnicastFrames;
-
- //
- // Number of valid broadcast frames received and not dropped.
- //
- UINT64 RxBroadcastFrames;
-
- //
- // Number of valid mutlicast frames received and not dropped.
- //
- UINT64 RxMulticastFrames;
-
- //
- // Number of frames w/ CRC or alignment errors.
- //
- UINT64 RxCrcErrorFrames;
-
- //
- // Total number of bytes received. Includes frames with errors
- // and dropped frames.
- //
- UINT64 RxTotalBytes;
-
- //
- // Transmit statistics.
- //
- UINT64 TxTotalFrames;
- UINT64 TxGoodFrames;
- UINT64 TxUndersizeFrames;
- UINT64 TxOversizeFrames;
- UINT64 TxDroppedFrames;
- UINT64 TxUnicastFrames;
- UINT64 TxBroadcastFrames;
- UINT64 TxMulticastFrames;
- UINT64 TxCrcErrorFrames;
- UINT64 TxTotalBytes;
-
- //
- // Number of collisions detection on this subnet.
- //
- UINT64 Collisions;
-
- //
- // Number of frames destined for unsupported protocol.
- //
- UINT64 UnsupportedProtocol;
-
-} EFI_NETWORK_STATISTICS;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef enum {
- EfiSimpleNetworkStopped,
- EfiSimpleNetworkStarted,
- EfiSimpleNetworkInitialized,
- EfiSimpleNetworkMaxState
-} EFI_SIMPLE_NETWORK_STATE;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01
-#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02
-#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04
-#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08
-#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01
-#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02
-#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04
-#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08
-
-///////////////////////////////////////////////////////////////////////////////
-//
-#define MAX_MCAST_FILTER_CNT 16
-typedef struct {
- UINT32 State;
- UINT32 HwAddressSize;
- UINT32 MediaHeaderSize;
- UINT32 MaxPacketSize;
- UINT32 NvRamSize;
- UINT32 NvRamAccessSize;
- UINT32 ReceiveFilterMask;
- UINT32 ReceiveFilterSetting;
- UINT32 MaxMCastFilterCount;
- UINT32 MCastFilterCount;
- EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT];
- EFI_MAC_ADDRESS CurrentAddress;
- EFI_MAC_ADDRESS BroadcastAddress;
- EFI_MAC_ADDRESS PermanentAddress;
- UINT8 IfType;
- BOOLEAN MacAddressChangeable;
- BOOLEAN MultipleTxSupported;
- BOOLEAN MediaPresentSupported;
- BOOLEAN MediaPresent;
-} EFI_SIMPLE_NETWORK_MODE;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_START) (
- IN struct _EFI_SIMPLE_NETWORK *This
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
- IN struct _EFI_SIMPLE_NETWORK *This
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN UINTN ExtraRxBufferSize OPTIONAL,
- IN UINTN ExtraTxBufferSize OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN BOOLEAN ExtendedVerification
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
- IN struct _EFI_SIMPLE_NETWORK *This
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN UINT32 Enable,
- IN UINT32 Disable,
- IN BOOLEAN ResetMCastFilter,
- IN UINTN MCastFilterCnt OPTIONAL,
- IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN BOOLEAN Reset,
- IN EFI_MAC_ADDRESS *New OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN BOOLEAN Reset,
- IN OUT UINTN *StatisticsSize OPTIONAL,
- OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN BOOLEAN IPv6,
- IN EFI_IP_ADDRESS *IP,
- OUT EFI_MAC_ADDRESS *MAC
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN BOOLEAN ReadWrite,
- IN UINTN Offset,
- IN UINTN BufferSize,
- IN OUT VOID *Buffer
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- OUT UINT32 *InterruptStatus OPTIONAL,
- OUT VOID **TxBuf OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN UINTN HeaderSize,
- IN UINTN BufferSize,
- IN VOID *Buffer,
- IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
- IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
- IN UINT16 *Protocol OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- OUT UINTN *HeaderSize OPTIONAL,
- IN OUT UINTN *BufferSize,
- OUT VOID *Buffer,
- OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
- OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
- OUT UINT16 *Protocol OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION 0x00010000
-
-typedef struct _EFI_SIMPLE_NETWORK {
- UINT64 Revision;
- EFI_SIMPLE_NETWORK_START Start;
- EFI_SIMPLE_NETWORK_STOP Stop;
- EFI_SIMPLE_NETWORK_INITIALIZE Initialize;
- EFI_SIMPLE_NETWORK_RESET Reset;
- EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown;
- EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters;
- EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress;
- EFI_SIMPLE_NETWORK_STATISTICS Statistics;
- EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac;
- EFI_SIMPLE_NETWORK_NVDATA NvData;
- EFI_SIMPLE_NETWORK_GET_STATUS GetStatus;
- EFI_SIMPLE_NETWORK_TRANSMIT Transmit;
- EFI_SIMPLE_NETWORK_RECEIVE Receive;
- EFI_EVENT WaitForPacket;
- EFI_SIMPLE_NETWORK_MODE *Mode;
-} EFI_SIMPLE_NETWORK;
-
-#endif /* _EFINET_H */
Index: g5/boot/arch/ia64/loader/gefi/inc/protocol/readme.txt
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/protocol/readme.txt (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/protocol/readme.txt (nonexistent)
@@ -1,3 +0,0 @@
-The protocol directory contains non Architectural
-Protocols that span the FW, Platform, or application
-space.
\ No newline at end of file
Index: g5/boot/arch/ia64/loader/gefi/inc/protocol/adapterdebug.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/protocol/adapterdebug.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/protocol/adapterdebug.h (nonexistent)
@@ -1,32 +0,0 @@
-#ifndef _ADAPTER_DEBUG_H
-#define _ADAPTER_DEBUG_H
-
-/*++
-
-Copyright (c) 1999 Intel Corporation
-
-Module Name:
-
- AdapterDebug.h
-
-Abstract:
-
- Protocol to debug the EDD 3.0 enablement of BIOS option ROMs
-
-
-
-Revision History
-
---*/
-
-// {82F86881-282B-11d4-BC7D-0080C73C8881}
-#define ADAPTER_DEBUG_PROTOCOL \
-{ 0x82f86881, 0x282b, 0x11d4, {0xbc, 0x7d, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
-
-//
-// This protocol points to the BIOS_LEGACY_DRIVE data structure
-// see edd.h for more details
-//
-
-#endif
-
Index: g5/boot/arch/ia64/loader/gefi/inc/protocol/legacyboot.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/protocol/legacyboot.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/protocol/legacyboot.h (nonexistent)
@@ -1,119 +0,0 @@
-/*++
-
-Copyright (c) 1999 Intel Corporation
-
-Module Name:
-
- legacyboot
-
-Abstract:
-
- EFI support for legacy boot
-
-
-
-Revision History
-
---*/
-
-#ifndef _LEGACY_BOOT_INCLUDE_
-#define _LEGACY_BOOT_INCLUDE_
-
-#define LEGACY_BOOT_PROTOCOL \
- { 0x376e5eb2, 0x30e4, 0x11d3, { 0xba, 0xe5, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
-
-#pragma pack(1)
-
-//
-// BBS 1.01 (See Appendix A) IPL and BCV Table Entry Data structure.
-// Seg:Off pointers have been converted to EFI pointers in this data structure
-// This is the structure that also maps to the EFI device path for the boot selection
-//
-typedef struct {
- UINT16 DeviceType;
- UINT16 StatusFlag;
- UINT32 Reserved;
- VOID *BootHandler; // Not an EFI entry point
- CHAR8 *DescString;
-} BBS_TABLE_ENTRY;
-#pragma pack()
-
-typedef
-EFI_STATUS
-(EFIAPI *LEGACY_BOOT_CALL) (
- IN EFI_DEVICE_PATH *DevicePath
- );
-
-
-//
-// BBS support functions
-// PnP Call numbers and BiosSelector hidden in implementation
-//
-
-typedef enum {
- IplRelative,
- BcvRelative
-} BBS_TYPE;
-
-INTERFACE_DECL(_LEGACY_BOOT_INTERFACE);
-
-//
-// == PnP Function 0x60 then BbsVersion == 0x0101 if this call fails then BbsVersion == 0x0000
-//
-
-//
-// == PnP Function 0x61
-//
-typedef
-EFI_STATUS
-(EFIAPI *GET_DEVICE_COUNT) (
- IN struct _LEGACY_BOOT_INTERFACE *This,
- IN BBS_TYPE *TableType,
- OUT UINTN *DeviceCount,
- OUT UINTN *MaxCount
- );
-
-//
-// == PnP Function 0x62
-//
-typedef
-EFI_STATUS
-(EFIAPI *GET_PRIORITY_AND_TABLE) (
- IN struct _LEGACY_BOOT_INTERFACE *This,
- IN BBS_TYPE *TableType,
- IN OUT UINTN *PrioritySize, // MaxCount * sizeof(UINT8)
- OUT UINTN *Priority,
- IN OUT UINTN *TableSize, // MaxCount * sizeof(BBS_TABLE_ENTRY)
- OUT BBS_TABLE_ENTRY *TableEntrySize
- );
-
-//
-// == PnP Function 0x63
-//
-typedef
-EFI_STATUS
-(EFIAPI *SET_PRIORITY) (
- IN struct _LEGACY_BOOT_INTERFACE *This,
- IN BBS_TYPE *TableType,
- IN OUT UINTN *PrioritySize,
- OUT UINTN *Priority
- );
-
-typedef struct _LEGACY_BOOT_INTERFACE {
- LEGACY_BOOT_CALL BootIt;
-
- //
- // New functions to allow BBS booting to be configured from EFI
- //
- UINTN BbsVersion; // Currently 0x0101
- GET_DEVICE_COUNT GetDeviceCount;
- GET_PRIORITY_AND_TABLE GetPriorityAndTable;
- SET_PRIORITY SetPriority;
-} LEGACY_BOOT_INTERFACE;
-
-EFI_STATUS
-PlInitializeLegacyBoot (
- VOID
- );
-
-#endif
Index: g5/boot/arch/ia64/loader/gefi/inc/protocol/intload.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/protocol/intload.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/protocol/intload.h (nonexistent)
@@ -1,27 +0,0 @@
-/*++
-
-Copyright (c) 1999 Intel Corporation
-
-Module Name:
-
- intload
-
-Abstract:
-
- EFI support for loading internally linked in apps
-
-
-
-Revision History
-
---*/
-
-#ifndef _INTERNAL_LOAD_INCLUDE_
-#define _INTERNAL_LOAD_INCLUDE_
-
-// {D65A6B8C-71E5-4df0-A909-F0D2992B5AA9}
-#define INTERNAL_SHELL_GUID \
- { 0xd65a6b8c, 0x71e5, 0x4df0, {0xa9, 0x09, 0xf0, 0xd2, 0x99, 0x2b, 0x5a, 0xa9} }
-
-
-#endif
Index: g5/boot/arch/ia64/loader/gefi/inc/protocol/efivar.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/protocol/efivar.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/protocol/efivar.h (nonexistent)
@@ -1,133 +0,0 @@
-/*++
-
-Copyright (c) 1998 Intel Corporation
-
-Module Name:
-
-Abstract:
-
-
-
-Revision History
-
---*/
-
-
-
-//
-// The variable store protocol interface is specific to the reference
-// implementation. The initialization code adds variable store devices
-// to the system, and the FW connects to the devices to provide the
-// variable store interfaces through these devices.
-//
-
-//
-// Variable Store Device protocol
-//
-
-#define VARIABLE_STORE_PROTOCOL \
- { 0xf088cd91, 0xa046, 0x11d2, {0x8e, 0x42, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_EFI_VARIABLE_STORE);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_STORE_CLEAR) (
- IN struct _EFI_VARIABLE_STORE *This,
- IN UINTN BankNo,
- IN OUT VOID *Scratch
- );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_STORE_READ) (
- IN struct _EFI_VARIABLE_STORE *This,
- IN UINTN BankNo,
- IN UINTN Offset,
- IN UINTN BufferSize,
- OUT VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_STORE_UPDATE) (
- IN struct _EFI_VARIABLE_STORE *This,
- IN UINTN BankNo,
- IN UINTN Offset,
- IN UINTN BufferSize,
- IN VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_STORE_SIZE) (
- IN struct _EFI_VARIABLE_STORE *This,
- IN UINTN NoBanks
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TRANSACTION_UPDATE) (
- IN struct _EFI_VARIABLE_STORE *This,
- IN UINTN BankNo,
- IN VOID *NewContents
- );
-
-typedef struct _EFI_VARIABLE_STORE {
-
- //
- // Number of banks and bank size
- //
-
- UINT32 Attributes;
- UINT32 BankSize;
- UINT32 NoBanks;
-
- //
- // Functions to access the storage banks
- //
-
- EFI_STORE_CLEAR ClearStore;
- EFI_STORE_READ ReadStore;
- EFI_STORE_UPDATE UpdateStore;
- EFI_STORE_SIZE SizeStore OPTIONAL;
- EFI_TRANSACTION_UPDATE TransactionUpdate OPTIONAL;
-
-} EFI_VARIABLE_STORE;
-
-
-//
-//
-// ClearStore() - A function to clear the requested storage bank. A cleared
-// bank contains all "on" bits.
-//
-// ReadStore() - Read data from the requested store.
-//
-// UpdateStore() - Updates data on the requested store. The FW will only
-// ever issue updates to clear bits in the store. Updates must be
-// performed in LSb to MSb order of the update buffer.
-//
-// SizeStore() - An optional function for non-runtime stores that can be
-// dynamically sized. The FW will only ever increase or decrease the store
-// by 1 banksize at a time, and it is always adding or removing a bank from
-// the end of the store.
-//
-// By default the FW will update variables and storage banks in an
-// "atomic" manner by keeping 1 old copy of the data during an update,
-// and recovering appropiately if the power is lost during the middle
-// of an operation. To do this the FW needs to have multiple banks
-// of storage dedicated to its use. If that's not possible, the driver
-// can implement an atomic bank update function and the FW will allow
-// 1 bank in this case. (It will allow any number of banks,
-// but it won't require an "extra" bank to provide its bank transaction
-// function).
-//
-// TransactionUpdate() - An optional function that can clear & update an
-// entire bank in an "atomic" fashion. If the operation fails in the
-// middle the driver is responsible for having either the previous copy
-// of the bank's data or the new copy. A copy that's partially written
-// is not valid as internal data settings may get lost. Supply this
-// function only when needed.
-//
-
Index: g5/boot/arch/ia64/loader/gefi/inc/protocol/ia64/eficontext.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/protocol/ia64/eficontext.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/protocol/ia64/eficontext.h (nonexistent)
@@ -1,208 +0,0 @@
-/*
- * Copyright (c) 1999, 2000
- * Intel Corporation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- *
- * This product includes software developed by Intel Corporation and
- * its contributors.
- *
- * 4. Neither the name of Intel Corporation or its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION AND CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-
-#ifndef _EFICONTEXT_H_
-#define _EFICONTEXT_H_
-
-
-//
-// IA-64 processor exception types
-//
-#define EXCPT_ALT_DTLB 4
-#define EXCPT_DNESTED_TLB 5
-#define EXCPT_BREAKPOINT 11
-#define EXCPT_EXTERNAL_INTERRUPT 12
-#define EXCPT_GEN_EXCEPT 24
-#define EXCPT_NAT_CONSUMPTION 26
-#define EXCPT_DEBUG_EXCEPT 29
-#define EXCPT_UNALIGNED_ACCESS 30
-#define EXCPT_FP_FAULT 32
-#define EXCPT_FP_TRAP 33
-#define EXCPT_TAKEN_BRANCH 35
-#define EXCPT_SINGLE_STEP 36
-
-//
-// IA-64 processor context definition - must be 512 byte aligned!!!
-//
-typedef
-struct {
- UINT64 reserved; // necessary to preserve alignment for the correct bits in UNAT and to insure F2 is 16 byte aligned...
-
- UINT64 r1;
- UINT64 r2;
- UINT64 r3;
- UINT64 r4;
- UINT64 r5;
- UINT64 r6;
- UINT64 r7;
- UINT64 r8;
- UINT64 r9;
- UINT64 r10;
- UINT64 r11;
- UINT64 r12;
- UINT64 r13;
- UINT64 r14;
- UINT64 r15;
- UINT64 r16;
- UINT64 r17;
- UINT64 r18;
- UINT64 r19;
- UINT64 r20;
- UINT64 r21;
- UINT64 r22;
- UINT64 r23;
- UINT64 r24;
- UINT64 r25;
- UINT64 r26;
- UINT64 r27;
- UINT64 r28;
- UINT64 r29;
- UINT64 r30;
- UINT64 r31;
-
- UINT64 f2[2];
- UINT64 f3[2];
- UINT64 f4[2];
- UINT64 f5[2];
- UINT64 f6[2];
- UINT64 f7[2];
- UINT64 f8[2];
- UINT64 f9[2];
- UINT64 f10[2];
- UINT64 f11[2];
- UINT64 f12[2];
- UINT64 f13[2];
- UINT64 f14[2];
- UINT64 f15[2];
- UINT64 f16[2];
- UINT64 f17[2];
- UINT64 f18[2];
- UINT64 f19[2];
- UINT64 f20[2];
- UINT64 f21[2];
- UINT64 f22[2];
- UINT64 f23[2];
- UINT64 f24[2];
- UINT64 f25[2];
- UINT64 f26[2];
- UINT64 f27[2];
- UINT64 f28[2];
- UINT64 f29[2];
- UINT64 f30[2];
- UINT64 f31[2];
-
- UINT64 pr;
-
- UINT64 b0;
- UINT64 b1;
- UINT64 b2;
- UINT64 b3;
- UINT64 b4;
- UINT64 b5;
- UINT64 b6;
- UINT64 b7;
-
- // application registers
- UINT64 ar_rsc;
- UINT64 ar_bsp;
- UINT64 ar_bspstore;
- UINT64 ar_rnat;
-
- UINT64 ar_fcr;
-
- UINT64 ar_eflag;
- UINT64 ar_csd;
- UINT64 ar_ssd;
- UINT64 ar_cflg;
- UINT64 ar_fsr;
- UINT64 ar_fir;
- UINT64 ar_fdr;
-
- UINT64 ar_ccv;
-
- UINT64 ar_unat;
-
- UINT64 ar_fpsr;
-
- UINT64 ar_pfs;
- UINT64 ar_lc;
- UINT64 ar_ec;
-
- // control registers
- UINT64 cr_dcr;
- UINT64 cr_itm;
- UINT64 cr_iva;
- UINT64 cr_pta;
- UINT64 cr_ipsr;
- UINT64 cr_isr;
- UINT64 cr_iip;
- UINT64 cr_ifa;
- UINT64 cr_itir;
- UINT64 cr_iipa;
- UINT64 cr_ifs;
- UINT64 cr_iim;
- UINT64 cr_iha;
-
- // debug registers
- UINT64 dbr0;
- UINT64 dbr1;
- UINT64 dbr2;
- UINT64 dbr3;
- UINT64 dbr4;
- UINT64 dbr5;
- UINT64 dbr6;
- UINT64 dbr7;
-
- UINT64 ibr0;
- UINT64 ibr1;
- UINT64 ibr2;
- UINT64 ibr3;
- UINT64 ibr4;
- UINT64 ibr5;
- UINT64 ibr6;
- UINT64 ibr7;
-
- // virtual registers
- UINT64 int_nat; // nat bits for R1-R31
-
-} SYSTEM_CONTEXT;
-
-#endif /* _EFI_CONTEXT_H_ */
Index: g5/boot/arch/ia64/loader/gefi/inc/protocol/eficonsplit.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/protocol/eficonsplit.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/protocol/eficonsplit.h (nonexistent)
@@ -1,32 +0,0 @@
-#ifndef _EFI_CONFORK_H
-#define _EFI_CONFORK_H
-/*++
-
-Copyright (c) 1999 Intel Corporation
-
-Module Name:
-
-Abstract:
-
-
-
-Revision History
-
---*/
-
-
-
-//
-// ConOut Forker Protocol
-//
-
-#define TEXT_OUT_SPLITER_PROTOCOL \
- { 0x56d830a0, 0x7e7a, 0x11d3, {0xbb, 0xa0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-#define ERROR_OUT_SPLITER_PROTOCOL \
- { 0xf0ba9039, 0x68f1, 0x425e, {0xaa, 0x7f, 0xd9, 0xaa, 0xf9, 0x1b, 0x82, 0xa1}}
-
-#define TEXT_IN_SPLITER_PROTOCOL \
- { 0xf9a3c550, 0x7fb5, 0x11d3, {0xbb, 0xa0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-#endif
Index: g5/boot/arch/ia64/loader/gefi/inc/protocol/efidbg.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/protocol/efidbg.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/protocol/efidbg.h (nonexistent)
@@ -1,210 +0,0 @@
-/*
- * Copyright (c) 1999, 2000
- * Intel Corporation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- *
- * This product includes software developed by Intel Corporation and
- * its contributors.
- *
- * 4. Neither the name of Intel Corporation or its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION AND CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-
-#ifndef _EFIDBG_H_
-#define _EFIDBG_H_
-
-#include "eficontext.h"
-#include "efiser.h"
-
-typedef struct _DEBUGPORT_16550_CONFIG_DATA {
- UINT32 PortAddress;
- UINT64 BaudRate;
- UINT32 ReceiveFifoDepth;
- UINT32 Timeout;
- UINT8 Parity;
- UINT8 DataBits;
- UINT8 StopBits;
- UINT32 ControlMask;
- BOOLEAN RtsCtsEnable; // RTS, CTS control
-} DEBUGPORT_16550_CONFIG_DATA;
-
-typedef struct _DEBUGPORT_16550_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- DEBUGPORT_16550_CONFIG_DATA ConfigData;
-} DEBUGPORT_16550_DEVICE_PATH;
-
-typedef union {
- EFI_DEVICE_PATH DevPath;
- DEBUGPORT_16550_DEVICE_PATH Uart;
- // add new types of debugport device paths to this union...
-} DEBUGPORT_DEV_PATH;
-
-
-//
-// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}
-//
-
-#define DEBUG_SUPPORT_PROTOCOL \
-{ 0x2755590C, 0x6F3C, 0x42fa, 0x9E, 0xA4, 0xA3, 0xBA, 0x54, 0x3C, 0xDA, 0x25 }
-
-
-typedef UINTN EXCEPTION_TYPE;
-
-typedef
-VOID
-(*EXCEPTION_HANDLER) (
- IN EXCEPTION_TYPE ExceptionType,
- IN SYSTEM_CONTEXT *SystemContext
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_REGISTER_TIMER_TICK_CALLBACK) (
- IN struct _EFI_DEBUG_SUPPORT_INTERFACE *This,
- IN EXCEPTION_HANDLER TimerTickCallback
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_REGISTER_EXCEPTION_HANDLER) (
- IN struct _EFI_DEBUG_SUPPORT_INTERFACE *This,
- IN EXCEPTION_HANDLER ExceptionHandler,
- IN EXCEPTION_TYPE ExceptionType
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP_CALL_TRACE) (
- IN struct _EFI_DEBUG_SUPPORT_INTERFACE *This
- );
-
-
-#define EFI_DEBUG_SUPPORT_INTERFACE_REVISION 0x00010000
-
-typedef struct _EFI_DEBUG_SUPPORT_INTERFACE {
- UINT32 Revision;
- EFI_REGISTER_TIMER_TICK_CALLBACK RegisterTimerTickCallback;
- EFI_REGISTER_EXCEPTION_HANDLER RegisterExceptionHandler;
- EFI_IP_CALL_TRACE IpCallTrace;
-} EFI_DEBUG_SUPPORT_INTERFACE;
-
-
-//
-// Debugport io protocol {EBA4E8D2-3858-41EC-A281-2647BA9660D0}
-//
-
-#define DEBUGPORT_IO_PROTOCOL \
-{ 0XEBA4E8D2, 0X3858, 0X41EC, 0XA2, 0X81, 0X26, 0X47, 0XBA, 0X96, 0X60, 0XD0 }
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DEBUGPORT_IO_RESET) (
- IN struct _EFI_DEBUGPORT_IO_INTERFACE *This
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DEBUGPORT_IO_READ) (
- IN struct _EFI_DEBUGPORT_IO_INTERFACE *This,
- IN OUT UINTN *BufferSize,
- OUT VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DEBUGPORT_IO_WRITE) (
- IN struct _EFI_DEBUGPORT_IO_INTERFACE *This,
- IN OUT UINTN *BufferSize,
- IN VOID *Buffer
- );
-
-#define EFI_DEBUGPORT_IO_INTERFACE_REVISION 0x00010000
-
-typedef struct _EFI_DEBUGPORT_IO_INTERFACE {
- UINT32 Revision;
- EFI_DEBUGPORT_IO_READ Read;
- EFI_DEBUGPORT_IO_WRITE Write;
- EFI_DEBUGPORT_IO_RESET Reset;
-} EFI_DEBUGPORT_IO_INTERFACE;
-
-
-//
-// Debugport UART16550 control protocol {628EA978-4C26-4605-BC02-A42A496917DD}
-//
-
-#define DEBUGPORT_UART16550_CONTROL_PROTOCOL \
-{ 0X628EA978, 0X4C26, 0X4605, 0XBC, 0X2, 0XA4, 0X2A, 0X49, 0X69, 0X17, 0XDD }
-
-// Note: The definitions for EFI_PARITY_TYPE, EFI_STOP_BITS_TYPE, and
-// SERIAL_IO_MODE are included from efiser.h
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UART16550_SET_ATTRIBUTES) (
- IN struct _EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE *This,
- IN UINT64 BaudRate,
- IN UINT32 ReceiveFifoDepth,
- IN UINT32 Timeout,
- IN EFI_PARITY_TYPE Parity,
- IN UINT8 DataBits,
- IN EFI_STOP_BITS_TYPE StopBits
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UART16550_SET_CONTROL_BITS) (
- IN struct _EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE *This,
- IN UINT32 Control
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UART16550_GET_CONTROL_BITS) (
- IN struct _EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE *This,
- OUT UINT32 *Control
- );
-
-#define EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE_REVISION 0x00010000
-
-typedef struct _EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE {
- UINT32 Revision;
- EFI_UART16550_SET_ATTRIBUTES SetAttributes;
- EFI_UART16550_SET_CONTROL_BITS SetControl;
- EFI_UART16550_GET_CONTROL_BITS GetControl;
- DEBUGPORT_16550_CONFIG_DATA *Mode;
-} EFI_DEBUGPORT_UART16550_CONTROL_INTERFACE;
-
-
-#define DEVICE_PATH_DEBUGPORT DEBUGPORT_IO_PROTOCOL
-
-#endif /* _EFIDBG_H_ */
Index: g5/boot/arch/ia64/loader/gefi/inc/protocol/piflash64.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/protocol/piflash64.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/protocol/piflash64.h (nonexistent)
@@ -1,121 +0,0 @@
-#ifndef _PIFLASH64_H
-#define _PIFLASH64_H
-
-/*++
-
-Copyright (c) 1999 Intel Corporation
-
-Module Name:
-
- PIflash64.h
-
-Abstract:
-
- Iflash64.efi protocol to abstract iflash from
- the system.
-
-Revision History
-
---*/
-
-//
-// Guid that identifies the IFLASH protocol
-//
-#define IFLASH64_PROTOCOL_PROTOCOL \
- { 0x65cba110, 0x74ab, 0x11d3, 0xbb, 0x89, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 };
-
-//
-// Unlock FLASH from StartAddress to EndAddress and return a LockKey
-//
-typedef
-EFI_STATUS
-(EFIAPI *UNLOCK_FLASH_API)(
- IN struct _IFLASH64_PROTOCOL_INTERFACE *This
- );
-
-//
-// Lock the flash represented by the LockKey
-//
-typedef
-EFI_STATUS
-(EFIAPI *LOCK_FLASH_API)(
- IN struct _IFLASH64_PROTOCOL_INTERFACE *This
- );
-
-//
-// Status callback for a utility like IFLASH64
-//
-// Token would map to a list like Ted proposed. The utility has no idea what
-// happens on the other side.
-// ErrorStatus - Level of Error or success. Independent of Token. If you
-// don't know the token you will at least know pass or fail.
-// String - Optional extra information about the error. Could be used for
-// debug or future expansion
-//
-// Attributes - Options screen attributes for String. Could allow the string to be different colors.
-//
-typedef
-EFI_STATUS
-(EFIAPI *UTILITY_PROGRESS_API)(
- IN struct _IFLASH64_PROTOCOL_INTERFACE *This,
- IN UINTN Token,
- IN EFI_STATUS ErrorStatus,
- IN CHAR16 *String, OPTIONAL
- IN UINTN *Attributes OPTIONAL
- );
-
-//
-// Token Values
-//
-// IFlash64 Token Codes
-#define IFLASH_TOKEN_IFLASHSTART 0xB0 // IFlash64 has started
-#define IFLASH_TOKEN_READINGFILE 0xB1 // Reading File
-#define IFLASH_TOKEN_INITVPP 0xB2 // Initializing Vpp
-#define IFLASH_TOKEN_DISABLEVPP 0x10 // Disable Vpp
-#define IFLASH_TOKEN_FLASHUNLOCK 0xB3 // Unlocking FLASH Devices
-#define IFLASH_TOKEN_FLASHERASE 0xB4 // Erasing FLASH Devices
-#define IFLASH_TOKEN_FLASHPROGRAM 0xB5 // Programming FLASH
-#define IFLASH_TOKEN_FLASHVERIFY 0xB6 // Verifying FLASH
-#define IFLASH_TOKEN_UPDATESUCCES 0xB7 // FLASH Updage Success!
-
-#define IFLASH_TOKEN_PROGRESS_READINGFILE 0x11 // % Reading File
-#define IFLASH_TOKEN_PROGRESS_FLASHUNLOCK 0x13 // % Unlocking FLASH Devices
-#define IFLASH_TOKEN_PROGRESS_FLASHERASE 0x14 // % Erasing FLASH Devices
-#define IFLASH_TOKEN_PROGRESS_FLASHPROGRAM 0x15 // % Programming FLASH
-#define IFLASH_TOKEN_PROGRESS_FLASHVERIFY 0x16 // % Verifying FLASH
-
-#define IFLASH_TOKEN_READINGFILE_ER 0xB8 // File Read Error
-#define IFLASH_TOKEN_INITVPP_ER 0xB9 // Initialization of IFB Error
-#define IFLASH_TOKEN_FLASHUNLOCK_ER 0xBA // FLASH Unlock Error
-#define IFLASH_TOKEN_FLASHERASE_ER 0xBB // FLASH Erase Error
-#define IFLASH_TOKEN_FLASHVERIFY_ER 0xBC // FLASH Verify Error
-#define IFLASH_TOKEN_FLASHPROG_ER 0xBD // FLASH Program Error
-
-#define IFLASH_TABLE_END 0x00
-
-//
-// If this number changes one of the existing API's has changes
-//
-#define IFLASH_PI_MAJOR_VERSION 0x01
-
-//
-// This number changes when new APIs or data variables get added to the end
-// of the data structure
-//
-#define IFLASH_PI_MINOR_VERSION 0x01
-
-typedef struct _IFLASH64_PROTOCOL_INTERFACE {
- UINT32 MajorVersion;
- UINT32 MinorVersion;
- UNLOCK_FLASH_API UnlockFlash;
- LOCK_FLASH_API LockFlash;
- UTILITY_PROGRESS_API Progress;
-
- //
- // Future expansion goes here
- //
-
-} IFLASH64_PROTOCOL_INTERFACE;
-
-
-#endif
Index: g5/boot/arch/ia64/loader/gefi/inc/protocol/make.inf
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/protocol/make.inf (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/protocol/make.inf (nonexistent)
@@ -1,13 +0,0 @@
-#
-#
-#
-
-[sources]
- efivar.h
- legacyboot.h
- VgaClass.h
- intload.h
-
-[ia32sources]
-
-[ia64sources]
Index: g5/boot/arch/ia64/loader/gefi/inc/protocol/vgaclass.h
===================================================================
--- g5/boot/arch/ia64/loader/gefi/inc/protocol/vgaclass.h (revision 3857)
+++ g5/boot/arch/ia64/loader/gefi/inc/protocol/vgaclass.h (nonexistent)
@@ -1,95 +0,0 @@
-#ifndef _VGA_CLASS_H
-#define _VGA_CLASS_H
-
-/*++
-
-Copyright (c) 1999 Intel Corporation
-
-Module Name:
-
- VgaClass.h
-
-Abstract:
-
- Vga Mini port binding to Vga Class protocol
-
-
-
-Revision History
-
---*/
-
-//
-// VGA Device Structure
-//
-
-// {0E3D6310-6FE4-11d3-BB81-0080C73C8881}
-#define VGA_CLASS_DRIVER_PROTOCOL \
- { 0xe3d6310, 0x6fe4, 0x11d3, {0xbb, 0x81, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
-
-typedef
-EFI_STATUS
-(* INIT_VGA_CARD) (
- IN UINTN VgaMode,
- IN VOID *Context
- );
-
-typedef struct {
- UINTN MaxColumns;
- UINTN MaxRows;
-} MAX_CONSOLE_GEOMETRY;
-
-#define VGA_CON_OUT_DEV_SIGNATURE EFI_SIGNATURE_32('c','v','g','a')
-typedef struct {
- UINTN Signature;
-
- EFI_HANDLE Handle;
- SIMPLE_TEXT_OUTPUT_INTERFACE ConOut;
- SIMPLE_TEXT_OUTPUT_MODE ConOutMode;
- EFI_DEVICE_PATH *DevicePath;
-
- UINT8 *Buffer;
- EFI_DEVICE_IO_INTERFACE *DeviceIo;
-
- //
- // Video Card Context