No enough memory address space for pcie@f4000000

Hi,
I insert a mini-pcie card into mini-pcie slot on hikey970.
This card requires 19M memory address space.
The original kirin970.dtsi reserves 0x02000000 address space for pcie@f4000000.

1035 pcie@f4000000 {
1036 compatible = “hisilicon,hikey970”;

1047 ranges = <0x02000000 0x0 0x00000000
1048 0x0 0xf6000000
1049 0x0 0x02000000>;

This is not enough because there is other devices on pcie bus.
Using this dts, some mem resources failed to be assigned:

[ 0.831530] pci 0000:00:00.0: BAR 0: assigned [mem 0xf6000000-0xf6ffffff]
[ 0.831535] pci 0000:00:00.0: BAR 14: no space for [mem size 0x01e00000]
[ 0.831538] pci 0000:00:00.0: BAR 14: failed to assign [mem size 0x01e00000]
[ 0.831540] pci 0000:00:00.0: BAR 15: assigned [mem 0xf7000000-0xf70fffff pref]
[ 0.831542] pci 0000:00:00.0: BAR 13: no space for [io size 0x1000]
[ 0.831543] pci 0000:00:00.0: BAR 13: failed to assign [io size 0x1000]
[ 0.831546] pci 0000:01:00.0: BAR 14: no space for [mem size 0x01c00000]
[ 0.831547] pci 0000:01:00.0: BAR 14: failed to assign [mem size 0x01c00000]
[ 0.831549] pci 0000:01:00.0: BAR 15: assigned [mem 0xf7000000-0xf70fffff 64bit pref]
[ 0.831551] pci 0000:01:00.0: BAR 0: no space for [mem size 0x00020000]
[ 0.831552] pci 0000:01:00.0: BAR 0: failed to assign [mem size 0x00020000]
[ 0.831554] pci 0000:01:00.0: BAR 13: no space for [io size 0x1000]
[ 0.831555] pci 0000:01:00.0: BAR 13: failed to assign [io size 0x1000]
[ 0.831557] pci 0000:02:05.0: BAR 14: no space for [mem size 0x01800000]
[ 0.831559] pci 0000:02:05.0: BAR 14: failed to assign [mem size 0x01800000]
[ 0.831560] pci 0000:02:07.0: BAR 14: no space for [mem size 0x00100000]
[ 0.831561] pci 0000:02:07.0: BAR 14: failed to assign [mem size 0x00100000]
[ 0.831564] pci 0000:02:07.0: BAR 15: assigned [mem 0xf7000000-0xf70fffff 64bit pref]
[ 0.831565] pci 0000:02:07.0: BAR 13: no space for [io size 0x1000]
[ 0.831566] pci 0000:02:07.0: BAR 13: failed to assign [io size 0x1000]
[ 0.831568] pci 0000:02:01.0: PCI bridge to [bus 03]
[ 0.831769] pci 0000:02:04.0: PCI bridge to [bus 04]
[ 0.831968] pci 0000:05:00.0: BAR 3: no space for [mem size 0x01000000]
[ 0.831969] pci 0000:05:00.0: BAR 3: failed to assign [mem size 0x01000000]
[ 0.831970] pci 0000:05:00.0: BAR 0: no space for [mem size 0x00100000]
[ 0.831972] pci 0000:05:00.0: BAR 0: failed to assign [mem size 0x00100000]
[ 0.831973] pci 0000:05:00.0: BAR 1: no space for [mem size 0x00100000]
[ 0.831974] pci 0000:05:00.0: BAR 1: failed to assign [mem size 0x00100000]
[ 0.831976] pci 0000:05:00.0: BAR 2: no space for [mem size 0x00100000]
[ 0.831977] pci 0000:05:00.0: BAR 2: failed to assign [mem size 0x00100000]
[ 0.831979] pci 0000:02:05.0: PCI bridge to [bus 05]
[ 0.832178] pci 0000:06:00.0: BAR 4: assigned [mem 0xf7000000-0xf7003fff 64bit pref]
[ 0.832337] pci 0000:06:00.0: BAR 2: no space for [mem size 0x00001000 64bit]
[ 0.832339] pci 0000:06:00.0: BAR 2: failed to assign [mem size 0x00001000 64bit]
[ 0.832340] pci 0000:06:00.0: BAR 0: no space for [io size 0x0100]
[ 0.832341] pci 0000:06:00.0: BAR 0: failed to assign [io size 0x0100]
[ 0.832343] pci 0000:02:07.0: PCI bridge to [bus 06]
[ 0.832454] pci 0000:02:07.0: bridge window [mem 0xf7000000-0xf70fffff 64bit pref]
[ 0.832543] pci 0000:02:09.0: PCI bridge to [bus 07]
[ 0.832741] pci 0000:01:00.0: PCI bridge to [bus 02-07]
[ 0.832852] pci 0000:01:00.0: bridge window [mem 0xf7000000-0xf70fffff 64bit pref]
[ 0.832941] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 0.832948] pci 0000:00:00.0: bridge window [mem 0xf7000000-0xf70fffff pref]

