diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2007-04-06 14:05:26 +0000 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2007-04-06 14:05:26 +0000 |
commit | bea6044faaef86688c4b784cc5fe6112da30fecc (patch) | |
tree | b257b1ecd516ccc40e511bde0a3eb3c1f11ce65e /include | |
parent | afa7c1d798c2d9c9cbd0d9e1064831a287e67f31 (diff) | |
download | coreboot-bea6044faaef86688c4b784cc5fe6112da30fecc.tar.gz coreboot-bea6044faaef86688c4b784cc5fe6112da30fecc.tar.bz2 coreboot-bea6044faaef86688c4b784cc5fe6112da30fecc.zip |
Trivial:
* include cleanup. We don't provide stdint.h, so use arch/types.h
instead.
* drop some unused variables
* fix comment style in some headers to match the template
* Fix the loglevel of some debugging output.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@275 f3766cd6-281f-0410-b1cd-43a5c92072e9
Diffstat (limited to 'include')
-rw-r--r-- | include/cpu/generic/x86/arch/types.h | 4 | ||||
-rw-r--r-- | include/device/pci_rom.h | 31 | ||||
-rw-r--r-- | include/elf.h | 53 | ||||
-rw-r--r-- | include/elf_boot.h | 2 | ||||
-rw-r--r-- | include/lar.h | 2 | ||||
-rw-r--r-- | include/linuxbios_tables.h | 2 | ||||
-rw-r--r-- | include/stdlib.h | 20 | ||||
-rw-r--r-- | include/string.h | 2 |
8 files changed, 70 insertions, 46 deletions
diff --git a/include/cpu/generic/x86/arch/types.h b/include/cpu/generic/x86/arch/types.h index 64243a8b53b3..e69b3d47bf15 100644 --- a/include/cpu/generic/x86/arch/types.h +++ b/include/cpu/generic/x86/arch/types.h @@ -15,4 +15,8 @@ typedef signed int s32; typedef signed short s16; typedef signed char s8; +typedef u64 size_t; + +#define NULL ((void *)0) + #endif diff --git a/include/device/pci_rom.h b/include/device/pci_rom.h index c5bd278ba9ac..46c98ac23dc0 100644 --- a/include/device/pci_rom.h +++ b/include/device/pci_rom.h @@ -1,24 +1,23 @@ /* - 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -*/ + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + #ifndef PCI_ROM_H #define PCI_ROM_H #include <arch/types.h> #include <arch/byteorder.h> -#include <stddef.h> #define PCI_ROM_HDR 0xAA55 #define PCI_DATA_HDR (u32) ( ('R' << 24) | ('I' << 16) | ('C' << 8) | 'P' ) diff --git a/include/elf.h b/include/elf.h index d14f3fb75efc..fbd47beafa36 100644 --- a/include/elf.h +++ b/include/elf.h @@ -1,35 +1,36 @@ -/* This file was taken from the GNU C Library, CVS rev. 1.156, and modified - for use by the LinuxBIOS project. */ +/* This file was taken from the GNU C Library, CVS rev. 1.156, + * and modified for use by the LinuxBIOS project. + */ /* This file defines standard ELF types, structures, and macros. - Copyright (C) 1995-2003,2004,2005,2006,2007 Free Software Foundation, Inc. - Copyright (C) 2001 Eric Biederman <ebiederman@lnxi.com> - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + * Copyright (C) 1995-2003,2004,2005,2006,2007 Free Software Foundation, Inc. + * Copyright (C) 2001 Eric Biederman <ebiederman@lnxi.com> + * This file is part of the GNU C Library. + * + * The GNU C Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * The GNU C Library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the GNU C Library; if not, write to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 USA. + */ #ifndef _ELF_H #define _ELF_H 1 -#include <features.h> +#include <arch/types.h> #include <arch/elf.h> /* Standard ELF types. */ -#include <stdint.h> /* Type for a 16-bit quantity. */ typedef u16 Elf32_Half; @@ -907,10 +908,10 @@ typedef struct typedef struct { - uint32_t a_type; /* Entry type */ + u32 a_type; /* Entry type */ union { - uint32_t a_val; /* Integer value */ + u32 a_val; /* Integer value */ /* We use to have pointer elements added here. We cannot do that, though, since it does not work when using 32-bit definitions on 64-bit platforms and vice versa. */ @@ -919,10 +920,10 @@ typedef struct typedef struct { - uint64_t a_type; /* Entry type */ + u64 a_type; /* Entry type */ union { - uint64_t a_val; /* Integer value */ + u64 a_val; /* Integer value */ /* We use to have pointer elements added here. We cannot do that, though, since it does not work when using 32-bit definitions on 64-bit platforms and vice versa. */ diff --git a/include/elf_boot.h b/include/elf_boot.h index 910611f81428..b46cd69a6540 100644 --- a/include/elf_boot.h +++ b/include/elf_boot.h @@ -20,7 +20,7 @@ #ifndef ELF_BOOT_H #define ELF_BOOT_H -#include <stdint.h> +#include <arch/types.h> /* This defines the structure of a table of parameters useful for ELF * bootable images. These parameters are all passed and generated diff --git a/include/lar.h b/include/lar.h index f73ed703efc1..6f88c128bf73 100644 --- a/include/lar.h +++ b/include/lar.h @@ -47,7 +47,7 @@ * --------------------------------------------------------------------------- */ -#include <stdint.h> +#include <arch/types.h> #define MAGIC "LARCHIVE" #define MAX_PATHLEN 1024 diff --git a/include/linuxbios_tables.h b/include/linuxbios_tables.h index be9c26f6fbbc..43b92966ce1a 100644 --- a/include/linuxbios_tables.h +++ b/include/linuxbios_tables.h @@ -20,7 +20,7 @@ #ifndef LINUXBIOS_TABLES_H #define LINUXBIOS_TABLES_H -#include <stdint.h> +#include <arch/types.h> /* The LinuxBIOS table information is for conveying information * from the firmware to the loaded OS image. Primarily this diff --git a/include/stdlib.h b/include/stdlib.h new file mode 100644 index 000000000000..dc2c688ae513 --- /dev/null +++ b/include/stdlib.h @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2007 coresystems GmbH + * Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH + * + * 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; version 2 of the License. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA + */ + +void *malloc(size_t size); + diff --git a/include/string.h b/include/string.h index 16cb63750d6c..3d5819836f59 100644 --- a/include/string.h +++ b/include/string.h @@ -21,7 +21,7 @@ #ifndef STRING_H #define STRING_H -#include <stdlib.h> +#include <arch/types.h> /* Prototypes for functions from lib/mem.c. */ extern void *memcpy(void *dest, const void *src, int len); |