Stale changes

This commit is contained in:
Thomas Oltmann 2025-12-20 17:07:09 +01:00
parent 4e6c29c621
commit 4f01251a6b
8 changed files with 371 additions and 2 deletions

64
.exrc Normal file
View file

@ -0,0 +1,64 @@
let s:cpo_save=&cpo
set cpo&vim
inoremap <C-W> u
inoremap <C-U> u
nnoremap <NL> :bn
nnoremap  :bp
nnoremap  <Cmd>nohlsearch|diffupdate|normal!  
nmap  d
nnoremap  t :TagbarToggle
nnoremap <silent>  v :NERDTreeFind
nnoremap  f :NERDTreeToggle
omap <silent> % <Plug>(MatchitOperationForward)
xmap <silent> % <Plug>(MatchitVisualForward)
nmap <silent> % <Plug>(MatchitNormalForward)
nnoremap & :&&
xnoremap <silent> <expr> @ mode() ==# 'V' ? ':normal! @'.getcharstr().' ' : '@'
xnoremap <silent> <expr> Q mode() ==# 'V' ? ':normal! @=reg_recorded()  ' : 'Q'
nnoremap Y y$
omap <silent> [% <Plug>(MatchitOperationMultiBackward)
xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
omap <silent> ]% <Plug>(MatchitOperationMultiForward)
xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
xmap a% <Plug>(MatchitVisualTextObject)
omap <silent> g% <Plug>(MatchitOperationBackward)
xmap <silent> g% <Plug>(MatchitVisualBackward)
nmap <silent> g% <Plug>(MatchitNormalBackward)
xmap <silent> <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
onoremap <silent> <Plug>(MatchitOperationMultiForward) :call matchit#MultiMatch("W", "o")
onoremap <silent> <Plug>(MatchitOperationMultiBackward) :call matchit#MultiMatch("bW", "o")
xnoremap <silent> <Plug>(MatchitVisualMultiForward) :call matchit#MultiMatch("W", "n") m'gv``
xnoremap <silent> <Plug>(MatchitVisualMultiBackward) :call matchit#MultiMatch("bW", "n") m'gv``
nnoremap <silent> <Plug>(MatchitNormalMultiForward) :call matchit#MultiMatch("W", "n")
nnoremap <silent> <Plug>(MatchitNormalMultiBackward) :call matchit#MultiMatch("bW", "n")
onoremap <silent> <Plug>(MatchitOperationBackward) :call matchit#Match_wrapper('',0,'o')
onoremap <silent> <Plug>(MatchitOperationForward) :call matchit#Match_wrapper('',1,'o')
xnoremap <silent> <Plug>(MatchitVisualBackward) :call matchit#Match_wrapper('',0,'v') m'gv``
xnoremap <silent> <Plug>(MatchitVisualForward) :call matchit#Match_wrapper('',1,'v') :if col("''") != col("$") | exe ":normal! m'" | endif gv``
nnoremap <silent> <Plug>(MatchitNormalBackward) :call matchit#Match_wrapper('',0,'n')
nnoremap <silent> <Plug>(MatchitNormalForward) :call matchit#Match_wrapper('',1,'n')
nnoremap <C-Down> :bn
nnoremap <C-Up> :bp
nnoremap <C-J> :bn
nnoremap <C-K> :bp
nmap <C-W><C-D> d
nnoremap <C-L> <Cmd>nohlsearch|diffupdate|normal!  
inoremap  u
inoremap  u
let &cpo=s:cpo_save
unlet s:cpo_save
set clipboard=unnamedplus
set expandtab
set grepformat=%f:%l:%c:%m
set grepprg=rg\ --vimgrep\ -uu\
set guifont=SourceCodePro
set helplang=de
set path=.,,,**
set runtimepath=~/.config/nvim,~/.local/share/nvim/plugged/vim-glsl,~/.local/share/nvim/plugged/nerdtree,~/.local/share/nvim/plugged/tagbar,/etc/xdg/nvim,~/.local/share/nvim/site,/usr/local/share/nvim/site,/usr/share/nvim/site,/usr/share/nvim/runtime,/usr/share/nvim/runtime/pack/dist/opt/netrw,/usr/share/nvim/runtime/pack/dist/opt/matchit,/usr/lib64/nvim,/usr/share/nvim/site/after,/usr/local/share/nvim/site/after,~/.local/share/nvim/site/after,/etc/xdg/nvim/after,~/.local/share/nvim/plugged/vim-glsl/after,~/.config/nvim/after
set shiftwidth=4
set tabstop=4
set termguicolors
set window=42
" vim: set ft=vim :

