Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions payloads/libpayload/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ config ARCH_X86
help
Support the x86 architecture

config ARCH_X86_64
bool "x86_64"
help
Support the x86_64 architecture

config ARCH_ARM64
bool "ARM64"
help
Expand All @@ -123,7 +128,7 @@ endchoice

config MULTIBOOT
bool "Multiboot header support"
depends on ARCH_X86
depends on ARCH_X86 || ARCH_X86_64
default y if !CHROMEOS

config HEAP_SIZE
Expand All @@ -149,6 +154,7 @@ config BASE_ADDRESS
default 0x80100000 if ARCH_ARM64
default 0x00000000 if ARCH_MIPS
default 0x00100000 if ARCH_X86
default 0x21000000 if ARCH_X86_64
help
This is the base address for the payload.

Expand Down Expand Up @@ -241,7 +247,7 @@ config SERIAL_CONSOLE
config 8250_SERIAL_CONSOLE
bool "8250-compatible serial port driver (including IO and MMIO)"
depends on SERIAL_CONSOLE
default y if ARCH_X86
default y if ARCH_X86 || ARCH_X86_64

config S5P_SERIAL_CONSOLE
bool "Exynos SOC, S5P compatible serial port driver"
Expand All @@ -266,7 +272,7 @@ config PL011_SERIAL_CONSOLE
config SERIAL_IOBASE
## This default is currently not used on non-x86 systems.
hex "Default I/O base for the serial port (default 0x3f8)"
depends on SERIAL_CONSOLE && ARCH_X86
depends on SERIAL_CONSOLE && (ARCH_X86 || ARCH_X86_64)
default 0x3f8

config SERIAL_SET_SPEED
Expand Down Expand Up @@ -299,12 +305,12 @@ config VIDEO_CONSOLE

config VGA_VIDEO_CONSOLE
bool "VGA video console driver"
depends on ARCH_X86 && VIDEO_CONSOLE
depends on (ARCH_X86 || ARCH_X86_64) && VIDEO_CONSOLE
default y if !CHROMEOS

config GEODELX_VIDEO_CONSOLE
bool "Geode LX video console driver"
depends on ARCH_X86 && VIDEO_CONSOLE
depends on (ARCH_X86 || ARCH_X86_64) && VIDEO_CONSOLE
default n

config COREBOOT_VIDEO_CONSOLE
Expand Down Expand Up @@ -334,14 +340,14 @@ config PC_I8042
config PC_MOUSE
bool "Allow input from a PC mouse"
default n if CHROMEOS
default y if ARCH_X86 # uses IO
default y if ARCH_X86 || ARCH_X86_64 # uses IO
default n
help
PS/2 mouse driver on top of PC_I8042.

config PC_KEYBOARD
bool "Allow input from a PC keyboard"
default y if ARCH_X86 # uses IO
default y if ARCH_X86 || ARCH_X86_64 # uses IO
default n

config PC_KEYBOARD_IGNORE_INIT_FAILURE
Expand All @@ -364,12 +370,12 @@ menu "Drivers"

config PCI
bool "Support for PCI devices"
depends on ARCH_X86 # for now
depends on ARCH_X86 || ARCH_X86_64 # for now
default y

config NVRAM
bool "Support for reading/writing NVRAM bytes"
depends on ARCH_X86 # for now
depends on ARCH_X86 || ARCH_X86_64 # for now
default y

config MOUSE_CURSOR
Expand Down Expand Up @@ -401,7 +407,7 @@ config RTC_PORT_EXTENDED_VIA

config SPEAKER
bool "Support for PC speaker"
depends on ARCH_X86
depends on ARCH_X86 || ARCH_X86_64
default y if !CHROMEOS

