kboot: Add powerpc stub for enumerate_memory_arch()

Add stub for new MI interface for enumerating memory. Right now powerpc
looks in the FDT table at a later point in boot since we don't need to
pass a specific memory table to the kernel. Leave it like that for now,
but note plans for the future.

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D38248
This commit is contained in:
Warner Losh 2023-02-03 08:38:29 -07:00
parent 81fbd74a4b
commit 1d5f967fa7
2 changed files with 12 additions and 1 deletions

View file

@ -208,3 +208,15 @@ kboot_get_kernel_machine_bits(void)
return (bits);
}
#endif
/* Need to transition from current hacky FDT way to this code */
bool enumerate_memory_arch(void)
{
/*
* For now, we dig it out of the FDT, plus we need to pass all data into
* the kernel via the (adjusted) FDT we find.
*/
setenv("usefdt", "1", 1);
return true;
}

View file

@ -254,7 +254,6 @@ main(int argc, const char **argv)
printf("\n%s", bootprog_info);
setenv("LINES", "24", 1);
setenv("usefdt", "1", 1);
memory_limits();