From owner-p4-projects@FreeBSD.ORG Mon Feb 18 03:01:26 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 801E916A41B; Mon, 18 Feb 2008 03:01:26 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D84016A417 for ; Mon, 18 Feb 2008 03:01:26 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0E97613C44B for ; Mon, 18 Feb 2008 03:01:26 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I31Q00025002 for ; Mon, 18 Feb 2008 03:01:26 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I31PZA024993 for perforce@freebsd.org; Mon, 18 Feb 2008 03:01:25 GMT (envelope-from marcel@freebsd.org) Date: Mon, 18 Feb 2008 03:01:25 GMT Message-Id: <200802180301.m1I31PZA024993@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135618 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 03:01:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=135618 Change 135618 by marcel@marcel_xcllnt on 2008/02/18 03:00:27 Save the address of the global data structure in uboot_address. This will be used by the U-Boot library in the API search algorithm. Disable interrupts on entry and enable them for the duration of the syscall. Affected files ... .. //depot/projects/e500/sys/boot/powerpc/uboot/start.S#7 edit Differences ... ==== //depot/projects/e500/sys/boot/powerpc/uboot/start.S#7 (text+ko) ==== @@ -40,11 +40,18 @@ lis %r1, stack@ha addi %r1, %r1, stack@l addi %r1, %r1, (STACK_SIZE - 32) - /* Save U-Boot's r14 and r29 */ + /* Hint where to look for the API signature */ + lis %r11, uboot_address@ha + addi %r11, %r11, uboot_address@l + stw %r2, 0(%r11) + /* Save U-Boot's r14 */ lis %r11, saved_regs@ha addi %r11, %r11, saved_regs@l stw %r14, 0(%r11) - stw %r29, 4(%r11) + /* Disable interrupts */ + mfmsr %r11 + andi. %r11, %r11, ~0x8000@l + mtmsr %r11 b main /* @@ -54,25 +61,30 @@ stwu %r1, -16(%r1) mflr %r0 stw %r14, 8(%r1) - stw %r29, 12(%r1) stw %r0, 20(%r1) /* Restore U-Boot's r14 and r29 */ lis %r11, saved_regs@ha addi %r11, %r11, saved_regs@l lwz %r14, 0(%r11) - lwz %r29, 4(%r11) + /* Enable interrupts */ + mfmsr %r11 + ori %r11, %r11, 0x8000@l + mtmsr %r11 /* Call into u-Boot */ lis %r11, syscall_ptr@ha addi %r11, %r11, syscall_ptr@l lwz %r11, 0(%r11) mtctr %r11 bctrl + /* Disable interrupts */ + mfmsr %r11 + andi. %r11, %r11, ~0x8000@l + mtmsr %r11 /* Epilogue */ lwz %r11, 0(%r1) lwz %r0, 4(%r11) mtlr %r0 lwz %r14, 8(%r1) - lwz %r29, 12(%r1) mr %r1, %r11 blr @@ -88,5 +100,5 @@ .long 0 GLOBAL(saved_regs) .long 0 /* R14 */ - .long 0 /* R29 */ - +GLOBAL(uboot_address) + .long 0