diff mbox series

[U-Boot,v2,1/8] x86: Add new slimbootloader CPU type

Message ID A1484485FD99714DB2AB2C5EF81E7AC2AA713E15@ORSMSX116.amr.corp.intel.com
State Superseded
Delegated to: Bin Meng
Headers show
Series x86: Add basic Slim Bootloader payload support | expand

Commit Message

Park, Aiden June 25, 2019, 11:15 p.m. UTC
- Added CONFIG_SYS_SLIMBOOTLOADER to enable slimbootloader CPU type
- Added new arch/x86/cpu/slimbootloader directory with minimum codes
- Get hob_list pointer from Slim Bootloader

Signed-off-by: Aiden Park <aiden.park@intel.com>
---
 arch/x86/Kconfig                              |  1 +
 arch/x86/cpu/Makefile                         |  1 +
 arch/x86/cpu/slimbootloader/Kconfig           | 23 ++++++++++
 arch/x86/cpu/slimbootloader/Makefile          |  5 +++
 arch/x86/cpu/slimbootloader/car.S             | 43 +++++++++++++++++++
 arch/x86/cpu/slimbootloader/slimbootloader.c  | 21 +++++++++
 .../asm/arch-slimbootloader/slimbootloader.h  | 11 +++++
 arch/x86/include/asm/global_data.h            |  2 +-
 arch/x86/lib/asm-offsets.c                    |  2 +-
 9 files changed, 107 insertions(+), 2 deletions(-)
 create mode 100644 arch/x86/cpu/slimbootloader/Kconfig
 create mode 100644 arch/x86/cpu/slimbootloader/Makefile
 create mode 100644 arch/x86/cpu/slimbootloader/car.S
 create mode 100644 arch/x86/cpu/slimbootloader/slimbootloader.c
 create mode 100644 arch/x86/include/asm/arch-slimbootloader/slimbootloader.h

Comments

Bin Meng July 2, 2019, 2:13 p.m. UTC | #1
Hi Aiden,

On Wed, Jun 26, 2019 at 7:15 AM Park, Aiden <aiden.park@intel.com> wrote:
>

Since this is the first patch in the series, could you please add a
brief description about slim bootloader?

> - Added CONFIG_SYS_SLIMBOOTLOADER to enable slimbootloader CPU type

nits: Added -> Add

> - Added new arch/x86/cpu/slimbootloader directory with minimum codes

ditto

> - Get hob_list pointer from Slim Bootloader
>
> Signed-off-by: Aiden Park <aiden.park@intel.com>
> ---
>  arch/x86/Kconfig                              |  1 +
>  arch/x86/cpu/Makefile                         |  1 +
>  arch/x86/cpu/slimbootloader/Kconfig           | 23 ++++++++++
>  arch/x86/cpu/slimbootloader/Makefile          |  5 +++
>  arch/x86/cpu/slimbootloader/car.S             | 43 +++++++++++++++++++
>  arch/x86/cpu/slimbootloader/slimbootloader.c  | 21 +++++++++
>  .../asm/arch-slimbootloader/slimbootloader.h  | 11 +++++
>  arch/x86/include/asm/global_data.h            |  2 +-
>  arch/x86/lib/asm-offsets.c                    |  2 +-
>  9 files changed, 107 insertions(+), 2 deletions(-)
>  create mode 100644 arch/x86/cpu/slimbootloader/Kconfig
>  create mode 100644 arch/x86/cpu/slimbootloader/Makefile
>  create mode 100644 arch/x86/cpu/slimbootloader/car.S
>  create mode 100644 arch/x86/cpu/slimbootloader/slimbootloader.c
>  create mode 100644 arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 70f939869a..1612246dfc 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -116,6 +116,7 @@ source "arch/x86/cpu/qemu/Kconfig"
>  source "arch/x86/cpu/quark/Kconfig"
>  source "arch/x86/cpu/queensbay/Kconfig"
>  source "arch/x86/cpu/tangier/Kconfig"
> +source "arch/x86/cpu/slimbootloader/Kconfig"