pci 0000:05:00.0 is my mini-pcie card. pci 0000:06:00.0 is rtl8168 wifi.

so I tried to expand the ranges in kirin970.dtsi as follows:

1035 pcie@f4000000 {
1036 compatible = “hisilicon,hikey970”;

1047 ranges = <0x02000000 0x0 0x00000000
1048 0x0 0xf6000000
1049 0x0 0x06000000>;

0xf6000000~0xfbffffff is available according to cat /proc/iomem, so I expand this space from 0x02000000 to 0x06000000.
Here comes results using new dts.
Without my pcie card inserted, kernel boot successfully, and all pcie devices get all required mem resources assigned.

[ 0.813444] pci 0000:00:00.0: BAR 0: assigned [mem 0xf6000000-0xf6ffffff]
[ 0.813449] pci 0000:00:00.0: BAR 14: assigned [mem 0xf7000000-0xf71fffff]
[ 0.813451] pci 0000:00:00.0: BAR 15: assigned [mem 0xf7200000-0xf72fffff pref]
[ 0.813453] pci 0000:00:00.0: BAR 13: no space for [io size 0x1000]
[ 0.813455] pci 0000:00:00.0: BAR 13: failed to assign [io size 0x1000]
[ 0.813458] pci 0000:01:00.0: BAR 14: assigned [mem 0xf7000000-0xf70fffff]
[ 0.813460] pci 0000:01:00.0: BAR 15: assigned [mem 0xf7200000-0xf72fffff 64bit pref]
[ 0.813462] pci 0000:01:00.0: BAR 0: assigned [mem 0xf7100000-0xf711ffff]
[ 0.813507] pci 0000:01:00.0: BAR 13: no space for [io size 0x1000]
[ 0.813509] pci 0000:01:00.0: BAR 13: failed to assign [io size 0x1000]
[ 0.813511] pci 0000:02:07.0: BAR 14: assigned [mem 0xf7000000-0xf70fffff]
[ 0.813514] pci 0000:02:07.0: BAR 15: assigned [mem 0xf7200000-0xf72fffff 64bit pref]
[ 0.813515] pci 0000:02:07.0: BAR 13: no space for [io size 0x1000]
[ 0.813516] pci 0000:02:07.0: BAR 13: failed to assign [io size 0x1000]
[ 0.813519] pci 0000:02:01.0: PCI bridge to [bus 03]
[ 0.813719] pci 0000:02:04.0: PCI bridge to [bus 04]
[ 0.813918] pci 0000:02:05.0: PCI bridge to [bus 05]
[ 0.814118] pci 0000:06:00.0: BAR 4: assigned [mem 0xf7200000-0xf7203fff 64bit pref]
[ 0.814279] pci 0000:06:00.0: BAR 2: assigned [mem 0xf7000000-0xf7000fff 64bit]
[ 0.814438] pci 0000:06:00.0: BAR 0: no space for [io size 0x0100]
[ 0.814440] pci 0000:06:00.0: BAR 0: failed to assign [io size 0x0100]
[ 0.814441] pci 0000:02:07.0: PCI bridge to [bus 06]
[ 0.814509] pci 0000:02:07.0: bridge window [mem 0xf7000000-0xf70fffff]
[ 0.814555] pci 0000:02:07.0: bridge window [mem 0xf7200000-0xf72fffff 64bit pref]
[ 0.814648] pci 0000:02:09.0: PCI bridge to [bus 07]
[ 0.814847] pci 0000:01:00.0: PCI bridge to [bus 02-07]
[ 0.814915] pci 0000:01:00.0: bridge window [mem 0xf7000000-0xf70fffff]
[ 0.814960] pci 0000:01:00.0: bridge window [mem 0xf7200000-0xf72fffff 64bit pref]
[ 0.815050] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 0.815056] pci 0000:00:00.0: bridge window [mem 0xf7000000-0xf71fffff]
[ 0.815059] pci 0000:00:00.0: bridge window [mem 0xf7200000-0xf72fffff pref]