6
bochs.slirp Normal file
View file

@ -0,0 +1,6 @@
restricted
net 10.0.0.0
mask 255.255.255.0
host 10.0.0.1
dhcpstart 10.0.0.2
bootfile boot.bin

62
bochsrc.txt Normal file
View file

@ -0,0 +1,62 @@
# configuration file generated by Bochs
plugin_ctrl: unmapped=true, biosdev=true, speaker=true, extfpuirq=true, parallel=true, serial=true, e1000=true, iodebug=true, usb_uhci=false, usb_ohci=false, usb_ehci=false, usb_xhci=false
config_interface: textconfig
display_library: sdl2
memory: host=32, guest=32
romimage: file="/usr/share/bochs/BIOS-bochs-latest", address=0x00000000, options=none
vgaromimage: file="/usr/share/bochs/VGABIOS-lgpl-latest"
boot: floppy
floppy_bootsig_check: disabled=0
floppya: type=1_44
# no floppyb
ata0: enabled=true, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=cdrom, path="/home/thomas/src/ipxe/src/bin/ipxe.iso", status=inserted
ata0-slave: type=none
ata1: enabled=false
ata2: enabled=false
ata3: enabled=false
optromimage1: file=none
optromimage2: file=none
optromimage3: file=none
optromimage4: file=none
optramimage1: file=none
optramimage2: file=none
optramimage3: file=none
optramimage4: file=none
pci: enabled=1, chipset=i440fx, slot1=none, slot2=none, slot3=none, slot4=none, slot5=none
vga: extension=vbe, update_freq=5, realtime=1, ddc=builtin
cpu: count=1:1:1, ips=4000000, quantum=16, model=bx_generic, reset_on_triple_fault=1, cpuid_limit_winnt=0, ignore_bad_msrs=1, mwait_is_nop=0
cpuid: level=6, stepping=3, model=3, family=6, vendor_string="GenuineIntel", brand_string=" Intel(R) Pentium(R) 4 CPU "
cpuid: mmx=true, apic=xapic, simd=sse2, sse4a=false, misaligned_sse=false, sep=true
cpuid: movbe=false, adx=false, aes=false, sha=false, xsave=false, xsaveopt=false, avx_f16c=false
cpuid: avx_fma=false, bmi=0, xop=false, fma4=false, tbm=false, x86_64=true, 1g_pages=false
cpuid: pcid=false, fsgsbase=false, smep=false, smap=false, mwait=true
print_timestamps: enabled=0
debugger_log: -
magic_break: enabled=0
port_e9_hack: enabled=0
private_colormap: enabled=0
clock: sync=none, time0=local, rtc_sync=0
# no cmosimage
log: -
logprefix: %t%e%d
debug: action=ignore
info: action=report
error: action=report
panic: action=ask
keyboard: type=mf, serial_delay=250, paste_delay=100000, user_shortcut=none
mouse: type=ps2, enabled=false, toggle=ctrl+mbutton
speaker: enabled=true, mode=system
parport1: enabled=true, file=none
parport2: enabled=false
com1: enabled=true, mode=null
com2: enabled=false
com3: enabled=false
com4: enabled=false
#e1000: card=0, enabled=true, mac=bb:bd:bb:bb:aa:aa, ethmod=linux, ethdev="enp0s25", script=none, bootrom=none
#e1000: card=0, enabled=true, mac=bb:bd:bb:bb:aa:aa, ethmod=linux, ethdev="lo", script=none, bootrom=none
#e1000: card=0, enabled=true, mac=bb:bd:bb:bb:aa:aa, ethmod=linux, ethdev="emubr0", script=none, bootrom=none
e1000: card=0, enabled=true, mac=bb:bd:bb:bb:aa:aa, ethmod=slirp, ethdev=".", script="bochs.slirp", bootrom=none
e1000: card=1, enabled=false
e1000: card=2, enabled=false
e1000: card=3, enabled=false