Please insert this before "tangier"

>
>  # architecture-specific options below
>
> diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile
> index 85fd5e616e..a5c0113fa4 100644
> --- a/arch/x86/cpu/Makefile
> +++ b/arch/x86/cpu/Makefile
> @@ -48,6 +48,7 @@ obj-$(CONFIG_NORTHBRIDGE_INTEL_IVYBRIDGE) += ivybridge/
>  obj-$(CONFIG_INTEL_QUARK) += quark/
>  obj-$(CONFIG_INTEL_QUEENSBAY) += queensbay/
>  obj-$(CONFIG_INTEL_TANGIER) += tangier/
> +obj-$(CONFIG_SYS_SLIMBOOTLOADER) += slimbootloader/

nits: please insert this after CONFIG_SYS_COREBOOT

>  obj-$(CONFIG_APIC) += lapic.o ioapic.o
>  obj-y += irq.o
>  ifndef CONFIG_$(SPL_)X86_64
> diff --git a/arch/x86/cpu/slimbootloader/Kconfig b/arch/x86/cpu/slimbootloader/Kconfig
> new file mode 100644
> index 0000000000..e7513afd5b
> --- /dev/null
> +++ b/arch/x86/cpu/slimbootloader/Kconfig
> @@ -0,0 +1,23 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +#
> +# Copyright (C) 2019 Intel Corporation <www.intel.com>
> +
> +if TARGET_SLIMBOOTLOADER
> +
> +config SYS_SLIMBOOTLOADER
> +       bool
> +       default y
> +       imply SYS_NS16550
> +       imply AHCI_PCI
> +       imply SCSI
> +       imply SCSI_AHCI
> +       imply MMC
> +       imply MMC_PCI
> +       imply MMC_SDHCI
> +       imply MMC_SDHCI_SDMA
> +       imply USB
> +       imply USB_EHCI_HCD
> +       imply USB_XHCI_HCD
> +       imply USB_STORAGE

Could you please imply more common drivers for this? I think we should
at least imply USB_KEYBOARD, E1000, RTL8169.


