9boot: initialize the junk portion of pxe unload call
This commit is contained in:
parent
e2876cdfc7
commit
999cc5fd21
2 changed files with 7 additions and 1 deletions
|
@ -113,7 +113,7 @@ unload(void)
|
||||||
uchar status[2];
|
uchar status[2];
|
||||||
uchar junk[10];
|
uchar junk[10];
|
||||||
} buf;
|
} buf;
|
||||||
puts(buf.status, 0);
|
memset(&buf, 0, sizeof(buf));
|
||||||
pxecall(0x70, &buf);
|
pxecall(0x70, &buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ memmove(void *dst, void *src, int n)
|
||||||
{
|
{
|
||||||
uchar *d = dst;
|
uchar *d = dst;
|
||||||
uchar *s = src;
|
uchar *s = src;
|
||||||
|
|
||||||
if(d < s){
|
if(d < s){
|
||||||
while(n > 0){
|
while(n > 0){
|
||||||
*d++ = *s++;
|
*d++ = *s++;
|
||||||
|
@ -210,6 +211,8 @@ bootkern(void *f)
|
||||||
return "bad header";
|
return "bad header";
|
||||||
if(beswal(ex.magic) != I_MAGIC)
|
if(beswal(ex.magic) != I_MAGIC)
|
||||||
return "bad magic";
|
return "bad magic";
|
||||||
|
|
||||||
|
/* load address */
|
||||||
e = (uchar*)(beswal(ex.entry) & ~0xF0000000UL);
|
e = (uchar*)(beswal(ex.entry) & ~0xF0000000UL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -219,6 +222,7 @@ bootkern(void *f)
|
||||||
* we finished, move it to final location.
|
* we finished, move it to final location.
|
||||||
*/
|
*/
|
||||||
t = (uchar*)0x200000;
|
t = (uchar*)0x200000;
|
||||||
|
|
||||||
n = beswal(ex.text);
|
n = beswal(ex.text);
|
||||||
if(readn(f, t, n) != n)
|
if(readn(f, t, n) != n)
|
||||||
goto Error;
|
goto Error;
|
||||||
|
@ -227,7 +231,9 @@ bootkern(void *f)
|
||||||
if(readn(f, d, n) != n)
|
if(readn(f, d, n) != n)
|
||||||
goto Error;
|
goto Error;
|
||||||
close(f);
|
close(f);
|
||||||
|
|
||||||
unload();
|
unload();
|
||||||
|
|
||||||
n = (d + n) - t;
|
n = (d + n) - t;
|
||||||
memmove(e, t, n);
|
memmove(e, t, n);
|
||||||
jump(e);
|
jump(e);
|
||||||
|
|
Loading…
Reference in a new issue