12
boot.ipxe Normal file
View file

@ -0,0 +1,12 @@
#!ipxe
ifopen net0
set net0/ip 10.0.0.2
set net0/netmask 255.255.255.0
set net0/dns 10.0.0.1
set net0/gateway ${net0/dns}
set net0/next-server ${net0/dns}
set net0/filename boot.bin
chain ${net0/filename}

BIN
eth_null-tx.log Normal file

Binary file not shown.

71
eth_null-txdump.txt Normal file
View file

@ -0,0 +1,71 @@
null packetmover readable log file
net IF = xl0
MAC address = fe:fd:de:ad:be:ef
--
a packet from guest to host, length 42
ff ff ff ff ff ff fe fd de ad be ef 08 06 00 01 ................
08 00 06 04 00 01 fe fd de ad be ef 0a 00 00 02 ................
00 00 00 00 00 00 0a 00 00 02 ..........
--
a packet from guest to host, length 42
ff ff ff ff ff ff fe fd de ad be ef 08 06 00 01 ................
08 00 06 04 00 01 fe fd de ad be ef 0a 00 00 02 ................
00 00 00 00 00 00 0a 00 00 01 ..........
--
a packet from guest to host, length 18
01 80 c2 00 00 03 fe fd de ad be ef 88 8e 01 01 ................
00 00 ..
--
a packet from guest to host, length 42
ff ff ff ff ff ff fe fd de ad be ef 08 06 00 01 ................
08 00 06 04 00 01 fe fd de ad be ef 0a 00 00 02 ................
00 00 00 00 00 00 0a 00 00 01 ..........
--
a packet from guest to host, length 42
ff ff ff ff ff ff fe fd de ad be ef 08 06 00 01 ................
08 00 06 04 00 01 fe fd de ad be ef 0a 00 00 02 ................
00 00 00 00 00 00 0a 00 00 01 ..........
--
a packet from guest to host, length 42
ff ff ff ff ff ff fe fd de ad be ef 08 06 00 01 ................
08 00 06 04 00 01 fe fd de ad be ef 0a 00 00 02 ................
00 00 00 00 00 00 0a 00 00 01 ..........
--
a packet from guest to host, length 42
ff ff ff ff ff ff fe fd de ad be ef 08 06 00 01 ................
08 00 06 04 00 01 fe fd de ad be ef 0a 00 00 02 ................
00 00 00 00 00 00 0a 00 00 01 ..........
--
a packet from guest to host, length 18
01 80 c2 00 00 03 fe fd de ad be ef 88 8e 01 01 ................
00 00 ..
--
a packet from guest to host, length 18
01 80 c2 00 00 03 fe fd de ad be ef 88 8e 01 01 ................
00 00 ..
--
a packet from guest to host, length 42
ff ff ff ff ff ff fe fd de ad be ef 08 06 00 01 ................
08 00 06 04 00 01 fe fd de ad be ef 0a 00 00 02 ................
00 00 00 00 00 00 0a 00 00 01 ..........
--
a packet from guest to host, length 42
ff ff ff ff ff ff fe fd de ad be ef 08 06 00 01 ................
08 00 06 04 00 01 fe fd de ad be ef 0a 00 00 02 ................
00 00 00 00 00 00 0a 00 00 01 ..........
--
a packet from guest to host, length 42
ff ff ff ff ff ff fe fd de ad be ef 08 06 00 01 ................
08 00 06 04 00 01 fe fd de ad be ef 0a 00 00 02 ................
00 00 00 00 00 00 0a 00 00 01 ..........
--
a packet from guest to host, length 42
ff ff ff ff ff ff fe fd de ad be ef 08 06 00 01 ................
08 00 06 04 00 01 fe fd de ad be ef 0a 00 00 02 ................
00 00 00 00 00 00 0a 00 00 01 ..........
--
a packet from guest to host, length 42
ff ff ff ff ff ff fe fd de ad be ef 08 06 00 01 ................
08 00 06 04 00 01 fe fd de ad be ef 0a 00 00 02 ................
00 00 00 00 00 00 0a 00 00 01 ..........
--