BUT when I inserted my mini-pcie card, kernel boot fail:

[ 0.705958] Kirin-pcie f4000000.pcie: eye_param_vboost = [0xffffffff]
[ 0.712419] Kirin-pcie f4000000.pcie: eye_param_iboost = [0xffffffff]
[ 0.718863] Kirin-pcie f4000000.pcie: eye_param_pre = [0xffffffff]
[ 0.725074] Kirin-pcie f4000000.pcie: eye_param_post = [0xffffffff]
[ 0.731342] Kirin-pcie f4000000.pcie: eye_param_main = [0xffffffff]
[ 0.842313] ion domain already init return domain
[ 1.186273] Bad mode in Error handler detected on CPU4, code 0xbf000000 – SError
[ 1.193774] Internal error: Oops - bad mode: 0 [#1] PREEMPT SMP
[ 1.199692] Modules linked in:
[ 1.202749] CPU: 4 PID: 1 Comm: swapper/0 Tainted: G S 4.9.78 #6
[ 1.209881] Hardware name: HiKey970 (DT)
[ 1.213799] task: ffff8001b8cb0000 task.stack: ffff8001b8cb8000
[ 1.219724] PC is at rtl8168_init_one+0x2f8/0x1978
[ 1.224511] LR is at rtl8168_init_one+0x2e4/0x1978
[ 1.229297] pc : [] lr : [] pstate: 60400045
[ 1.236691] sp : ffff8001b8cbbb60
[ 1.240000] x29: ffff8001b8cbbb60 x28: ffff8001b6ff0000
[ 1.245316] x27: ffff8001b6ff0900 x26: ffff00000918c7d0
[ 1.250631] x25: ffff000009a0c000 x24: ffff000009736000
[ 1.255944] x23: ffff8001b81af0a0 x22: 0000000000000000
[ 1.261259] x21: ffff0000095a8000 x20: ffff000009663000
[ 1.266573] x19: ffff8001b81af000 x18: ffff0000095a8690
[ 1.271887] x17: 00000000fa83b2da x16: 00000000fa83b2da
[ 1.277202] x15: ffff0000096cb918 x14: 0000000000000004
[ 1.282516] x13: 0000000000000000 x12: 0000000000000004
[ 1.287830] x11: 0000000000000000 x10: 0000000000000001
[ 1.293144] x9 : ffff0000095ceb30 x8 : ffff008009a0c000
[ 1.298458] x7 : 0088000000000000 x6 : ffff0000095abf78
[ 1.303772] x5 : ffff000009a0d000 x4 : ffff8001bfffd270
[ 1.309086] x3 : 00e8000000000f07 x2 : 0140000000000000
[ 1.314400] x1 : ffff8001b6e58060 x0 : 0000000000000000
[ 1.319715]
[ 1.319715] SP: 0xffff8001b8cbbae0:
[ 1.324677] bae0 [ 1.326422] 00000000
00000000[ 1.329477] b81af0a0
ffff8001[ 1.332531] 09736000
ffff0000[ 1.335584] 09a0c000
ffff0000[ 1.338638]
[ 1.340123] bb00 [ 1.341865] 0918c7d0
ffff0000[ 1.344919] b6ff0900
ffff8001[ 1.347972] b6ff0000
ffff8001[ 1.351025] b8cbbb60
ffff8001[ 1.354078]
[ 1.355113] ufs final power mode: gear = 3, lane = 2, pwr = 1, rate = 2
[ 1.359070] ufshcd-hisi ff3c0000.ufs: ufshcd_find_max_sup_active_icc_level: Regulator capability was not set, actvIccLevel=0
[ 1.359330] scsi 0:0:0:49488: Well-known LUN TOSHIBA THGAF4G9N4LBAIRB 0300 PQ: 0 ANSI: 6
[ 1.381824] bb20 [ 1.383566] 0879cfac
ffff0000[ 1.386620] b8cbbb60
ffff8001[ 1.389673] 0879cfc0
ffff0000[ 1.392727] 60400045
00000000[ 1.395780]
[ 1.397265] bb40 [ 1.399007] b81af0a0
ffff8001[ 1.402060] 0879cf98
ffff0000[ 1.405115] ffffffff
ffffffff[ 1.408168] 0879cfac
ffff0000[ 1.411222]
[ 1.412707] bb60 [ 1.414449] b8cbbc00
ffff8001[ 1.417504] 084134c8
ffff0000[ 1.420557] 09663580
ffff0000[ 1.423611] b81af0a0
ffff8001[ 1.426665]
[ 1.428150] bb80 [ 1.429893] b81af000
ffff8001[ 1.432946] 09663518
ffff0000[ 1.436000] 09663678
ffff0000[ 1.439054] 092041f8
ffff0000[ 1.442107]
[ 1.443592] bba0 [ 1.445334] 091a04a8
ffff0000[ 1.448388] 0918c7d0
ffff0000[ 1.451442] 092041e8
ffff0000[ 1.454495] 0926fc60
ffff0000[ 1.457549]
[ 1.459034] bbc0 [ 1.460777] b8cbbc00
ffff8001[ 1.463831] 0004094e
00000000[ 1.466884] 096c1000
ffff0000[ 1.469938] b81af0a0
ffff8001[ 1.472991]
[ 1.474477]
[ 1.474477] X1: 0xffff8001b6e57fe0:
[ 1.479439] 7fe0 [ 1.481181] 00000000
00000000[ 1.484235] 00000000
00000000[ 1.487289] ffff7fff
ffffffff[ 1.490343] ffffffff
ffffffff[ 1.493396]
[ 1.494881] 8000 [ 1.496624] 00000000
00000000[ 1.499678] 00000000
00000000[ 1.502731] 00000000
00000000[ 1.505785] 00000000
00000000[ 1.508839]
[ 1.510324] 8020 [ 1.512066] 00000000
00000000[ 1.515119] 00000000
00000000[ 1.518172] 00000000
00000000[ 1.521226] 00000000
00000000[ 1.524279]
[ 1.525765] 8040 [ 1.527507] 00000000
00000000[ 1.530560] 00000000
00000000[ 1.533614] b6459f0f
00e80000[ 1.536667] 00000000
00000000[ 1.539721]
[ 1.541206] 8060 [ 1.542948] f8800f07
00e80000[ 1.546002] 00000000
00000000[ 1.549055] 00000000
00000000[ 1.552108] 00000000
00000000[ 1.555161]
[ 1.556647] 8080 [ 1.558389] e86c0f07
00e80000[ 1.561443] e86c1f07
00e80000[ 1.564496] e86c2f07
00e80000[ 1.567551] e86c3f07
00e80000[ 1.570603]
[ 1.572089] 80a0 [ 1.573831] e86c4f07
00e80000[ 1.576884] e86c5f07
00e80000[ 1.579938] e86c6f07
00e80000[ 1.582992] e86c7f07
00e80000[ 1.586045]
[ 1.587530] 80c0 [ 1.589272] e86c8f07
00e80000[ 1.592326] e86c9f07
00e80000[ 1.595380] e86caf07
00e80000[ 1.598434] e86cbf07
00e80000[ 1.601487]
[ 1.602972]
[ 1.602972] X4: 0xffff8001bfffd1f0:
[ 1.607934] d1f0 [ 1.609677] 00000000
00000000[ 1.612731] 00000000
00000000[ 1.615784] bfffc003
00000001[ 1.618838] 00200f11
00c80000[ 1.621891]
[ 1.623376] d210 [ 1.625118] 00400f11
00c80000[ 1.628171] 00600f11
00c80000[ 1.631226] 00800f11
00c80000[ 1.634279] 00a00f11
00c80000[ 1.637333]
[ 1.638818] d230 [ 1.640560] bfffb003
00000001[ 1.643614] 00e00f11
00e80000[ 1.646668] bfffa003
00000001[ 1.649722] 01200f11
00c80000[ 1.652776]
[ 1.654261] d250 [ 1.656003] bfff9003
00000001[ 1.659057] bfff8003
00000001[ 1.662111] b8544003
00000001[ 1.665165] b6e58003
00000001[ 1.668218]
[ 1.669703] d270 [ 1.671446] b7dc0003
00000001[ 1.674499] b7dc1003
00000001[ 1.677553] b7969003
00000001[ 1.680606] b8764003
00000001[ 1.683659]
[ 1.685145] d290 [ 1.686887] b8765003
00000001[ 1.689941] b8766003
00000001[ 1.692994] b876c003
00000001[ 1.696047] b876d003
00000001[ 1.699101]
[ 1.700586] d2b0 [ 1.702329] b876e003
00000001[ 1.705382] b876f003
00000001[ 1.708436] b7a94003
00000001[ 1.711490] b7a95003
00000001[ 1.714543]
[ 1.716028] d2d0 [ 1.717770] b7a96003
00000001[ 1.720824] b7a97003
00000001[ 1.723878] b7f7c003
00000001[ 1.726931] 00000000
00000000[ 1.729984]
[ 1.731472]
[ 1.731472] X19: 0xffff8001b81aef80:
[ 1.736520] ef80 [ 1.738263] 00000000
00000000[ 1.741317] 00000000
00000000[ 1.744370] 00000000
00000000[ 1.747424] 00000000
00000000[ 1.750477]
[ 1.751963] efa0 [ 1.753705] 00000000
00000000[ 1.756758] 00000000
00000000[ 1.759812] 00000000
00000000[ 1.762866] 00000000
00000000[ 1.765919]
[ 1.767404] efc0 [ 1.769146] 00000000
00000000[ 1.772200] 00000000
00000000[ 1.775254] 00000000
00000000[ 1.778308] 00000000
00000000[ 1.781361]
[ 1.782846] efe0 [ 1.784589] 00000000
00000000[ 1.787643] 00000000
00000000[ 1.790696] 00000000
00000000[ 1.793750] 00000000
00000000[ 1.796802]
[ 1.798287] f000 [ 1.800029] b7c40828
ffff8001[ 1.803082] b7c40828
ffff8001[ 1.806136] b7c40800
ffff8001[ 1.809190] 00000000
00000000[ 1.812244]
[ 1.813729] f020 [ 1.815471] b6df88a8
ffff8001[ 1.818524] b789f600
ffff8001[ 1.821578] 00000000
00000000[ 1.824632] 00000000
816810ec[ 1.827685]
[ 1.829170] f040 [ 1.830913] 012310ec
00020000[ 1.833967] 01000007
00b05070[ 1.837021] 02020130
00000000[ 1.840075] 00000000
00000000[ 1.843128]
[ 1.844614] f060 [ 1.846356] 09663518
ffff0000[ 1.849409] ffffffff
ffffffff[ 1.852463] 00010000
00000000[ 1.855516] ffffffff
00000000[ 1.858569]
[ 1.860056]
[ 1.860056] X23: 0xffff8001b81af020:
[ 1.865104] f020 [ 1.866846] b6df88a8
ffff8001[ 1.869900] b789f600
ffff8001[ 1.872954] 00000000
00000000[ 1.876008] 00000000
816810ec[ 1.879061]
[ 1.880546] f040 [ 1.882288] 012310ec
00020000[ 1.885342] 01000007
00b05070[ 1.888395] 02020130
00000000[ 1.891448] 00000000
00000000[ 1.894502]
[ 1.895987] f060 [ 1.897730] 09663518
ffff0000[ 1.900783] ffffffff
ffffffff[ 1.903836] 00010000
00000000[ 1.906890] ffffffff
00000000[ 1.909943]
[ 1.911429] f080 [ 1.913171] 00000000
0011ff40[ 1.916225] 0000000a
00000064[ 1.919279] 00000000
00000000[ 1.922332] 00000001
00000000[ 1.925385]
[ 1.926870] f0a0 [ 1.928613] b7a8f0a0
ffff8001[ 1.931666] b875c200
ffff8001[ 1.934720] b7364e00
ffff8001[ 1.937773] b8e9d080
ffff8001[ 1.940827]
[ 1.942312] f0c0 [ 1.944054] b6fc0568
ffff8001[ 1.947108] b7a8f0b0
ffff8001[ 1.950161] b8e9d080
ffff8001[ 1.953216] 096543f0
ffff0000[ 1.956269]
[ 1.957754] f0e0 [ 1.959496] b6d3d708
ffff8001[ 1.962550] 00000004
00000007[ 1.965603] 00000000
00000000[ 1.968657] 095fe410
ffff0000[ 1.971710]
[ 1.973195] f100 [ 1.974938] 00000000
00000000[ 1.977991] b81af108
ffff8001[ 1.981045] b81af108
ffff8001[ 1.984098] b8cb0000
ffff8001[ 1.987152]
[ 1.988638]
[ 1.988638] X27: 0xffff8001b6ff0880:
[ 1.993686] 0880 [ 1.995429] 00000000
00000000[ 1.998482] 00000000
00000000[ 2.001536] 00000000
00000000[ 2.004590] 00000000
00000000[ 2.007643]
[ 2.009128] 08a0 [ 2.010870] 00000000
00000000[ 2.013923] 00000000
00000000[ 2.016978] 00000000
00000000[ 2.020032] 00000000
00000000[ 2.023085]
[ 2.024570] 08c0 [ 2.026313] 00000000
00000000[ 2.029366] 00000000
00000000[ 2.032420] 00000000
00000000[ 2.035474] 00000000
00000000[ 2.038527]
[ 2.040012] 08e0 [ 2.041755] 00000000
00000000[ 2.044808] 00000000
00000000[ 2.047861] 00000000
00000000[ 2.050915] 00000000
00000000[ 2.053968]
[ 2.055454] 0900 [ 2.057196] 00000000
00000000[ 2.060250] 00000000
00000000[ 2.063304] b6ff0000
ffff8001[ 2.066357] 00000000
00000000[ 2.069410]
[ 2.070895] 0920 [ 2.072637] 00000000
00000000[ 2.075691] 00000000
00000000[ 2.078745] 00000000
00000000[ 2.081798] 00000000
00000000[ 2.084852]
[ 2.086337] 0940 [ 2.088079] 00000000
00000000[ 2.091133] 00000000
00000000[ 2.094187] 00000000
00000000[ 2.097241] 00000000
00000000[ 2.100294]
[ 2.101779] 0960 [ 2.103521] 00000000
00000000[ 2.106575] 00000000
00000000[ 2.109628] 00000000
00000000[ 2.112681] 00000000
00000000[ 2.115734]
[ 2.117221]
[ 2.117221] X28: 0xffff8001b6feff80:
[ 2.122269] ff80 [ 2.124012] ffbfffff
dfffffff[ 2.127066] ffffbfff
ffffffff[ 2.130119] fdffffff
ffffffff[ 2.133173] ffffffff
ffffffff[ 2.136226]
[ 2.137711] ffa0 [ 2.139454] ffffffff
ffffbfff[ 2.142507] fedfffff
ffffffff[ 2.145561] feffffff
ffffffff[ 2.148615] ffffffff
ffffffbf[ 2.151668]
[ 2.153153] ffc0 [ 2.154895] feffffff
ffffffff[ 2.157949] ffffffff
fefdffff[ 2.161002] ffffffff
fffdffff[ 2.164055] fffefffd
ffff7fff[ 2.167109]
[ 2.168594] ffe0 [ 2.170336] ffffffff
ffbfffff[ 2.173390] fffeffff
ffffffff[ 2.176445] ffffffff
ffffffff[ 2.179498] ffffffff
7ffeffff[ 2.182552]
[ 2.184036] 0000 [ 2.185779] 25687465
00000064[ 2.188832] 00000000
00000000[ 2.191886] 00000000
00000000[ 2.194940] 00000000
00000000[ 2.197993]
[ 2.199479] 0020 [ 2.201220] 00000000
00000000[ 2.204273] 00000000
00000000[ 2.207327] 00000000
00000000[ 2.210381] 00000000
00000000[ 2.213434]
[ 2.214919] 0040 [ 2.216661] 00000000
00000000[ 2.219715] 00000000
00000000[ 2.222769] 00000000
00000000[ 2.225822] 00000000
00000000[ 2.228876]
[ 2.230360] 0060 [ 2.232103] b6ff0060
ffff8001[ 2.235157] b6ff0060
ffff8001[ 2.238210] b6ff0070
ffff8001[ 2.241264] b6ff0070
ffff8001[ 2.244318]
[ 2.245804]
[ 2.245804] X29: 0xffff8001b8cbbae0:
[ 2.250852] bae0 [ 2.252594] 00000000
00000000[ 2.255648] b81af0a0
ffff8001[ 2.258702] 09736000
ffff0000[ 2.261755] 09a0c000
ffff0000[ 2.264808]
[ 2.266294] bb00 [ 2.268036] 0918c7d0
ffff0000[ 2.271090] b6ff0900
ffff8001[ 2.274144] b6ff0000
ffff8001[ 2.277197] b8cbbb60
ffff8001[ 2.280251]
[ 2.281736] bb20 [ 2.283479] 0879cfac
ffff0000[ 2.286532] b8cbbb60
ffff8001[ 2.289586] 0879cfc0
ffff0000[ 2.292639] 60400045
00000000[ 2.295692]
[ 2.297177] bb40 [ 2.298920] b81af0a0
ffff8001[ 2.301973] 0879cf98
ffff0000[ 2.305027] ffffffff
ffffffff[ 2.308081] 0879cfac
ffff0000[ 2.311134]
[ 2.312620] bb60 [ 2.314362] b8cbbc00
ffff8001[ 2.317416] 084134c8
ffff0000[ 2.320470] 09663580
ffff0000[ 2.323523] b81af0a0
ffff8001[ 2.326577]
[ 2.328063] bb80 [ 2.329805] b81af000
ffff8001[ 2.332859] 09663518
ffff0000[ 2.335913] 09663678
ffff0000[ 2.338967] 092041f8
ffff0000[ 2.342020]
[ 2.343505] bba0 [ 2.345247] 091a04a8
ffff0000[ 2.348301] 0918c7d0
ffff0000[ 2.351354] 092041e8
ffff0000[ 2.354408] 0926fc60
ffff0000[ 2.357461]
[ 2.358947] bbc0 [ 2.360689] b8cbbc00
ffff8001[ 2.363742] 0004094e
00000000[ 2.366796] 096c1000
ffff0000[ 2.369850] b81af0a0
ffff8001[ 2.372904]
[ 2.374389]
[ 2.375873] Process swapper/0 (pid: 1, stack limit = 0xffff8001b8cb8028)
[ 2.382571] Stack: (0xffff8001b8cbbb60 to 0xffff8001b8cbc000)
[ 2.388315] bb60: ffff8001b8cbbc00 ffff0000084134c8 ffff000009663580 ffff8001b81af0a0
[ 2.396145] bb80: ffff8001b81af000 ffff000009663518 ffff000009663678 ffff0000092041f8
[ 2.403975] bba0: ffff0000091a04a8 ffff00000918c7d0 ffff0000092041e8 ffff00000926fc60
[ 2.411804] bbc0: ffff8001b8cbbc00 000000000004094e ffff0000096c1000 ffff8001b81af0a0
[ 2.419634] bbe0: ffff000009663580 ffff8001b81a0008 ffff8001b81af000 000000000004094e
[ 2.427463] bc00: ffff8001b8cbbc40 ffff0000085ecfc4 ffff8001b81af0a0 ffff000009732000
[ 2.435293] bc20: 0000000000000000 ffff000009663580 0000000000000000 ffff000009732000
[ 2.443122] bc40: ffff8001b8cbbc80 ffff0000085ed11c ffff8001b81af0a0 ffff000009663580
[ 2.450952] bc60: ffff8001b81af100 ffff0000095a8000 ffff000009654000 ffff0000085ed098
[ 2.458781] bc80: ffff8001b8cbbcb0 ffff0000085eae28 0000000000000000 ffff000009663580
[ 2.466611] bca0: ffff0000085ed070 ffff8001b8cbbd10 ffff8001b8cbbd00 ffff0000085ec7a8
[ 2.474441] bcc0: ffff000009663580 ffff8001b6f8ee00 0000000000000000 ffff0000095fe140
[ 2.482271] bce0: 00000000ffffffe0 ffff8001b8e68aa8 ffff8001b875c268 000000000004094e
[ 2.490101] bd00: ffff8001b8cbbd10 ffff0000085ec348 ffff8001b8cbbd50 ffff0000085ed950
[ 2.497930] bd20: ffff000009663580 ffff8001b8cb8000 ffff0000091e1564 0000000000000000
[ 2.505760] bd40: ffff0000096c0000 ffff000008272da0 ffff8001b8cbbd70 ffff00000841222c
[ 2.513590] bd60: ffff000009084960 ffff8001b8cb8000 ffff8001b8cbbd80 ffff0000091e15a4
[ 2.521419] bd80: ffff8001b8cbbda0 ffff000008083c88 ffff0000095a8000 000000000004094e
[ 2.529249] bda0: ffff8001b8cbbe30 ffff0000091a0dc8 000000000000019f ffff0000095a8000
[ 2.537079] bdc0: ffff0000096c0000 0000000000000006 ffff0000096c0000 ffff0000092041f8
[ 2.544908] bde0: ffff0000091a04a8 ffff00000918c700 ffff0000092041e8 ffff00000926f2c8
[ 2.552739] be00: ffff0000096c0000 ffff000008fe1210 0000000600000006 0000000000000000
[ 2.560568] be20: 0000000000000000 000000000004094e ffff8001b8cbbea0 ffff000008c5d678
[ 2.568398] be40: ffff000008c5d668 0000000000000000 0000000000000000 0000000000000000
[ 2.576227] be60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 2.584057] be80: 0000000000000000 0000000000000000 0000000000000000 000000000004094e
[ 2.591886] bea0: 0000000000000000 ffff000008083a30 ffff000008c5d668 0000000000000000
[ 2.599715] bec0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 2.607545] bee0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 2.615374] bf00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 2.623204] bf20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 2.631033] bf40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 2.638863] bf60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 2.646692] bf80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 2.654522] bfa0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 2.662352] bfc0: 0000000000000000 0000000000000005 0000000000000000 0000000000000000
[ 2.670181] bfe0: 0000000000000000 0000000000000000 fffffffffffffffe ffffffffffffffff
[ 2.678009] Call trace:
[ 2.680453] [] rtl8168_init_one+0x2f8/0x1978
[ 2.686287] [] pci_device_probe+0x98/0x110
[ 2.691945] [] driver_probe_device+0x1fc/0x2a8
[ 2.697947] [] __driver_attach+0xac/0xb0
[ 2.703431] [] bus_for_each_dev+0x70/0xc8
[ 2.709000] [] driver_attach+0x20/0x28
[ 2.714307] [] bus_add_driver+0x1c8/0x230
[ 2.719876] [] driver_register+0x60/0xf8
[ 2.725358] [] __pci_register_driver+0x3c/0x48
[ 2.731365] [] rtl8168_init_module+0x40/0x4c
[ 2.737197] [] do_one_initcall+0x50/0x168
[ 2.742769] [] kernel_init_freeable+0x1b8/0x270
[ 2.748863] [] kernel_init+0x10/0x100
[ 2.754083] [] ret_from_fork+0x10/0x20
[ 2.759393] Code: b4008c40 91010000 b9400000 d5033d9f (52af9001)
[ 2.765533] [drm] client change to HDMI
[ 2.765544] Error reading temperature for gpu thermal zone: -22
[ 2.765546] —[ end trace ae8b35a2fb3dcaff ]—
[ 2.769561] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 2.769561]
[ 2.769562] SMP: stopping secondary CPUs
[ 2.775464] Kernel Offset: disabled
[ 2.775465] Memory Limit: none
[ 2.803607] Rebooting in 5 seconds…
[MR BYPASS] 0x00000000
scsysstat_value[8].
last_keypoint0,reboot_type0
secdbg not DCU.
SecDbgVer exit

So how can I expand mem address ranges for pcie devices correctly and what’s the length limitation?
I hope someone who have similar experiences give me some advice for this problem.
Thanks a lot.

sorry, rtl8168 is ethernet.
And, in datasheet, the space i want to use is reserved:


So, i use this space and do ioremap, when i read or write this area, kernel panic as the above log shows.