9
0
Fork 0
Commit Graph

49 Commits

Author SHA1 Message Date
Sascha Hauer bb548648c0 x86 linker script: Add missing _text
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-05 08:50:54 +02:00
Jean-Christophe PLAGNIOL-VILLARD 463229490e introduce barebox_bare_init_size to known the bare_init size and check it
this allow to check we do not exceed the size of the SRAM as example

introduce BAREBOX_MAX_BARE_INIT_SIZE the maximum size of bare_init
this will allow your bare_init will fit in SRAM as example
ARCH can overwrite it via ARCH_BAREBOX_MAX_BARE_INIT_SIZE

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-23 09:43:28 +01:00
Sascha Hauer 377577f3bf x86: Fix linker script for magic vars
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-07 13:49:01 +01:00
Sascha Hauer 70f7691d41 fix malloc space sizes
end is start + size - 1, not start + size.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-03 10:09:29 +01:00
Sascha Hauer 020a30be0d add magicvar command
The magicvar command gives an overview about all environment variables
with a special meaning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:51:31 +01:00
Lucas De Marchi e57f57a3d0 x86: fix symbol size calculation
The size is being calculated after changing to another section, which
gives error with gcc 4.6:

  AS      arch/x86/lib/traveler.o
/tmp/ccP0z8xx.s: Assembler messages:
/tmp/ccP0z8xx.s: Error: .size expression for real_to_prot does not evaluate to a constant
/tmp/ccP0z8xx.s: Error: .size expression for prot_to_real does not evaluate to a constant
make[1]: *** [arch/x86/lib/traveler.o] Error 1

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:28:35 +01:00
Lucas De Marchi 8d6d5d43dd x86: fix build error because of missing header
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:28:35 +01:00
Sascha Hauer 6b8503baab Merge branch 'master' into next 2011-10-23 13:38:39 +02:00
Loïc Minier 4e26fba680 Only pass -P to cpp when generating ld scripts
When building sandbox with ccache, one would hit warnings such as:
    warning: 'struct mmsghdr' declared inside parameter list
on random files; a way to reproduce this issue is to build a simple
file doing just:
    #include <sys/socket.h>

    int main(void) {
        return 0;
    }

    gcc -Wall -P -c -o foo foo.c

But actually the -P flag is only useful when generating non-C files,
such as linker scripts in the case of barebox.  Removing the -P flag
from all the gcc invocations, except when generating .lds files makes
the warning go away.  It turns out that this is what
linux/scripts/Makefile.build also does nowadays.

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-18 09:18:41 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4ac3a1f9e0 move digest to crypto/
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-12 08:52:48 +02:00
Juergen Beisert c7efd11b38 x86: Define byteorder
This is required to avoid warnings like this:

In file included from <some file>:
include/io.h:7:5: warning: "__BYTE_ORDER" is not defined
include/io.h:7:21: warning: "__BIG_ENDIAN" is not defined

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-04 09:46:37 +02:00
Sascha Hauer 0fc7fb6b4f rename include/mem_malloc.h to include/memory.h
Which is a better name and also better to collect other
things.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-23 16:32:48 +02:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Jean-Christophe PLAGNIOL-VILLARD 90c83d13d2 x86/generic_pc: fix missing switch to resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-15 08:57:28 +02:00
Jean-Christophe PLAGNIOL-VILLARD c71a77ab87 ns16550: switch to resource
use generic read/write depending on the memory size
if no reg_read/write defined

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-08-01 16:33:09 +08:00
Jean-Christophe PLAGNIOL-VILLARD 931c1cc5a6 ns16550: if not specific f_caps defined use default stdin, stdout, stderr
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-30 02:05:27 +08:00
Sascha Hauer 90c35f44f1 add a ns16550 registration helper and use it
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-29 12:00:41 +02:00
Sascha Hauer f928efa818 add a add_mem_device function
Add a helper function for boards to register their memory
devices. This makes the board code smaller and also helps
getting rid of map_base and struct memory_platform_data.