46
lboot.S
View file

@ -96,6 +96,8 @@ _start: cli
call print
call vbe_setup
call test_point
mov $msg_long, %si
call print
//jmp hang // REMOVE ME
@ -110,6 +112,23 @@ _start: cli
outb %al, %dx
.endm
test_point:
push %eax
push %ecx
push %bp
mov %sp, %bp
mov 10(%bp), %ax
mov %ax, %cx
rol $7, %cx
xor %cx, %ax
mov $8000, %cx
mov bb_fb_ptr, %edi
addr32 rep stosw
leave
pop %ecx
pop %eax
ret
// init_com1: Set up COM1 port for debug output
init_com1: COM1_WRITE 1, 0x00 // clear interrupts
COM1_WRITE 3, 0x80 // set DLAB to 1
@ -666,6 +685,22 @@ _vbeerr: mov $msg_vbeerr, %si
// long: Enter long mode
long:
mov %cr0, %eax
or $0x01, %al
mov %eax, %cr0
ljmp $0x18, $1f // enter 32-bit protected mode
.code32
1:
mov $0x20, %ax
mov %ax, %ss
mov %ax, %ds
mov %ax, %es
hlt
jmp 1b
call test_point
// Enable PAE
mov %cr4, %eax
or $0b100000, %eax
@ -675,6 +710,8 @@ long:
mov pml4_ptr, %eax
mov %eax, %cr3
call test_point
// Enable long mode
.set IA32_EFER, 0xC0000080
mov $IA32_EFER, %ecx
@ -706,10 +743,15 @@ hang: hlt
// gdt16: Protected mode / Unreal mode 16-bit GDT
gdt16: // entry 0: null descriptor
.space 8, 0
// entry 1: code segment
// entry 1: 16-bit code segment
.byte 0xFF, 0xFF, 0, 0, 0, 0b10011010, 0x8F, 0
// entry 2: data segment
// entry 2: 16-bit data segment
.byte 0xFF, 0xFF, 0, 0, 0, 0b10010010, 0x8F, 0
// entry 3: 32-bit code segment
.byte 0xFF, 0xFF, 0, 0, 0, 0b10011010, 0xCF, 0
// entry 4: 32-bit data segment
.byte 0xFF, 0xFF, 0, 0, 0, 0b10010010, 0xCF, 0
// entry 5: 32-bit TSS
.set gdt16_size, .-gdt16
gdt16_ptr: .word gdt16_size-1
.long gdt16

112
target.xml Normal file
View file

