From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 20602 invoked from network); 16 Aug 1999 07:24:40 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 16 Aug 1999 07:24:40 -0000 Received: from neptune.phys.ufl.edu (neptune-gw.phys.ufl.edu [128.227.64.7]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id DAA29880 for ; Mon, 16 Aug 1999 03:24:39 -0400 Received: from hee.phys.ufl.edu (hee.phys.ufl.edu [128.227.89.254]) by neptune.phys.ufl.edu (8.8.8/8.8.8) with ESMTP id DAA04846 for ; Mon, 16 Aug 1999 03:24:38 -0400 (EDT) Message-Id: <199908160724.DAA04846@neptune.phys.ufl.edu> To: axp-list@redhat.com Subject: tbia() on DEC 3000 question Date: Mon, 16 Aug 1999 03:24:38 -0400 From: Craig P Prescott Plodding forward trying to get linux to netboot on the on the DEC 3000... In paging_init (arch/alpha/mm/init.c), the call to tbia() results in a machine check on the model 500 and model 600 DEC 3000 machines I am using for development. I am not sure why (I am a *complete* newbie to assembly.). Anyhow, changing tbia() in include/asm-alpha/system.h from #define __tbi(nr,arg,arg1...) \ ({ \ register unsigned long __r16 __asm__("$16") = (nr); \ register unsigned long __r17 __asm__("$17"); arg; \ __asm__ __volatile__( \ "call_pal %3 #__tbi" \ :"=r" (__r16),"=r" (__r17) \ :"0" (__r16),"i" (PAL_tbi) ,##arg1 \ :"$0", "$1", "$22", "$23", "$24", "$25"); \ }) .... #define tbia() __tbi(-2, /* no second argument */) to #define tbia() \ ({ \ register unsigned long __r16 __asm__("$16") = -2; \ __asm__ __volatile__( \ "call_pal 0x0033" \ : \ : \ :"$1", "$16", "$17", "$22", "$23", "$24", "$25"); \ }) *seems* to work - I no longer crap out (in tbia()) when netbooting. (PAL_tbi is 0x0033). So, my main two questions are: 1) is what I did actually "correct"? (apart from the unused __r16) 2) why would the original tbia() fail on a DEC 3000 but work on everything else? __tbi is generalized beyond the immediate needs of tbia() and tbiap(); could this be causing some problem? Also, I am sure there is a "better" way to do this (if what I did was even right in the first place). But my knowledge level is a bit too low to make full use of the examples I could find... It sounds simple enough - all I have to do is stick a "-2" into $a0 ($r16) and "call_pal 0x0033"? This is using linux-2.2.9, BTW, and the firmware on the DEC 3000 machines is the latest. Thanks in advance, Craig P.S. This is a bit off-topic, but if someone could spell out in full detail __tbi above, I'd be grateful, as I could learn more from this example. I.e. what do the #__tbi and ##arg1 do? And I learned from a gcc doc what the "=r" and "0" mean, but what about "i"? If anyone knows where an "Alpha Assembly for Dummies" style tutorial is, or any other useful references, I'd appreciate it if they could point me at them. If one wanted to learn a bit of Alpha Assembly - with no prior knowledge of any assembly language - what would one do? I have the Alpha Architecture Reference Manual and other reference materials, but I am looking for more of a tutorial with lots of examples.