diff options
author | marcel <marcel@FreeBSD.org> | 2003-02-01 22:50:09 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-02-01 22:50:09 +0000 |
commit | 389e4c3a2a331c3d7194d0a3252e266dd42daa80 (patch) | |
tree | aeaa0efb42081601d640cc4f467d7de7fc56a1df /sys/boot/ia64/libski/bootinfo.c | |
parent | 785fe397ccfcda0950251b71412f7936ad68b224 (diff) | |
download | FreeBSD-src-389e4c3a2a331c3d7194d0a3252e266dd42daa80.zip FreeBSD-src-389e4c3a2a331c3d7194d0a3252e266dd42daa80.tar.gz |
Remove special casing for running in the simulator from the kernel
and instead add platform, firmware and EFI stubs to the loader.
The net effect of this change is that besides a special console and
disk driver, the kernel has no knowledge of the simulator. This has
the following advantages:
o Simulator support is much harder to break,
o It's easier to make use of more feature complete simulators.
This would only need a change in the simulator specific loader,
o Running SMP kernels within the simulator. Note that ski at this
time does not simulate IPIs, so there's no way to start APs.
The platform, firmware and EFI stubs describe the following hardware:
o 4 CPU Itanium,
o 128 MB RAM within the 4GB address space,
o 64 MB RAM above the 4GB address space.
NOTE: The stubs in the skiloader describe a machine that should in
parts be defined by the simulator. Things like processor interrupt
block and AP wakeup vector cannot be choosen at random because they
require interpretation by the simulator. Currently the simulator is
ignorant of this.
This change introduces an unofficial SSC call SSC_SAL_SET_VECTORS
which is ignored by the simulator.
Tested with: ski (version 0.943 for linux)
Diffstat (limited to 'sys/boot/ia64/libski/bootinfo.c')
-rw-r--r-- | sys/boot/ia64/libski/bootinfo.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/sys/boot/ia64/libski/bootinfo.c b/sys/boot/ia64/libski/bootinfo.c index 0a18ec7..91f691a 100644 --- a/sys/boot/ia64/libski/bootinfo.c +++ b/sys/boot/ia64/libski/bootinfo.c @@ -34,8 +34,6 @@ #include <machine/elf.h> #include <machine/bootinfo.h> -#include <efi.h> - #include "bootstrap.h" /* @@ -60,6 +58,7 @@ static struct }; extern char *ski_fmtdev(void *vdev); +extern int ski_init_stubs(struct bootinfo *); int bi_getboothowto(char *kargs) @@ -250,7 +249,6 @@ 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. @@ -320,25 +318,5 @@ bi_load(struct bootinfo *bi, struct preloaded_file *fp, char *args) /* all done copying stuff in, save end of loaded object space */ bi->bi_kernend = addr; - /* Describe the SKI memory map. */ - bi->bi_memmap = (u_int64_t)(bi + 1); - bi->bi_memmap_size = 2 * 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; - - memp[1].Type = EfiMemoryMappedIOPortSpace; - memp[1].PhysicalStart = 0xffffc000000; - memp[1].VirtualStart = 0; - memp[1].NumberOfPages = (64L*1024*1024)>>12; - memp[1].Attribute = EFI_MEMORY_UC; - - return(0); + return (ski_init_stubs(bi)); } |