Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3466 → Rev 3467

/branches/sparc/boot/genarch/ofw_tree.c
220,9 → 220,27
{
ofw_tree_node_t *root;
#if defined (SMART_FIRMWARE)
ofw_tree_node_t *ssm;
#endif
root = ofw_tree_node_alloc();
if (root)
ofw_tree_node_process(root, NULL, ofw_root);
 
#if defined (SMART_FIRMWARE)
/*
* The firmware client interface does not automatically include the
* "ssm" node in the list of children of "/". A nasty yet working
* solution is to explicitly stick "ssm" to the OFW tree.
*/
ssm = ofw_tree_node_alloc();
if (ssm) {
ofw_tree_node_process(ssm, root, ofw_find_device("/ssm@0,0"));
ssm->peer = root->child;
root->child = ssm;
}
#endif
return root;
}
/branches/sparc/boot/arch/sparc64/loader/ofwarch.c
56,12 → 56,23
return flag != -1;
}
 
/*
* Node among whose children the CPU nodes are located.
*/
#if defined (OPEN_BOOT)
#define CPUS_PARENT_NODE ofw_root
#elif defined (SMART_FIRMWARE)
#define CPUS_PARENT_NODE ofw_find_device("/ssm@0,0")
#endif
 
 
int ofw_cpu(void)
{
char type_name[BUF_SIZE];
 
phandle node;
node = ofw_get_child_node(ofw_root);
node = ofw_get_child_node(CPUS_PARENT_NODE);
 
if (node == 0 || node == -1) {
printf("Could not find any child nodes of the root node.\n");
return 0;
84,8 → 95,12
if (strcmp(type_name, "cpu") == 0) {
uint32_t mid;
if (ofw_get_property(node, "upa-portid", &mid,
sizeof(mid)) <= 0)
/* "upa-portid" for US, "portid" for US-III */
if (ofw_get_property(
node, "upa-portid",
&mid, sizeof(mid)) <= 0
&& ofw_get_property(node, "portid",
&mid, sizeof(mid)) <= 0)
continue;
if (current_mid != mid) {
/branches/sparc/boot/arch/ppc32/Makefile.inc
26,6 → 26,8
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
 
DEFS += -DSMART_FIRMWARE
 
build: $(BASE)/image.boot
 
$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot
/branches/sparc/boot/arch/ppc64/Makefile.inc
26,6 → 26,8
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
 
DEFS += -DOPEN_BOOT
 
build: $(BASE)/image.boot
 
$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot
35,7 → 37,7
-rm arch/$(ARCH)/loader/image.boot
 
arch/$(ARCH)/loader/image.boot:
make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)"
 
clean: generic_clean
make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)