o Properly set ksym_start & ksym_end when options DDB is set.

Include opt_ddb.h for that. Now you can actually boot with
   -d and set breakpoints using function names.
o  Make sure to include opt_msgbuf.h.
o  Carve out the first 1MB of physical memory. The MPC85xx has
   DMA problems with addresses below 1MB. Ideally busdma knows
   how to avoid allocating below 1MB for MPC85xx, but that
   requires a bit more work. For now, ignore the 1MB of DRAM.
This commit is contained in:
Marcel Moolenaar 2009-04-21 17:04:01 +00:00
parent 86979280fc
commit 2cf3f80c1b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191362

View File

@ -82,7 +82,9 @@
__FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
#include "opt_msgbuf.h"
#include <sys/cdefs.h>
#include <sys/types.h>
@ -137,6 +139,10 @@ __FBSDID("$FreeBSD$");
#include <powerpc/mpc85xx/ocpbus.h>
#include <powerpc/mpc85xx/mpc85xx.h>
#ifdef DDB
extern vm_offset_t ksym_start, ksym_end;
#endif
#ifdef DEBUG
#define debugf(fmt, args...) printf(fmt, ##args)
#else
@ -355,6 +361,10 @@ e500_init(u_int32_t startkernel, u_int32_t endkernel, void *mdp)
boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
end = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t);
#ifdef DDB
ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t);
ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t);
#endif
}
} else {
/*
@ -376,8 +386,14 @@ e500_init(u_int32_t startkernel, u_int32_t endkernel, void *mdp)
for (i = 0; i < bootinfo->bi_mem_reg_no; i++, mr++) {
if (i == MEM_REGIONS)
break;
availmem_regions[i].mr_start = mr->mem_base;
availmem_regions[i].mr_size = mr->mem_size;
if (mr->mem_base < 1048576) {
availmem_regions[i].mr_start = 1048576;
availmem_regions[i].mr_size = mr->mem_size -
(1048576 - mr->mem_base);
} else {
availmem_regions[i].mr_start = mr->mem_base;
availmem_regions[i].mr_size = mr->mem_size;
}
}
availmem_regions_sz = i;