> +
> +endif
> diff --git a/arch/x86/cpu/slimbootloader/Makefile b/arch/x86/cpu/slimbootloader/Makefile
> new file mode 100644
> index 0000000000..627a721e8c
> --- /dev/null
> +++ b/arch/x86/cpu/slimbootloader/Makefile
> @@ -0,0 +1,5 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +#
> +# Copyright (C) 2019 Intel Corporation <www.intel.com>
> +
> +obj-y += car.o slimbootloader.o
> diff --git a/arch/x86/cpu/slimbootloader/car.S b/arch/x86/cpu/slimbootloader/car.S
> new file mode 100644
> index 0000000000..63c5c28b33
> --- /dev/null
> +++ b/arch/x86/cpu/slimbootloader/car.S
> @@ -0,0 +1,43 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright (C) 2019 Intel Corporation <www.intel.com>
> + */
> +
> +#include <generated/asm-offsets.h>
> +
> +.section .text
> +
> +.globl slimbootloader_start
> +slimbootloader_start:
> +       /* Get hob pointer parameter from previous stage's stack */
> +       mov     0x4(%esp), %esi
> +
> +       /* Set up global data */
> +       mov     %esp, %eax
> +       call    board_init_f_alloc_reserve
> +       mov     %eax, %esp
> +       call    board_init_f_init_reserve
> +
> +#ifdef CONFIG_DEBUG_UART
> +       call    debug_uart_init
> +#endif
> +
> +       /* Get address of global_data */
> +       mov     %fs:0, %edx
> +       movl    %esi, GD_HOB_LIST(%edx)
> +
> +       /* Enter u-boot with 0 bootflag */
> +       xorl    %eax, %eax
> +       call    board_init_f
> +
> +.globl car_init
> +car_init:
> +       /*
> +        * CAR init/teardown and memory init have already been done
> +        * in Slim Bootloader stages. Therefore, let's use this car_init as
> +        * very first entry point of slimbootloader_start.
> +        */
> +       jmp     slimbootloader_start
> +
> +       /* DO NOT REACH HERE */
> +       jmp     .
> diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c
> new file mode 100644
> index 0000000000..9f3a61ec61
> --- /dev/null
> +++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
> @@ -0,0 +1,21 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (C) 2019 Intel Corporation <www.intel.com>
> + */
> +
> +#include <common.h>
> +
> +int arch_cpu_init(void)
> +{
> +       return x86_cpu_init_f();
> +}
> +
> +int checkcpu(void)
> +{
> +       return 0;
> +}
> +
> +int print_cpuinfo(void)
> +{
> +       return default_print_cpuinfo();
> +}
> diff --git a/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h b/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
> new file mode 100644
> index 0000000000..7309a83724
> --- /dev/null
> +++ b/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
> @@ -0,0 +1,11 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright (C) 2019 Intel Corporation <www.intel.com>
> + */
> +
> +#ifndef __SLIMBOOTLOADER_ARCH_H__
> +#define __SLIMBOOTLOADER_ARCH_H__
> +
> +#include <common.h>
> +
> +#endif
> diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h
> index 9398ec33b2..674efaaa01 100644
> --- a/arch/x86/include/asm/global_data.h
> +++ b/arch/x86/include/asm/global_data.h
> @@ -83,7 +83,7 @@ struct arch_global_data {
>         const struct pch_gpio_map *gpio_map;    /* board GPIO map */
>         struct memory_info meminfo;     /* Memory information */
>         struct pei_memory_info pei_meminfo;     /* PEI memory information */
> -#ifdef CONFIG_HAVE_FSP
> +#if defined(CONFIG_HAVE_FSP) || defined(CONFIG_SYS_SLIMBOOTLOADER)
>         void *hob_list;                 /* FSP HOB list */
>  #endif
>         struct mtrr_request mtrr_req[MAX_MTRR_REQUESTS];
> diff --git a/arch/x86/lib/asm-offsets.c b/arch/x86/lib/asm-offsets.c
> index 90dce22b25..258c0bbc2c 100644
> --- a/arch/x86/lib/asm-offsets.c
> +++ b/arch/x86/lib/asm-offsets.c
> @@ -17,7 +17,7 @@
>  int main(void)
>  {
>         DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
> -#ifdef CONFIG_HAVE_FSP
> +#if defined(CONFIG_HAVE_FSP) || defined(CONFIG_SYS_SLIMBOOTLOADER)
>         DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
>  #endif
>         DEFINE(GD_TABLE, offsetof(gd_t, arch.table));
> --
> 2.20.1
>
Park, Aiden July 8, 2019, 4:30 p.m. UTC | #2
Hi Bin,

> -----Original Message-----
> From: Bin Meng [mailto:bmeng.cn@gmail.com]
> Sent: Tuesday, July 2, 2019 7:13 AM
> To: Park, Aiden <aiden.park@intel.com>
> Cc: U-Boot Mailing List <u-boot@lists.denx.de>; Simon Glass
> <sjg@chromium.org>
> Subject: Re: [PATCH v2 1/8] x86: Add new slimbootloader CPU type
> 
> Hi Aiden,
> 
> On Wed, Jun 26, 2019 at 7:15 AM Park, Aiden <aiden.park@intel.com> wrote:
> >
> 
> Since this is the first patch in the series, could you please add a brief
> description about slim bootloader?
Sure. I will add a brief description about Slim Bootloader. Thanks.
> 
> > - Added CONFIG_SYS_SLIMBOOTLOADER to enable slimbootloader CPU
> type
> 
> nits: Added -> Add
I will change this.
> 
> > - Added new arch/x86/cpu/slimbootloader directory with minimum codes
> 
> ditto
I will change this too.
> 
> > - Get hob_list pointer from Slim Bootloader
> >
> > Signed-off-by: Aiden Park <aiden.park@intel.com>
> > ---
> >  arch/x86/Kconfig                              |  1 +
> >  arch/x86/cpu/Makefile                         |  1 +
> >  arch/x86/cpu/slimbootloader/Kconfig           | 23 ++++++++++
> >  arch/x86/cpu/slimbootloader/Makefile          |  5 +++
> >  arch/x86/cpu/slimbootloader/car.S             | 43 +++++++++++++++++++
> >  arch/x86/cpu/slimbootloader/slimbootloader.c  | 21 +++++++++
> > .../asm/arch-slimbootloader/slimbootloader.h  | 11 +++++
> >  arch/x86/include/asm/global_data.h            |  2 +-
> >  arch/x86/lib/asm-offsets.c                    |  2 +-
> >  9 files changed, 107 insertions(+), 2 deletions(-)  create mode
> > 100644 arch/x86/cpu/slimbootloader/Kconfig
> >  create mode 100644 arch/x86/cpu/slimbootloader/Makefile
> >  create mode 100644 arch/x86/cpu/slimbootloader/car.S  create mode
> > 100644 arch/x86/cpu/slimbootloader/slimbootloader.c
> >  create mode 100644
> > arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
> >
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index
> > 70f939869a..1612246dfc 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -116,6 +116,7 @@ source "arch/x86/cpu/qemu/Kconfig"
> >  source "arch/x86/cpu/quark/Kconfig"
> >  source "arch/x86/cpu/queensbay/Kconfig"
> >  source "arch/x86/cpu/tangier/Kconfig"
> > +source "arch/x86/cpu/slimbootloader/Kconfig"
> 
> Please insert this before "tangier"
Let me move this before tangier.
> 
> >
> >  # architecture-specific options below
> >
> > diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile index
> > 85fd5e616e..a5c0113fa4 100644
> > --- a/arch/x86/cpu/Makefile
> > +++ b/arch/x86/cpu/Makefile
> > @@ -48,6 +48,7 @@ obj-$(CONFIG_NORTHBRIDGE_INTEL_IVYBRIDGE) +=
> > ivybridge/
> >  obj-$(CONFIG_INTEL_QUARK) += quark/
> >  obj-$(CONFIG_INTEL_QUEENSBAY) += queensbay/
> >  obj-$(CONFIG_INTEL_TANGIER) += tangier/
> > +obj-$(CONFIG_SYS_SLIMBOOTLOADER) += slimbootloader/
> 
> nits: please insert this after CONFIG_SYS_COREBOOT
Let me move this too.
> 
> >  obj-$(CONFIG_APIC) += lapic.o ioapic.o  obj-y += irq.o  ifndef
> > CONFIG_$(SPL_)X86_64 diff --git a/arch/x86/cpu/slimbootloader/Kconfig
> > b/arch/x86/cpu/slimbootloader/Kconfig
> > new file mode 100644
> > index 0000000000..e7513afd5b
> > --- /dev/null
> > +++ b/arch/x86/cpu/slimbootloader/Kconfig
> > @@ -0,0 +1,23 @@
> > +# SPDX-License-Identifier: GPL-2.0+
> > +#
> > +# Copyright (C) 2019 Intel Corporation <www.intel.com>
> > +
> > +if TARGET_SLIMBOOTLOADER
> > +
> > +config SYS_SLIMBOOTLOADER
> > +       bool
> > +       default y
> > +       imply SYS_NS16550
> > +       imply AHCI_PCI
> > +       imply SCSI
> > +       imply SCSI_AHCI
> > +       imply MMC
> > +       imply MMC_PCI
> > +       imply MMC_SDHCI
> > +       imply MMC_SDHCI_SDMA
> > +       imply USB
> > +       imply USB_EHCI_HCD
> > +       imply USB_XHCI_HCD
> > +       imply USB_STORAGE
> 
> Could you please imply more common drivers for this? I think we should at
> least imply USB_KEYBOARD, E1000, RTL8169.
Thanks for letting me know this. Basically, this was my intention to have very minimum drivers for booting and small binary size. Let me add common drivers.
> 
> 
> > +
> > +endif
> > diff --git a/arch/x86/cpu/slimbootloader/Makefile
> > b/arch/x86/cpu/slimbootloader/Makefile
> > new file mode 100644
> > index 0000000000..627a721e8c
> > --- /dev/null
> > +++ b/arch/x86/cpu/slimbootloader/Makefile
> > @@ -0,0 +1,5 @@
> > +# SPDX-License-Identifier: GPL-2.0+
> > +#
> > +# Copyright (C) 2019 Intel Corporation <www.intel.com>
> > +
> > +obj-y += car.o slimbootloader.o
> > diff --git a/arch/x86/cpu/slimbootloader/car.S
> > b/arch/x86/cpu/slimbootloader/car.S
> > new file mode 100644
> > index 0000000000..63c5c28b33
> > --- /dev/null
> > +++ b/arch/x86/cpu/slimbootloader/car.S
> > @@ -0,0 +1,43 @@
> > +/* SPDX-License-Identifier: GPL-2.0+ */
> > +/*
> > + * Copyright (C) 2019 Intel Corporation <www.intel.com>  */
> > +
> > +#include <generated/asm-offsets.h>
> > +
> > +.section .text
> > +
> > +.globl slimbootloader_start
> > +slimbootloader_start:
> > +       /* Get hob pointer parameter from previous stage's stack */
> > +       mov     0x4(%esp), %esi
> > +
> > +       /* Set up global data */
> > +       mov     %esp, %eax
> > +       call    board_init_f_alloc_reserve
> > +       mov     %eax, %esp
> > +       call    board_init_f_init_reserve
> > +
> > +#ifdef CONFIG_DEBUG_UART
> > +       call    debug_uart_init
> > +#endif
> > +
> > +       /* Get address of global_data */
> > +       mov     %fs:0, %edx
> > +       movl    %esi, GD_HOB_LIST(%edx)
> > +
> > +       /* Enter u-boot with 0 bootflag */
> > +       xorl    %eax, %eax
> > +       call    board_init_f
> > +
> > +.globl car_init
> > +car_init:
> > +       /*
> > +        * CAR init/teardown and memory init have already been done
> > +        * in Slim Bootloader stages. Therefore, let's use this car_init as
> > +        * very first entry point of slimbootloader_start.
> > +        */
> > +       jmp     slimbootloader_start
> > +
> > +       /* DO NOT REACH HERE */
> > +       jmp     .
> > diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c
> > b/arch/x86/cpu/slimbootloader/slimbootloader.c
> > new file mode 100644
> > index 0000000000..9f3a61ec61
> > --- /dev/null
> > +++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
> > @@ -0,0 +1,21 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +/*
> > + * Copyright (C) 2019 Intel Corporation <www.intel.com>  */
> > +
> > +#include <common.h>
> > +
> > +int arch_cpu_init(void)
> > +{
> > +       return x86_cpu_init_f();
> > +}
> > +
> > +int checkcpu(void)
> > +{
> > +       return 0;
> > +}
> > +
> > +int print_cpuinfo(void)
> > +{
> > +       return default_print_cpuinfo(); }
> > diff --git a/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
> > b/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
> > new file mode 100644
> > index 0000000000..7309a83724
> > --- /dev/null
> > +++ b/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
> > @@ -0,0 +1,11 @@
> > +/* SPDX-License-Identifier: GPL-2.0+ */
> > +/*
> > + * Copyright (C) 2019 Intel Corporation <www.intel.com>  */
> > +
> > +#ifndef __SLIMBOOTLOADER_ARCH_H__
> > +#define __SLIMBOOTLOADER_ARCH_H__
> > +
> > +#include <common.h>
> > +
> > +#endif
> > diff --git a/arch/x86/include/asm/global_data.h
> > b/arch/x86/include/asm/global_data.h
> > index 9398ec33b2..674efaaa01 100644
> > --- a/arch/x86/include/asm/global_data.h
> > +++ b/arch/x86/include/asm/global_data.h
> > @@ -83,7 +83,7 @@ struct arch_global_data {
> >         const struct pch_gpio_map *gpio_map;    /* board GPIO map */
> >         struct memory_info meminfo;     /* Memory information */
> >         struct pei_memory_info pei_meminfo;     /* PEI memory information
> */
> > -#ifdef CONFIG_HAVE_FSP
> > +#if defined(CONFIG_HAVE_FSP) ||
> defined(CONFIG_SYS_SLIMBOOTLOADER)
> >         void *hob_list;                 /* FSP HOB list */
> >  #endif
> >         struct mtrr_request mtrr_req[MAX_MTRR_REQUESTS]; diff --git
> > a/arch/x86/lib/asm-offsets.c b/arch/x86/lib/asm-offsets.c index
> > 90dce22b25..258c0bbc2c 100644
> > --- a/arch/x86/lib/asm-offsets.c
> > +++ b/arch/x86/lib/asm-offsets.c
> > @@ -17,7 +17,7 @@
> >  int main(void)
> >  {
> >         DEFINE(GD_BIST, offsetof(gd_t, arch.bist)); -#ifdef
> > CONFIG_HAVE_FSP
> > +#if defined(CONFIG_HAVE_FSP) ||
> defined(CONFIG_SYS_SLIMBOOTLOADER)
> >         DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));  #endif
> >         DEFINE(GD_TABLE, offsetof(gd_t, arch.table));
> > --
> > 2.20.1
> >
diff mbox series

Patch

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 70f939869a..1612246dfc 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -116,6 +116,7 @@  source "arch/x86/cpu/qemu/Kconfig"
 source "arch/x86/cpu/quark/Kconfig"
 source "arch/x86/cpu/queensbay/Kconfig"
 source "arch/x86/cpu/tangier/Kconfig"
+source "arch/x86/cpu/slimbootloader/Kconfig"
 
 # architecture-specific options below
 
diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile
index 85fd5e616e..a5c0113fa4 100644
--- a/arch/x86/cpu/Makefile
+++ b/arch/x86/cpu/Makefile
@@ -48,6 +48,7 @@  obj-$(CONFIG_NORTHBRIDGE_INTEL_IVYBRIDGE) += ivybridge/
 obj-$(CONFIG_INTEL_QUARK) += quark/
 obj-$(CONFIG_INTEL_QUEENSBAY) += queensbay/
 obj-$(CONFIG_INTEL_TANGIER) += tangier/
+obj-$(CONFIG_SYS_SLIMBOOTLOADER) += slimbootloader/
 obj-$(CONFIG_APIC) += lapic.o ioapic.o
 obj-y += irq.o
 ifndef CONFIG_$(SPL_)X86_64
diff --git a/arch/x86/cpu/slimbootloader/Kconfig b/arch/x86/cpu/slimbootloader/Kconfig
new file mode 100644
index 0000000000..e7513afd5b
--- /dev/null
+++ b/arch/x86/cpu/slimbootloader/Kconfig
@@ -0,0 +1,23 @@ 
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2019 Intel Corporation <www.intel.com>
+
+if TARGET_SLIMBOOTLOADER
+
+config SYS_SLIMBOOTLOADER
+	bool
+	default y
+	imply SYS_NS16550
+	imply AHCI_PCI
+	imply SCSI
+	imply SCSI_AHCI
+	imply MMC
+	imply MMC_PCI
+	imply MMC_SDHCI
+	imply MMC_SDHCI_SDMA
+	imply USB
+	imply USB_EHCI_HCD
+	imply USB_XHCI_HCD
+	imply USB_STORAGE
+
+endif
diff --git a/arch/x86/cpu/slimbootloader/Makefile b/arch/x86/cpu/slimbootloader/Makefile
new file mode 100644
index 0000000000..627a721e8c
--- /dev/null
+++ b/arch/x86/cpu/slimbootloader/Makefile
@@ -0,0 +1,5 @@ 
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2019 Intel Corporation <www.intel.com>
+
+obj-y += car.o slimbootloader.o
diff --git a/arch/x86/cpu/slimbootloader/car.S b/arch/x86/cpu/slimbootloader/car.S
new file mode 100644
index 0000000000..63c5c28b33
--- /dev/null
+++ b/arch/x86/cpu/slimbootloader/car.S
@@ -0,0 +1,43 @@ 
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2019 Intel Corporation <www.intel.com>
+ */
+
+#include <generated/asm-offsets.h>
+
+.section .text
+
+.globl slimbootloader_start
+slimbootloader_start:
+	/* Get hob pointer parameter from previous stage's stack */
+	mov	0x4(%esp), %esi
+
+	/* Set up global data */
+	mov	%esp, %eax
+	call	board_init_f_alloc_reserve
+	mov	%eax, %esp
+	call	board_init_f_init_reserve
+
+#ifdef CONFIG_DEBUG_UART
+	call	debug_uart_init
+#endif
+
+	/* Get address of global_data */
+	mov	%fs:0, %edx
+	movl	%esi, GD_HOB_LIST(%edx)
+
+	/* Enter u-boot with 0 bootflag */
+	xorl	%eax, %eax
+	call	board_init_f
+
+.globl car_init
+car_init:
+	/*
+	 * CAR init/teardown and memory init have already been done
+	 * in Slim Bootloader stages. Therefore, let's use this car_init as
+	 * very first entry point of slimbootloader_start.
+	 */
+	jmp	slimbootloader_start
+
+	/* DO NOT REACH HERE */
+	jmp	.
diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c
new file mode 100644
index 0000000000..9f3a61ec61
--- /dev/null
+++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
@@ -0,0 +1,21 @@ 
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2019 Intel Corporation <www.intel.com>
+ */
+
+#include <common.h>
+
+int arch_cpu_init(void)
+{
+	return x86_cpu_init_f();
+}
+
+int checkcpu(void)
+{
+	return 0;
+}
+
+int print_cpuinfo(void)
+{
+	return default_print_cpuinfo();
+}
diff --git a/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h b/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
new file mode 100644
index 0000000000..7309a83724
--- /dev/null
+++ b/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
@@ -0,0 +1,11 @@ 
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2019 Intel Corporation <www.intel.com>
+ */
+
+#ifndef __SLIMBOOTLOADER_ARCH_H__
+#define __SLIMBOOTLOADER_ARCH_H__
+
+#include <common.h>
+
+#endif
diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h
index 9398ec33b2..674efaaa01 100644
--- a/arch/x86/include/asm/global_data.h
+++ b/arch/x86/include/asm/global_data.h
@@ -83,7 +83,7 @@  struct arch_global_data {
 	const struct pch_gpio_map *gpio_map;	/* board GPIO map */
 	struct memory_info meminfo;	/* Memory information */
 	struct pei_memory_info pei_meminfo;	/* PEI memory information */
-#ifdef CONFIG_HAVE_FSP
+#if defined(CONFIG_HAVE_FSP) || defined(CONFIG_SYS_SLIMBOOTLOADER)
 	void *hob_list;			/* FSP HOB list */
 #endif
 	struct mtrr_request mtrr_req[MAX_MTRR_REQUESTS];
diff --git a/arch/x86/lib/asm-offsets.c b/arch/x86/lib/asm-offsets.c
index 90dce22b25..258c0bbc2c 100644
--- a/arch/x86/lib/asm-offsets.c
+++ b/arch/x86/lib/asm-offsets.c
@@ -17,7 +17,7 @@ 
 int main(void)
 {
 	DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
-#ifdef CONFIG_HAVE_FSP
+#if defined(CONFIG_HAVE_FSP) || defined(CONFIG_SYS_SLIMBOOTLOADER)
 	DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
 #endif
 	DEFINE(GD_TABLE, offsetof(gd_t, arch.table));