+ /* Copy the data that's outside the area that shadows coreboot_ram */
+ printk(BIOS_DEBUG, "dest %p, end %p, bouncebuffer %lx\n", dest, end, bounce_buffer);
+ if ((unsigned long)end > bounce_buffer) {
+ if ((unsigned long)dest < bounce_buffer) {
+ unsigned char *from = dest;
+ unsigned char *to = (unsigned char*)(lb_start-(bounce_buffer-(unsigned long)dest));
+ unsigned long amount = bounce_buffer-(unsigned long)dest;
+ printk(BIOS_DEBUG, "move prefix around: from %p, to %p, amount: %lx\n", from, to, amount);
+ memcpy(to, from, amount);
+ }
+ if ((unsigned long)end > bounce_buffer + (lb_end - lb_start)) {
+ unsigned long from = bounce_buffer + (lb_end - lb_start);
+ unsigned long to = lb_end;
+ unsigned long amount = (unsigned long)end - from;
+ printk(BIOS_DEBUG, "move suffix around: from %lx, to %lx, amount: %lx\n", from, to, amount);
+ memcpy((char*)to, (char*)from, amount);
+ }
+ }