Annotation of Gnu-Mach/i386/i386at/grub_glue.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 2014 Free Software Foundation.
        !             3:  *
        !             4:  * This program is free software; you can redistribute it and/or modify
        !             5:  * it under the terms of the GNU General Public License as published by
        !             6:  * the Free Software Foundation; either version 2 of the License, or
        !             7:  * (at your option) any later version.
        !             8:  *
        !             9:  * This program is distributed in the hope that it will be useful,
        !            10:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            11:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !            12:  * GNU General Public License for more details.
        !            13:  *
        !            14:  * You should have received a copy of the GNU General Public License
        !            15:  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
        !            16:  */
        !            17: 
        !            18: #include <kern/printf.h>
        !            19: #include <stdarg.h>
        !            20: #include <i386/vm_param.h>
        !            21: 
        !            22: #include <grub/glue.h>
        !            23: #include <grub/acpi.h>
        !            24: 
        !            25: #define GRUB_DEBUG 0
        !            26: 
        !            27: void
        !            28: grub_real_dprintf (const char *file, const int line, const char *condition,
        !            29:                   const char *fmt, ...)
        !            30: {
        !            31: #if GRUB_DEBUG
        !            32:   va_list      listp;
        !            33:   va_start(listp, fmt);
        !            34:   vprintf (fmt, listp);
        !            35:   va_end(listp);
        !            36: #endif
        !            37: }
        !            38: 
        !            39: void
        !            40: grub_millisleep (grub_uint32_t ms)
        !            41: {
        !            42:   /* Do nothing.  */
        !            43: }
        !            44: 
        !            45: struct grub_acpi_rsdp_v20 *
        !            46: grub_acpi_get_rsdpv2 (void)
        !            47: {
        !            48:   return grub_machine_acpi_get_rsdpv2 ();
        !            49: }
        !            50: 
        !            51: struct grub_acpi_rsdp_v10 *
        !            52: grub_acpi_get_rsdpv1 (void)
        !            53: {
        !            54:   return grub_machine_acpi_get_rsdpv1 ();
        !            55: }
        !            56: 
        !            57: /* Simple checksum by summing all bytes. Used by ACPI and SMBIOS. */
        !            58: grub_uint8_t
        !            59: grub_byte_checksum (void *base, grub_size_t size)
        !            60: {
        !            61:   grub_uint8_t *ptr;
        !            62:   grub_uint8_t ret = 0;
        !            63:   for (ptr = (grub_uint8_t *) base; ptr < ((grub_uint8_t *) base) + size;
        !            64:        ptr++)
        !            65:     ret += *ptr;
        !            66:   return ret;
        !            67: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.