Move Assert to check MAGIC before actual use of the MBI record
This commit is contained in:
parent
023eea4762
commit
0472cd6e9d
@ -224,13 +224,13 @@ void get_parameters(u32_t ebx, kinfo_t *cbi)
|
|||||||
|
|
||||||
kinfo_t *pre_init(u32_t magic, u32_t ebx)
|
kinfo_t *pre_init(u32_t magic, u32_t ebx)
|
||||||
{
|
{
|
||||||
|
assert(magic == MULTIBOOT_INFO_MAGIC);
|
||||||
|
|
||||||
/* Get our own copy boot params pointed to by ebx.
|
/* Get our own copy boot params pointed to by ebx.
|
||||||
* Here we find out whether we should do serial output.
|
* Here we find out whether we should do serial output.
|
||||||
*/
|
*/
|
||||||
get_parameters(ebx, &kinfo);
|
get_parameters(ebx, &kinfo);
|
||||||
|
|
||||||
assert(magic == MULTIBOOT_INFO_MAGIC);
|
|
||||||
|
|
||||||
/* Make and load a pagetable that will map the kernel
|
/* Make and load a pagetable that will map the kernel
|
||||||
* to where it should be; but first a 1:1 mapping so
|
* to where it should be; but first a 1:1 mapping so
|
||||||
* this code stays where it should be.
|
* this code stays where it should be.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user