source "drivers/timer/Kconfig"
Expand Down Expand Up @@ -449,3 +455,4 @@ source "arch/arm/Kconfig"
source "arch/arm64/Kconfig"
source "arch/mips/Kconfig"
source "arch/x86/Kconfig"
source "arch/x86_64/Kconfig"
2 changes: 2 additions & 0 deletions payloads/libpayload/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ ARCHDIR-$(CONFIG_LP_ARCH_ARM) := arm
ARCHDIR-$(CONFIG_LP_ARCH_ARM64) := arm64
ARCHDIR-$(CONFIG_LP_ARCH_MIPS) := mips
ARCHDIR-$(CONFIG_LP_ARCH_X86) := x86
ARCHDIR-$(CONFIG_LP_ARCH_X86_64) := x86_64

ARCH-y := $(ARCHDIR-y)

Expand All @@ -105,6 +106,7 @@ ARCH-y := $(ARCHDIR-y)
ARCH-$(CONFIG_LP_ARCH_ARM) := arm
ARCH-$(CONFIG_LP_ARCH_ARM64) := arm64
ARCH-$(CONFIG_LP_ARCH_X86) := x86_32
ARCH-$(CONFIG_LP_ARCH_X86_64) := x86_64
ARCH-$(CONFIG_LP_ARCH_MIPS) := mips

# Three cases where we don't need fully populated $(obj) lists:
Expand Down
1 change: 1 addition & 0 deletions payloads/libpayload/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ARCHDIR-$(CONFIG_LP_ARCH_ARM) := arm
ARCHDIR-$(CONFIG_LP_ARCH_ARM64) := arm64
ARCHDIR-$(CONFIG_LP_ARCH_MIPS) := mips
ARCHDIR-$(CONFIG_LP_ARCH_X86) := x86
ARCHDIR-$(CONFIG_LP_ARCH_X86_64) := x86_64
DESTDIR ?= install

real-target: lib
Expand Down
57 changes: 57 additions & 0 deletions payloads/libpayload/arch/x86_64/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
##
## This file is part of the libpayload project.
##
## Copyright (c) 2012 Google Inc.
##
## 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. 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 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 THE AUTHOR 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.
##

if ARCH_X86_64

config ARCH_SPECIFIC_OPTIONS # dummy
def_bool y
select LITTLE_ENDIAN
select IO_ADDRESS_SPACE

config ENABLE_APIC
bool "Enables the Local APIC"

choice
prompt "Interrupt Handling"
default LOG_UNKNOWN_INTERRUPTS if ENABLE_APIC
default DIE_ON_UNKNOWN_INTERRUPT

config IGNORE_UNKNOWN_INTERRUPTS
bool "Ignore unknown user defined interrupts"

config LOG_UNKNOWN_INTERRUPTS
bool "Logs unknown user defined interrupts to the console"

config DIE_ON_UNKNOWN_INTERRUPT
bool "Die if an unknown user defined interrupt is encountered"

endchoice


endif
52 changes: 52 additions & 0 deletions payloads/libpayload/arch/x86_64/Makefile.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
##
## This file is part of the libpayload project.
##
## Copyright (C) 2008 Advanced Micro Devices, Inc.
##
## 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. 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 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 THE AUTHOR 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.
##

# x64 needs at least 16 bytes (PSB=4, default)
CFLAGS += -mpreferred-stack-boundary=4

head.o-y += head.S
libc-y += main.c sysinfo.c
libc-y += timer.c coreboot.c util.S
libc-y += virtual.c exec.S
libc-y += selfboot.c
# TODO:
#libc-y += exception_asm.S exception.c
libc-y += delay.c

# Will fall back to default_memXXX() in libc/memory.c if GPL not allowed.
libc-$(CONFIG_LP_GPL) += string.c

libgdb-y += gdb.c

libcbfs-$(CONFIG_LP_CBFS) += rom_media.c

# Multiboot support is configurable
libc-$(CONFIG_LP_MULTIBOOT) += multiboot.c

libc-$(CONFIG_LP_ENABLE_APIC) += apic.c
Loading