And switch all of the memory to it

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-18 20:32:45 +08:00
Jean-Christophe PLAGNIOL-VILLARD 88618eb5f1 mem: replace DEVFS_RDWR by IORESOURCE_MEM_WRITEABLE
we keep struct memory_platform_data for now on we will switch off the memories
resources to struct resource

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-18 20:31:51 +08:00
Antony Pavlov ed66bf2787 x86: fix typo in include/asm/posix_types.h
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-05 09:32:44 +02:00
Juergen Beisert 2893bca441 x86 Generic platform: Fix prompt name
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2011-03-10 11:15:04 +01:00
Juergen Beisert cc543aa478 x86 Generic platform: Fix disk drive name
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2011-03-10 11:15:00 +01:00
Juergen Beisert 98fe97cde0 x86 Generic platform: Fix some typos
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2011-03-10 11:14:56 +01:00
Juergen Beisert 1126f04e99 x86: Use the generic linker script initializing
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2011-03-10 11:14:47 +01:00
Juergen Beisert 6ef848c1f7 x86: Remove not used expressions from the makefile
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2011-03-10 11:14:42 +01:00
Jean-Christophe PLAGNIOL-VILLARD 442231fe65 x86/pmjump: rename __bss_end to __bss_stop
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-24 08:38:10 +01:00
Sascha Hauer be2893d5ef x86: use sections.h header file for linker variables
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-17 11:05:14 +01:00
Sascha Hauer 92c1c6cfb1 add sections.h header file
The file location and variable names from the Linux Kernel have been
used here.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-17 11:04:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD be4146161b import swab.h arch implementation form linux v2.3.37
this will avoid __bswapsi2 issue see with gcc 4.5.1

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-17 09:39:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD f69626c632 clocksource: switch mask to CLOCKSOURCE_MASK
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-29 21:55:25 +01:00
Jean-Christophe PLAGNIOL-VILLARD f7a37ae14b x86: add 64bit host build support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-11-17 12:14:56 +08:00
Robert Schwebel e14b500c40 doc: eliminate nonexisting reference
Silence this warning:
arch/architecture.dox:89: Warning: unable to resolve reference to `dev_x86_mach' for \ref command

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-22 20:47:02 +02:00
Robert Schwebel bebf0c419b doc: let doxygen find some assembler functions
Silences these warnings:

arch/x86/boot/boot_hdisk.S:29: Warning: documented function `void real_start' was not declared or defined.
arch/x86/boot/boot_main.S:28: Warning: documented function `void _start' was not declared or defined.
arch/x86/boot/pmjump.S:20: Warning: documented function `void protected_mode_jump' was not declared or defined.
arch/x86/lib/memory16.S:32: Warning: documented function `unsigned short bios_get_memsize' was not declared or defined.
arch/x86/lib/traveler.S:31: Warning: documented function `void real_to_prot' was not declared or defined.
arch/x86/lib/traveler.S:38: Warning: documented function `void prot_to_real' was not declared or defined.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-22 20:47:02 +02:00
Juergen Beisert 63690cc406 Don't try to guess the size of a disk if its size value is already given
Guessing the size of an attached harddisk (access via x86 BIOS) was needed
due to the fact, barebox can't query this information from the BIOS easily.

But with the SD/MMC cards, there will be a second user of the generic disk
handling routines. And with this media it is very easy to know its size.

This patch provides a workaround to keep the guessing feature if the size of
the registered disk is 0. If it is not 0, the given value will be used instead.

Note: This is in preparation to add MCI card support, which can be handled
like a disk drive.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:08:27 +02:00
Jean-Christophe PLAGNIOL-VILLARD e85c6bb0a7 driver: use id as -1 for auto assigned id
before if you specify id = 0 the next available id will be taken
otherwise fail if already registered now as in linux we use -1

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-20 08:58:52 +02:00
Jean-Christophe PLAGNIOL-VILLARD 55819d58d4 types.h: move __kernel_dev_t to include/linux/types.h
no need to have a arch specific type

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-17 10:56:24 +08:00
Jean-Christophe PLAGNIOL-VILLARD 499aa0b4f5 configs: use new savedefconfig format as in linux
this will reduce and simplify defconfigs maintainance
it will also save some disk space

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-17 10:46:59 +08:00
Jean-Christophe PLAGNIOL-VILLARD d8c86961b3 move boards to arch/<architecure>/boards
this will allow each arch to handle the boards more simply and depending on
there need

the env var BOARD will refer to the current board dirent

for sandbox as we have only one board the board dirent is arch/sandbox/board

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-23 08:35:25 +02:00
Sascha Hauer e11c07c339 make reset_cpu a __noreturn function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:15:03 +02:00
Juergen Beisert 12769b3b78 Add the whole x86 architecture to the build system
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:17 +01:00
Juergen Beisert 7081093531 Add a special command to load and start a bzImage on x86
Other architectures are supporting the uImage format used by barebox's 'bootm'
command. x86 does'nt. So, we need a special command to be able to boot the
x86 specific bzImage format.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:16 +01:00
Juergen Beisert 835aa6b599 Add a low level disk drive access driver
This is a low level disk drive communication driver. It uses the real mode
BIOS found on most x86 platforms, to read and write sectors. Used by the
generic disk driver.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:16 +01:00
Juergen Beisert c3a99ec501 Bring in the time reference for the x86 platforms
This code uses the always (hopefully) existing PIT device to get the time
reference for barebox.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:16 +01:00
Juergen Beisert 46348b5d65 Add a generic PC platform
This code adds a generic x86 platform, enabling barebox to act as a
bootloader like 'GRUB'. Very minimalistic, yet. Supports only a serial console
and is tested with QEMU only.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:16 +01:00
Juergen Beisert 7dcc15e819 Add functions to be able to boot with BIOSs help
These functions are special: They are running in the 16 bit real mode world
to bring up barebox on an x86 box.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:16 +01:00
Juergen Beisert 2bdd75bd02 Add some generic functions to make x86 work
Add some generic functions to make barebox work on x86.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:15 +01:00
Juergen Beisert c7f2adaf7d Bring in the first x86 specific code
Add some generic required code to make barebox work on x86.
Note: Resetting the CPU is unfinished yet. I need some ideas how to reset
this kind of architecture gracefully.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:15 +01:00
Juergen Beisert acd2bf6bc0 Adding required architecture header files
Add architecture header files. Some of these files are empty, they only must
exists to make the build system happy.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:15 +01:00
Juergen Beisert 2dac49cea0 Adding x86 usage documentation to the tree
Adding x86 usage documentation to the tree

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:15 +01:00