From 5c39f2c150612e04c0534348cc71e93e43026cf0 Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Mon, 13 Mar 2023 14:31:43 -0700 Subject: x86: cpu: i386: cpu: only set pci_ram_top if CONFIG_IS_ENABLED(PCI) This avoids an error when ifdef CONFIG_PCI is changed to if CONFIG_IS_ENABLED(PCI) Signed-off-by: Troy Kisky [Rebased on top of u-boot/master] Signed-off-by: Bin Meng --- include/asm-generic/global_data.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/asm-generic/global_data.h') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 8fc205ded1a..d364f1b965e 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -573,6 +573,13 @@ static_assert(sizeof(struct global_data) == GD_SIZE); #define gd_malloc_start() 0 #define gd_set_malloc_start(val) #endif + +#if CONFIG_IS_ENABLED(PCI) +#define gd_set_pci_ram_top(val) gd->pci_ram_top = val +#else +#define gd_set_pci_ram_top(val) +#endif + /** * enum gd_flags - global data flags * -- cgit v1.2.3 From 15a23b6f167ac89d9be8c1c676309253865e446f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 7 Sep 2023 09:58:13 -0600 Subject: dm: core: Allow marking driver model as dead On x86 devices we use CAR (Cache-As-RAM) to hold the malloc() region in SPL, since SDRAM is not set up yet. This means that driver model stores its tables in this region. When preparing to jump from SPL to U-Boot proper, we must disable CAR, so that the CPU can uses the caches normally. This means that driver model tables become inaccessible. From there until we jump to U-Boot proper, we must avoid using driver model. This is only a problem on boards which operate this way, for example chromebook_link64 Add a flag to indicate that driver model is dead and should not be used. It can be used in SPL to avoid hanging the machine. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- include/asm-generic/global_data.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/asm-generic/global_data.h') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index d364f1b965e..d47c674c742 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -674,6 +674,11 @@ enum gd_flags { * @GD_FLG_OF_TAG_MIGRATE: Device tree has old u-boot,dm- tags */ GD_FLG_OF_TAG_MIGRATE = 0x200000, + /** + * @GD_FLG_DM_DEAD: Driver model is not accessible. This can be set when + * the memory used to holds its tables has been mapped out. + */ + GD_FLG_DM_DEAD = 0x400000, }; #endif /* __ASSEMBLY__ */ -- cgit v1.2.3 From 50834884a8159845475fdc28ac196a41fe4d4915 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 19 Sep 2023 21:00:15 -0600 Subject: Record the position of the SMBIOS tables Remember where these end up so that we can pass this information on to the EFI layer. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- include/asm-generic/global_data.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/asm-generic/global_data.h') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index d47c674c742..c6d63b3657c 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -552,6 +552,14 @@ static_assert(sizeof(struct global_data) == GD_SIZE); #define gd_set_acpi_start(addr) #endif +#ifdef CONFIG_SMBIOS +#define gd_smbios_start() gd->smbios_start +#define gd_set_smbios_start(addr) gd->arch.smbios_start = addr +#else +#define gd_smbios_start() 0UL +#define gd_set_smbios_start(addr) +#endif + #if CONFIG_IS_ENABLED(MULTI_DTB_FIT) #define gd_multi_dtb_fit() gd->multi_dtb_fit #define gd_set_multi_dtb_fit(_dtb) gd->multi_dtb_fit = _dtb -- cgit v1.2.3