diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index 47b6e6e..f0dfe63 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -325,7 +325,7 @@
 	return ret;
 }
 
-int vesa_setup_video_priv(struct vesa_mode_info *vesa,
+int vesa_setup_video_priv(struct vesa_mode_info *vesa, u64 fb,
 			  struct video_priv *uc_priv,
 			  struct video_uc_plat *plat)
 {
@@ -348,9 +348,9 @@
 
 	/* Use double buffering if enabled */
 	if (IS_ENABLED(CONFIG_VIDEO_COPY) && plat->base)
-		plat->copy_base = vesa->phys_base_ptr;
+		plat->copy_base = fb;
 	else
-		plat->base = vesa->phys_base_ptr;
+		plat->base = fb;
 	log_debug("base = %lx, copy_base = %lx\n", plat->base, plat->copy_base);
 	plat->size = vesa->bytes_per_scanline * vesa->y_resolution;
 
@@ -377,7 +377,9 @@
 		return ret;
 	}
 
-	ret = vesa_setup_video_priv(&mode_info.vesa, uc_priv, plat);
+	ret = vesa_setup_video_priv(&mode_info.vesa,
+				    mode_info.vesa.phys_base_ptr, uc_priv,
+				    plat);
 	if (ret) {
 		if (ret == -ENFILE) {
 			/*
diff --git a/drivers/video/coreboot.c b/drivers/video/coreboot.c
index d2d87c7..c586475 100644
--- a/drivers/video/coreboot.c
+++ b/drivers/video/coreboot.c
@@ -57,7 +57,7 @@
 		goto err;
 	}
 
-	ret = vesa_setup_video_priv(vesa, uc_priv, plat);
+	ret = vesa_setup_video_priv(vesa, vesa->phys_base_ptr, uc_priv, plat);
 	if (ret) {
 		ret = log_msg_ret("setup", ret);
 		goto err;
diff --git a/drivers/video/efi.c b/drivers/video/efi.c
index 0479f20..169637c 100644
--- a/drivers/video/efi.c
+++ b/drivers/video/efi.c
@@ -5,6 +5,8 @@
  * EFI framebuffer driver based on GOP
  */
 
+#define LOG_CATEGORY LOGC_EFI
+
 #include <common.h>
 #include <dm.h>
 #include <efi_api.h>
@@ -56,11 +58,12 @@
  * Gets info from the graphics-output protocol
  *
  * @vesa: Place to put the mode information
+ * @fbp: Returns the address of the frame buffer
  * @infop: Returns a pointer to the mode info
  * Returns: 0 if OK, -ENOSYS if boot services are not available, -ENOTSUPP if
  * the protocol is not supported by EFI
  */
-static int get_mode_info(struct vesa_mode_info *vesa,
+static int get_mode_info(struct vesa_mode_info *vesa, u64 *fbp,
 			 struct efi_gop_mode_info **infop)
 {
 	efi_guid_t efi_gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
@@ -74,9 +77,13 @@
 	ret = boot->locate_protocol(&efi_gop_guid, NULL, (void **)&gop);
 	if (ret)
 		return log_msg_ret("prot", -ENOTSUPP);
-
 	mode = gop->mode;
+	log_debug("maxmode %u, mode %u, info %p, size %lx, fb %lx, fb_size %lx\n",
+		  mode->max_mode, mode->mode, mode->info, mode->info_size,
+		  (ulong)mode->fb_base, (ulong)mode->fb_size);
+
 	vesa->phys_base_ptr = mode->fb_base;
+	*fbp = mode->fb_base;
 	vesa->x_resolution = mode->info->width;
 	vesa->y_resolution = mode->info->height;
 	*infop = mode->info;
@@ -91,10 +98,11 @@
  * it into a vesa structure. It also returns the mode information.
  *
  * @vesa: Place to put the mode information
+ * @fbp: Returns the address of the frame buffer
  * @infop: Returns a pointer to the mode info
  * Returns: 0 if OK, -ve on error
  */
-static int get_mode_from_entry(struct vesa_mode_info *vesa,
+static int get_mode_from_entry(struct vesa_mode_info *vesa, u64 *fbp,
 			       struct efi_gop_mode_info **infop)
 {
 	struct efi_gop_mode *mode;
@@ -107,6 +115,7 @@
 		return ret;
 	}
 	vesa->phys_base_ptr = mode->fb_base;
+	*fbp = mode->fb_base;
 	vesa->x_resolution = mode->info->width;
 	vesa->y_resolution = mode->info->height;
 	*infop = mode->info;
@@ -114,16 +123,17 @@
 	return 0;
 }
 
-static int save_vesa_mode(struct vesa_mode_info *vesa)
+static int save_vesa_mode(struct vesa_mode_info *vesa, u64 *fbp)
 {
 	const struct efi_framebuffer *fbinfo;
 	struct efi_gop_mode_info *info;
 	int ret;
 
+	printf("start\n");
 	if (IS_ENABLED(CONFIG_EFI_APP))
-		ret = get_mode_info(vesa, &info);
+		ret = get_mode_info(vesa, fbp, &info);
 	else
-		ret = get_mode_from_entry(vesa, &info);
+		ret = get_mode_from_entry(vesa, fbp, &info);
 	if (ret) {
 		printf("EFI graphics output protocol not found (err=%dE)\n",
 		       ret);
@@ -163,8 +173,7 @@
 		vesa->bytes_per_scanline = (info->pixels_per_scanline *
 					    vesa->bits_per_pixel) / 8;
 	} else {
-		debug("efi set unknown framebuffer format: %d\n",
-		      info->pixel_format);
+		log_err("Unknown framebuffer format: %d\n", info->pixel_format);
 		return -EINVAL;
 	}
 
@@ -176,19 +185,20 @@
 	struct video_uc_plat *plat = dev_get_uclass_plat(dev);
 	struct video_priv *uc_priv = dev_get_uclass_priv(dev);
 	struct vesa_mode_info *vesa = &mode_info.vesa;
+	u64 fb;
 	int ret;
 
 	/* Initialize vesa_mode_info structure */
-	ret = save_vesa_mode(vesa);
+	ret = save_vesa_mode(vesa, &fb);
 	if (ret)
 		goto err;
 
-	ret = vesa_setup_video_priv(vesa, uc_priv, plat);
+	ret = vesa_setup_video_priv(vesa, fb, uc_priv, plat);
 	if (ret)
 		goto err;
 
-	printf("Video: %dx%dx%d\n", uc_priv->xsize, uc_priv->ysize,
-	       vesa->bits_per_pixel);
+	printf("Video: %dx%dx%d @ %lx\n", uc_priv->xsize, uc_priv->ysize,
+	       vesa->bits_per_pixel, (ulong)fb);
 
 	return 0;
 