@ -0,0 +1,112 @@
<?xml version="1.0"?>
<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
<target>
<architecture>i8086</architecture>
<feature name="org.gnu.gdb.i386.core">
<flags id="i386_eflags" size="4">
<field name="CF" start="0" end="0"/>
<field name="" start="1" end="1"/>
<field name="PF" start="2" end="2"/>
<field name="AF" start="4" end="4"/>
<field name="ZF" start="6" end="6"/>
<field name="SF" start="7" end="7"/>
<field name="TF" start="8" end="8"/>
<field name="IF" start="9" end="9"/>
<field name="DF" start="10" end="10"/>
<field name="OF" start="11" end="11"/>
<field name="NT" start="14" end="14"/>
<field name="RF" start="16" end="16"/>
<field name="VM" start="17" end="17"/>
<field name="AC" start="18" end="18"/>
<field name="VIF" start="19" end="19"/>
<field name="VIP" start="20" end="20"/>
<field name="ID" start="21" end="21"/>
</flags>
<reg name="eax" bitsize="32" type="int32"/>
<reg name="ecx" bitsize="32" type="int32"/>
<reg name="edx" bitsize="32" type="int32"/>
<reg name="ebx" bitsize="32" type="int32"/>
<reg name="esp" bitsize="32" type="data_ptr"/>
<reg name="ebp" bitsize="32" type="data_ptr"/>
<reg name="esi" bitsize="32" type="int32"/>
<reg name="edi" bitsize="32" type="int32"/>
<reg name="eip" bitsize="32" type="code_ptr"/>
<reg name="eflags" bitsize="32" type="i386_eflags"/>
<reg name="cs" bitsize="32" type="int32"/>
<reg name="ss" bitsize="32" type="int32"/>
<reg name="ds" bitsize="32" type="int32"/>
<reg name="es" bitsize="32" type="int32"/>
<reg name="fs" bitsize="32" type="int32"/>
<reg name="gs" bitsize="32" type="int32"/>
<reg name="st0" bitsize="80" type="i387_ext"/>
<reg name="st1" bitsize="80" type="i387_ext"/>
<reg name="st2" bitsize="80" type="i387_ext"/>
<reg name="st3" bitsize="80" type="i387_ext"/>
<reg name="st4" bitsize="80" type="i387_ext"/>
<reg name="st5" bitsize="80" type="i387_ext"/>
<reg name="st6" bitsize="80" type="i387_ext"/>
<reg name="st7" bitsize="80" type="i387_ext"/>
<reg name="fctrl" bitsize="32" type="int" group="float"/>
<reg name="fstat" bitsize="32" type="int" group="float"/>
<reg name="ftag" bitsize="32" type="int" group="float"/>
<reg name="fiseg" bitsize="32" type="int" group="float"/>
<reg name="fioff" bitsize="32" type="int" group="float"/>
<reg name="foseg" bitsize="32" type="int" group="float"/>
<reg name="fooff" bitsize="32" type="int" group="float"/>
<reg name="fop" bitsize="32" type="int" group="float"/>
</feature>
<feature name="org.gnu.gdb.i386.32bit.sse">
<vector id="v4f" type="ieee_single" count="4"/>
<vector id="v2d" type="ieee_double" count="2"/>
<vector id="v16i8" type="int8" count="16"/>
<vector id="v8i16" type="int16" count="8"/>
<vector id="v4i32" type="int32" count="4"/>
<vector id="v2i64" type="int64" count="2"/>
<union id="vec128">
<field name="v4_float" type="v4f"/>
<field name="v2_double" type="v2d"/>
<field name="v16_int8" type="v16i8"/>
<field name="v8_int16" type="v8i16"/>
<field name="v4_int32" type="v4i32"/>
<field name="v2_int64" type="v2i64"/>
<field name="uint128" type="uint128"/>
</union>
<flags id="i386_mxcsr" size="4">
<field name="IE" start="0" end="0"/>
<field name="DE" start="1" end="1"/>
<field name="ZE" start="2" end="2"/>
<field name="OE" start="3" end="3"/>
<field name="UE" start="4" end="4"/>
<field name="PE" start="5" end="5"/>
<field name="DAZ" start="6" end="6"/>
<field name="IM" start="7" end="7"/>
<field name="DM" start="8" end="8"/>
<field name="ZM" start="9" end="9"/>
<field name="OM" start="10" end="10"/>
<field name="UM" start="11" end="11"/>
<field name="PM" start="12" end="12"/>
<field name="FZ" start="15" end="15"/>
</flags>
<reg name="xmm0" bitsize="128" type="vec128" regnum="32"/>
<reg name="xmm1" bitsize="128" type="vec128"/>
<reg name="xmm2" bitsize="128" type="vec128"/>
<reg name="xmm3" bitsize="128" type="vec128"/>
<reg name="xmm4" bitsize="128" type="vec128"/>
<reg name="xmm5" bitsize="128" type="vec128"/>
<reg name="xmm6" bitsize="128" type="vec128"/>
<reg name="xmm7" bitsize="128" type="vec128"/>
<reg name="mxcsr" bitsize="32" type="i386_mxcsr" group="vector"/>
</feature>
</target>