aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-04-05 15:51:12 -0400
committerKevin O'Connor <kevin@koconnor.net>2008-04-05 15:51:12 -0400
commite0113c99c083d9b812216e120aff9eb9806de91b (patch)
tree1b861afb2b61f9cc02580161c15da77af38a3397 /src/util.c
parent567e4e3d349150e252f0d2914d6631e766308490 (diff)
downloadseabios-e0113c99c083d9b812216e120aff9eb9806de91b.tar.gz
Forward port new boot menu features from bochs bios.
Support boot menu during last stage of post. Improve description of option roms. Support printf of "%.s" to force printing strings on stack. Enhance memcpy so that it also works in real-mode.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/util.c b/src/util.c
index 438bf755..845609bc 100644
--- a/src/util.c
+++ b/src/util.c
@@ -31,15 +31,18 @@ memset(void *s, int c, size_t n)
}
void *
-memcpy(void *d1, const void *s1, size_t len)
+memcpy(void *far_d1, const void *far_s1, size_t len)
{
- u8 *d = d1;
- const u8 *s = s1;
+ u8 *d = far_d1;
+ u8 *s = (u8*)far_s1;
- while (len--)
- *d++ = *s++;
+ while (len--) {
+ SET_FARPTR(*d, GET_FARPTR(*s));
+ d++;
+ s++;
+ }
- return d1;
+ return far_d1;
}
void