SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
?
OSC 2016 Nagoya
*BSD
@nullnilaki
sgi Indigo2
MIPS R8000
>> hinv
System: IP26
Processor: 75 Mhz R8000, with FPU
Primary I-cache size: 16 Kbytes
Primary D-cache size: 16 Kbytes
Secondary cache size: 2 Mbytes
Memory size: 512 Mbytes
Graphics: GR5-XZ
SCSI Disk: scsi(0)disk(1)
Audio: Iris Audio Processor: version A2 revision 1.1.0
MIPS R8000
M88k !
http://forums.nekochan.net/viewtopic.php?t=16726745
MIPS R8000
TLB 384 …
MIPS R8000
/*
* Initialize the kernel page table pointer.
* This is a no-op on non-R8000 processors.
*/
LEAF(tlb_set_gbase, 0)
j ra
nop
END(tlb_set_gbase)
/*
* void tlb_set_gbase(vaddr_t, vsize_t);
*/
LEAF(tlb_set_gbase, 0) /* { */
DMTC0 a0, COP_0_GBASE
MTC0_HAZARD
DMTC0 a1, COP_0_WORK1
MTC0_HAZARD
j ra
NOP
END(tlb_set_gbase) /* } */
…
MIPS R8000
…
MIPS R8000
R8000
SGI
Linux/MIPS
R8000
TLB
MIPS
R10000
Silicon Graphics
http://archive.linux.or.jp/JF/JFdocs/MIPS-HOWTO-9.html#ss9.8
R8000( )…
R8000( )…
R8000( )…
R8000( ) ( ´)
http://d.hatena.ne.jp/syuu1228/20090805
…
RAM disk kernel ?
RAM disk kernel ?
OpenBSD sgimips (Fuel )
?
Set name(s)? (or 'abort' or 'done') [done]
Cannot determine prefetch area. Continue without verification? [no] yes
Installing base57.tgz 100% |**************************| 56003 KB 03:49
Extracting etc.tgz 100% |**************************| 110 KB 00:00
Location of sets? (disk http nfs or 'done') [http] done
Are you *SURE* your install is complete without 'bsd.IP26'? [no] yes
Time appears wrong. Set to 'Sun Sep 6 08:56:36 JST 2015'? [yes]
Saving configuration files...done.
Making all device nodes...sh(8003) in realloc(): error: chunk info corrupted
Abort trap
done.
Installing boot loader in volume header.
Writing file /mnt/usr/mdec/boot-IP26
sgivol: stat /mnt/usr/mdec/boot-IP26: No such file or directory
WARNING: Boot install failed. Booting from disk will not be possible
IP26 RAM disk kernel RAM disk kernel netboot
(ftp.jaist.ac.jp ) base57.tgz
OpenBSD IP26
base57.tgz ” ”
?
/src/distrib/sgi/ramdisk/install.md
md_installboot() {
local _disk=$1
echo "Installing boot loader in volume header."
if ! /usr/mdec/sgivol -w boot /mnt/usr/mdec/boot-$IPARCH $_disk; then
echo "nWARNING: Boot install failed. Booting from disk will not be possible"
fi
for _k in /mnt/bsd{,.mp,.rd}; do
[[ -f $_k.$IPARCH ]] && mv $_k.$IPARCH $_k
done
}
Makefile boot-IP26
RAM disk kernel ftp
NetBSD sysinst(install kernel) ?ftp
OpenBSD ftp
anonymous ftp
# /mnt/usr/mdec/sgivol -w boot /mnt/usr/mdec/boot-IP26 sd0
Writing file /mnt/usr/mdec/boot-IP26
File /mnt/usr/mdec/boot-IP26 has 101640 bytes
disklabel shows 17783112 sectors with 512 bytes per sector
checksum: 00000000
root part: 0
swap part: 1
bootfile: /bsd
Volume header files:
boot offset 2 blocks, length 101640 bytes (199 blocks)
SGI partitions:
0:a blocks 17779977 first 3135 type 4 (BSD4.2)
8:i blocks 3135 first 0 type 0 (Volume Header)
10:k blocks 17783112 first 0 type 6 (Volume)
# mv /mnt/usr/mdec/bsd.IP26 /mnt/bsd
ftp …
!
NFS
•
OS
NFS !
( NIC )
•
NFS
NFS
!
?
?
OS panic R8000
R8000
OpenBSD R8000
utlbmod?
>> bootp()bsd.rd.IP26
Obtaining bsd.rd.IP26 from server macbook2006
3577592+722344 entry: 0xa800000008010000
ARCS64 Firmware
Found SGI-IP26, setting up.
...
panic: trap: utlbmod: invalid pte
Stopped at 0xa800000008294424: jr ra
0xa800000008294428: move zero,zero
utlbmod panic !
TLB ?
TLB ?
• OS panic utlbmod
• OS panic …
PTE ?
• ….
?
• C
…
TLB ?
…
C
/sys/arch/mips64/include/pmap.h
/* User virtual address to pte page entry */
#define uvtopte(va) (((va) >> PAGE_SHIFT) & (NPTEPG -1))
”2”
Multi-user
!
OpenBSD
…
…
sgi CPU !
diff
?
• MIPS R8000 CPU …
• MIPS R8000 …
/src/sys/arch/mips64/mips64/cache_tfp.c
/src/sys/arch/mips64/mips64/cache_tfp_subr.S
/src/sys/arch/mips64/mips64/exception_tfp.S
/src/sys/arch/mips64/mips64/tlb_tfp.S
• miod
…
SIGBUS SIGSEGV
…
The 2 in the original code is log2(pte size); k0 >> PAGE_SHIFT will be
the pte number. But in the page table, it is stored as an array of
32-bit words, so we need to shift it to the left by 2. The original
instructions:
PTR_SRL k0, PAGE_SHIFT - 2
andi k0, ((NPTEPG / 2) - 1) << 2
are equivalent to:
PTR_SRL k0, PAGE_SHIFT
andi k0, (NPTEPG / 2) - 1
PTR_SLL k0, 2
and guarantees the address is correctly aligned for the `lwu'
instruction later.
2 !
0 0
1 4
2 8
3 12
…
Page table
index Page tabe
Page fault
Page table index
PTE_LOG
index
PTR_SRL k0, PAGE_SHIFT - PTE_LOG
andi k0, (NPTEPG - 1) << PTE_LOG
Page table
PTR_ADDU k1, k0
PTE_LOAD k0, 0(k1) # get pte
#define PTE_LOG 2
@n_soda
!
mips RISC -R2000/ R3000-
ISBN-10: 4320025989
NIX
ISBN-10: 4320025989
MIPS( )
R8000 User Manual
….
http://nullnilaki.hatenablog.com/entries/2015/12/23
Miod @MiodVallat
twitter
BSD

Más contenido relacionado

La actualidad más candente

移植FreeRTOS 之嵌入式軟體研究與開發
移植FreeRTOS 之嵌入式軟體研究與開發移植FreeRTOS 之嵌入式軟體研究與開發
移植FreeRTOS 之嵌入式軟體研究與開發艾鍗科技
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMULinaro
 
How To Train Your ARM(SBC)
How To  Train Your ARM(SBC)How To  Train Your ARM(SBC)
How To Train Your ARM(SBC)Naoto MATSUMOTO
 
Translation Cache Policies for Dynamic Binary Translation
Translation Cache Policies for Dynamic Binary TranslationTranslation Cache Policies for Dynamic Binary Translation
Translation Cache Policies for Dynamic Binary TranslationSaber Ferjani
 
Stm32 develop tool introduction
Stm32 develop tool introductionStm32 develop tool introduction
Stm32 develop tool introduction冠宇 陳
 
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法MITSUNARI Shigeo
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionJian-Hong Pan
 
Hackersuli - Linux game hacking with LD_PRELOAD
Hackersuli - Linux game hacking with LD_PRELOADHackersuli - Linux game hacking with LD_PRELOAD
Hackersuli - Linux game hacking with LD_PRELOADhackersuli
 
Cacti安装手册
Cacti安装手册Cacti安装手册
Cacti安装手册Yiwei Ma
 
Ceph OSD Op trace
Ceph OSD Op traceCeph OSD Op trace
Ceph OSD Op trace畅 刘
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureCyber Security Alliance
 
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?Yandex
 
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Sam Kim
 

La actualidad más candente (17)

移植FreeRTOS 之嵌入式軟體研究與開發
移植FreeRTOS 之嵌入式軟體研究與開發移植FreeRTOS 之嵌入式軟體研究與開發
移植FreeRTOS 之嵌入式軟體研究與開發
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
 
Ganeti - build your own cloud
Ganeti - build your own cloudGaneti - build your own cloud
Ganeti - build your own cloud
 
How To Train Your ARM(SBC)
How To  Train Your ARM(SBC)How To  Train Your ARM(SBC)
How To Train Your ARM(SBC)
 
Translation Cache Policies for Dynamic Binary Translation
Translation Cache Policies for Dynamic Binary TranslationTranslation Cache Policies for Dynamic Binary Translation
Translation Cache Policies for Dynamic Binary Translation
 
愛のSuperCollider
愛のSuperCollider愛のSuperCollider
愛のSuperCollider
 
Stm32 develop tool introduction
Stm32 develop tool introductionStm32 develop tool introduction
Stm32 develop tool introduction
 
My First BCC
My First BCCMy First BCC
My First BCC
 
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
 
Log
LogLog
Log
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
 
Hackersuli - Linux game hacking with LD_PRELOAD
Hackersuli - Linux game hacking with LD_PRELOADHackersuli - Linux game hacking with LD_PRELOAD
Hackersuli - Linux game hacking with LD_PRELOAD
 
Cacti安装手册
Cacti安装手册Cacti安装手册
Cacti安装手册
 
Ceph OSD Op trace
Ceph OSD Op traceCeph OSD Op trace
Ceph OSD Op trace
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented feature
 
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
 
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1
 

Similar a 最後の楽園の開発をちょこっとだけ手伝った話

Hardware Discovery Commands
Hardware Discovery CommandsHardware Discovery Commands
Hardware Discovery CommandsKevin OBrien
 
SUN主机产品介绍.ppt
SUN主机产品介绍.pptSUN主机产品介绍.ppt
SUN主机产品介绍.pptPencilData
 
Product Roadmap iEi 2017
Product Roadmap iEi 2017Product Roadmap iEi 2017
Product Roadmap iEi 2017Andrei Teleanu
 
Experiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerExperiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerJomaSoft
 
Some analysis of BlueStore and RocksDB
Some analysis of BlueStore and RocksDBSome analysis of BlueStore and RocksDB
Some analysis of BlueStore and RocksDBXiao Yan Li
 
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014EneaSoftware
 
MYS-6ULX Single Board Computer for Industry 4.0 and IoT Applications
MYS-6ULX Single Board Computer for Industry 4.0 and IoT ApplicationsMYS-6ULX Single Board Computer for Industry 4.0 and IoT Applications
MYS-6ULX Single Board Computer for Industry 4.0 and IoT ApplicationsLinda Zhang
 
The n00bs guide to ovs dpdk
The n00bs guide to ovs dpdkThe n00bs guide to ovs dpdk
The n00bs guide to ovs dpdkmarkdgray
 
[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practicalMoabi.com
 
MYC-J1028X CPU Module Overview
MYC-J1028X CPU Module OverviewMYC-J1028X CPU Module Overview
MYC-J1028X CPU Module OverviewLinda Zhang
 

Similar a 最後の楽園の開発をちょこっとだけ手伝った話 (20)

Hardware Discovery Commands
Hardware Discovery CommandsHardware Discovery Commands
Hardware Discovery Commands
 
Log
LogLog
Log
 
SUN主机产品介绍.ppt
SUN主机产品介绍.pptSUN主机产品介绍.ppt
SUN主机产品介绍.ppt
 
Unix 6 en
Unix 6 enUnix 6 en
Unix 6 en
 
Project1
Project1Project1
Project1
 
Product Roadmap iEi 2017
Product Roadmap iEi 2017Product Roadmap iEi 2017
Product Roadmap iEi 2017
 
Log
LogLog
Log
 
Log
LogLog
Log
 
Log
LogLog
Log
 
Experiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerExperiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 Server
 
Ghosterr
GhosterrGhosterr
Ghosterr
 
Barios crosober
Barios crosoberBarios crosober
Barios crosober
 
Some analysis of BlueStore and RocksDB
Some analysis of BlueStore and RocksDBSome analysis of BlueStore and RocksDB
Some analysis of BlueStore and RocksDB
 
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
 
MYS-6ULX Single Board Computer for Industry 4.0 and IoT Applications
MYS-6ULX Single Board Computer for Industry 4.0 and IoT ApplicationsMYS-6ULX Single Board Computer for Industry 4.0 and IoT Applications
MYS-6ULX Single Board Computer for Industry 4.0 and IoT Applications
 
The n00bs guide to ovs dpdk
The n00bs guide to ovs dpdkThe n00bs guide to ovs dpdk
The n00bs guide to ovs dpdk
 
linux-memory-explained.pdf
linux-memory-explained.pdflinux-memory-explained.pdf
linux-memory-explained.pdf
 
[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical
 
Log
LogLog
Log
 
MYC-J1028X CPU Module Overview
MYC-J1028X CPU Module OverviewMYC-J1028X CPU Module Overview
MYC-J1028X CPU Module Overview
 

Más de nullnilaki

あるブートローダの話
あるブートローダの話あるブートローダの話
あるブートローダの話nullnilaki
 
あるキャッシュメモリの話
あるキャッシュメモリの話あるキャッシュメモリの話
あるキャッシュメモリの話nullnilaki
 
オープンソース開発と、 あるフレームバッファコンソールの話 ~名古屋応用編~
オープンソース開発と、あるフレームバッファコンソールの話~名古屋応用編~オープンソース開発と、あるフレームバッファコンソールの話~名古屋応用編~
オープンソース開発と、 あるフレームバッファコンソールの話 ~名古屋応用編~nullnilaki
 
あるクリスマスの話
あるクリスマスの話あるクリスマスの話
あるクリスマスの話nullnilaki
 
あるコンテキストスイッチの話
あるコンテキストスイッチの話あるコンテキストスイッチの話
あるコンテキストスイッチの話nullnilaki
 
あるmmapの話
あるmmapの話あるmmapの話
あるmmapの話nullnilaki
 
DEC_6600,DEC_TITAN Implementation of NetBSD(仮)
 DEC_6600,DEC_TITAN Implementation of NetBSD(仮) DEC_6600,DEC_TITAN Implementation of NetBSD(仮)
DEC_6600,DEC_TITAN Implementation of NetBSD(仮)nullnilaki
 

Más de nullnilaki (7)

あるブートローダの話
あるブートローダの話あるブートローダの話
あるブートローダの話
 
あるキャッシュメモリの話
あるキャッシュメモリの話あるキャッシュメモリの話
あるキャッシュメモリの話
 
オープンソース開発と、 あるフレームバッファコンソールの話 ~名古屋応用編~
オープンソース開発と、あるフレームバッファコンソールの話~名古屋応用編~オープンソース開発と、あるフレームバッファコンソールの話~名古屋応用編~
オープンソース開発と、 あるフレームバッファコンソールの話 ~名古屋応用編~
 
あるクリスマスの話
あるクリスマスの話あるクリスマスの話
あるクリスマスの話
 
あるコンテキストスイッチの話
あるコンテキストスイッチの話あるコンテキストスイッチの話
あるコンテキストスイッチの話
 
あるmmapの話
あるmmapの話あるmmapの話
あるmmapの話
 
DEC_6600,DEC_TITAN Implementation of NetBSD(仮)
 DEC_6600,DEC_TITAN Implementation of NetBSD(仮) DEC_6600,DEC_TITAN Implementation of NetBSD(仮)
DEC_6600,DEC_TITAN Implementation of NetBSD(仮)
 

Último

Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 

Último (20)

Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

最後の楽園の開発をちょこっとだけ手伝った話

  • 3. MIPS R8000 >> hinv System: IP26 Processor: 75 Mhz R8000, with FPU Primary I-cache size: 16 Kbytes Primary D-cache size: 16 Kbytes Secondary cache size: 2 Mbytes Memory size: 512 Mbytes Graphics: GR5-XZ SCSI Disk: scsi(0)disk(1) Audio: Iris Audio Processor: version A2 revision 1.1.0
  • 6. MIPS R8000 /* * Initialize the kernel page table pointer. * This is a no-op on non-R8000 processors. */ LEAF(tlb_set_gbase, 0) j ra nop END(tlb_set_gbase) /* * void tlb_set_gbase(vaddr_t, vsize_t); */ LEAF(tlb_set_gbase, 0) /* { */ DMTC0 a0, COP_0_GBASE MTC0_HAZARD DMTC0 a1, COP_0_WORK1 MTC0_HAZARD j ra NOP END(tlb_set_gbase) /* } */ …
  • 12. R8000( ) ( ´)
  • 14. RAM disk kernel ? RAM disk kernel ? OpenBSD sgimips (Fuel )
  • 15. ? Set name(s)? (or 'abort' or 'done') [done] Cannot determine prefetch area. Continue without verification? [no] yes Installing base57.tgz 100% |**************************| 56003 KB 03:49 Extracting etc.tgz 100% |**************************| 110 KB 00:00 Location of sets? (disk http nfs or 'done') [http] done Are you *SURE* your install is complete without 'bsd.IP26'? [no] yes Time appears wrong. Set to 'Sun Sep 6 08:56:36 JST 2015'? [yes] Saving configuration files...done. Making all device nodes...sh(8003) in realloc(): error: chunk info corrupted Abort trap done. Installing boot loader in volume header. Writing file /mnt/usr/mdec/boot-IP26 sgivol: stat /mnt/usr/mdec/boot-IP26: No such file or directory WARNING: Boot install failed. Booting from disk will not be possible IP26 RAM disk kernel RAM disk kernel netboot (ftp.jaist.ac.jp ) base57.tgz OpenBSD IP26 base57.tgz ” ”
  • 16. ? /src/distrib/sgi/ramdisk/install.md md_installboot() { local _disk=$1 echo "Installing boot loader in volume header." if ! /usr/mdec/sgivol -w boot /mnt/usr/mdec/boot-$IPARCH $_disk; then echo "nWARNING: Boot install failed. Booting from disk will not be possible" fi for _k in /mnt/bsd{,.mp,.rd}; do [[ -f $_k.$IPARCH ]] && mv $_k.$IPARCH $_k done }
  • 18. RAM disk kernel ftp NetBSD sysinst(install kernel) ?ftp OpenBSD ftp anonymous ftp
  • 19. # /mnt/usr/mdec/sgivol -w boot /mnt/usr/mdec/boot-IP26 sd0 Writing file /mnt/usr/mdec/boot-IP26 File /mnt/usr/mdec/boot-IP26 has 101640 bytes disklabel shows 17783112 sectors with 512 bytes per sector checksum: 00000000 root part: 0 swap part: 1 bootfile: /bsd Volume header files: boot offset 2 blocks, length 101640 bytes (199 blocks) SGI partitions: 0:a blocks 17779977 first 3135 type 4 (BSD4.2) 8:i blocks 3135 first 0 type 0 (Volume Header) 10:k blocks 17783112 first 0 type 6 (Volume) # mv /mnt/usr/mdec/bsd.IP26 /mnt/bsd ftp … !
  • 20. NFS • OS NFS ! ( NIC ) • NFS NFS !
  • 21. ?
  • 23. utlbmod? >> bootp()bsd.rd.IP26 Obtaining bsd.rd.IP26 from server macbook2006 3577592+722344 entry: 0xa800000008010000 ARCS64 Firmware Found SGI-IP26, setting up. ... panic: trap: utlbmod: invalid pte Stopped at 0xa800000008294424: jr ra 0xa800000008294428: move zero,zero utlbmod panic !
  • 24. TLB ?
  • 25. TLB ? • OS panic utlbmod • OS panic … PTE ? • …. ? • C …
  • 27. C /sys/arch/mips64/include/pmap.h /* User virtual address to pte page entry */ #define uvtopte(va) (((va) >> PAGE_SHIFT) & (NPTEPG -1)) ”2”
  • 29.
  • 31.
  • 33. diff
  • 34. ? • MIPS R8000 CPU … • MIPS R8000 … /src/sys/arch/mips64/mips64/cache_tfp.c /src/sys/arch/mips64/mips64/cache_tfp_subr.S /src/sys/arch/mips64/mips64/exception_tfp.S /src/sys/arch/mips64/mips64/tlb_tfp.S • miod
  • 36. … The 2 in the original code is log2(pte size); k0 >> PAGE_SHIFT will be the pte number. But in the page table, it is stored as an array of 32-bit words, so we need to shift it to the left by 2. The original instructions: PTR_SRL k0, PAGE_SHIFT - 2 andi k0, ((NPTEPG / 2) - 1) << 2 are equivalent to: PTR_SRL k0, PAGE_SHIFT andi k0, (NPTEPG / 2) - 1 PTR_SLL k0, 2 and guarantees the address is correctly aligned for the `lwu' instruction later.
  • 37. 2 ! 0 0 1 4 2 8 3 12 … Page table index Page tabe Page fault Page table index PTE_LOG index PTR_SRL k0, PAGE_SHIFT - PTE_LOG andi k0, (NPTEPG - 1) << PTE_LOG Page table PTR_ADDU k1, k0 PTE_LOAD k0, 0(k1) # get pte #define PTE_LOG 2 @n_soda !
  • 38. mips RISC -R2000/ R3000- ISBN-10: 4320025989 NIX ISBN-10: 4320025989 MIPS( ) R8000 User Manual …. http://nullnilaki.hatenablog.com/entries/2015/12/23 Miod @MiodVallat twitter BSD