diff options
author | dfr <dfr@FreeBSD.org> | 2001-09-15 09:53:56 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2001-09-15 09:53:56 +0000 |
commit | 60a2e27040133822807bc4a64e7b486315129c58 (patch) | |
tree | d845789b320e20b3f6920b5b44b37c84b4f3f258 /sys/boot/ia64/ski | |
parent | 99ae75a097ca7f2e4fabca5b0c137987e421bd91 (diff) | |
download | FreeBSD-src-60a2e27040133822807bc4a64e7b486315129c58.zip FreeBSD-src-60a2e27040133822807bc4a64e7b486315129c58.tar.gz |
Fill in the bootinfo's memory map.
Diffstat (limited to 'sys/boot/ia64/ski')
-rw-r--r-- | sys/boot/ia64/ski/bootinfo.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/boot/ia64/ski/bootinfo.c b/sys/boot/ia64/ski/bootinfo.c index 9bb0f3e..9ac29b3 100644 --- a/sys/boot/ia64/ski/bootinfo.c +++ b/sys/boot/ia64/ski/bootinfo.c @@ -33,6 +33,9 @@ #include <sys/linker.h> #include <machine/elf.h> #include <machine/bootinfo.h> + +#include <efi.h> + #include "bootstrap.h" /* @@ -245,6 +248,7 @@ bi_load(struct bootinfo *bi, struct preloaded_file *fp, char *args) char *kernelname; vm_offset_t ssym, esym; struct file_metadata *md; + EFI_MEMORY_DESCRIPTOR *memp; /* * Version 1 bootinfo. @@ -319,5 +323,19 @@ bi_load(struct bootinfo *bi, struct preloaded_file *fp, char *args) strncpy(bi->bi_kernel, kernelname, sizeof(bi->bi_kernel) - 1); } + /* Describe the SKI memory map. */ + bi->bi_memmap = (u_int64_t)(bi + 1); + bi->bi_memmap_size = 1 * sizeof(EFI_MEMORY_DESCRIPTOR); + bi->bi_memdesc_size = sizeof(EFI_MEMORY_DESCRIPTOR); + bi->bi_memdesc_version = 1; + + memp = (EFI_MEMORY_DESCRIPTOR *) bi->bi_memmap; + + memp[0].Type = EfiConventionalMemory; + memp[0].PhysicalStart = 2L*1024*1024; + memp[0].VirtualStart = 0; + memp[0].NumberOfPages = (64L*1024*1024)>>12; + memp[0].Attribute = EFI_MEMORY_WB; + return(0); } |